billw2 / rpi-clone

A shell script to clone a booted disk.
BSD 3-Clause "New" or "Revised" License
2.56k stars 335 forks source link

Feature requested - Clone into .img file #126

Closed thalesmaoa closed 1 year ago

thalesmaoa commented 3 years ago

Nice work, but I was wondering. Is it possible to clone the img? I have network share, which I can schedule img backups. If I get any corruption, I can easily restore.

TotalCoolness commented 3 years ago

+1

I would like this also for the same reason.

p1r473 commented 3 years ago

114

glotim commented 1 year ago

I am all for this also.

Just upgraded to booting to a USB NVMe drive thanks to your awesome rpi-clone utility. The drive is much larger and faster than the original SD card. Then the question becomes how do I backup the larger SSD as I am filling up the space? Preferably something that can fire off in the middle of the night when nothing else is going on and save it to a network drive. I have a few options and none of them are ideal: A. Use rsync to backup the important stuff to a network drive. A compressed full image would be much better. B. Buy a larger SD card or second USB drive just as big as the one I have and use rpi-clone to that drive. For versioning I would have to buy several more SSD's and rotate them. Also not an automated process. C. Remove the NVMe card from my new Argon One case and put it into an external USB case. Then plug it into another computer and do the "dd" thing then use pishrink to get it down to a more reasonable size and store that file to the backup network drive. Also too much a manual process.

So what do you think? Use a small subset of the rpi-clone code and create rpi_img_backup?

thalesmaoa commented 1 year ago

This already exists. Sorry for not posting the solution.

https://github.com/tom-2015/imgclone