billw2 / rpi-clone

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

Feature request : clone to img file #114

Open stevenmache opened 3 years ago

stevenmache commented 3 years ago

Hi, many thanks for this script, I use it as my main backup utility ^^

I would like to have backup in img file, runned from crom. I am using dd but with 2 major problems:

Well, if I could use rpi-clone in a cron to make a img file it would be the best backup tool !

For use with cron, it would need to use disk uuid instead of sdN (to avoid dramatic bad luck) For img file, maybe it is already possible with /dev/loop virtual block device ? But I haven't tried.

Many thanks Steven

PotemkinMcNasty commented 3 years ago

+1 for this feature

fjpdevries commented 3 years ago

Ik ben tot en met dinsdag 27 april 2021 afwezig en zal mijn email niet of beperkt kunnen lezen en beantwoorden.

Met vriendelijke groet, FSE Turnstiles b.v. Jos de Vries

paloj commented 3 years ago

+1 for this request

karuniko commented 2 years ago

+1 for this feeature

framps commented 2 years ago

Not sure whether this is an alternative for you folks: I wrote a script raspiBackup which also can create backups with rsync. A helper script raspiBackupRestore2Image.sh restores the created rsync backup into a dd image and compresses the image to it's minimum size with pishrink.

AzureRaptor commented 1 year ago

Not sure whether this is an alternative for you folks: I wrote a script raspiBackup which also can create backups with rsync. A helper script raspiBackupRestore2Image.sh restores the created rsync backup into a dd image and compresses the image to it's minimum size with pishrink.

@framps I know it's been a while on this thread but I just wanted to thank you very much for this. I've been trying various methods to do this all "by hand" and it's all been relatively kludgy until this. Thank you.

framps commented 1 year ago

@AzureRaptor Glad raspiBackup helps you to manage your backups. Do you know there is a beta out there which supports Ubuntu and will be included in next release of raspiBackup?

AzureRaptor commented 1 year ago

Even better news! Since rpi-clone (99%, it misses cmdline.txt) works for Ubuntu it hadn't even occurred to me to check on that. Ubuntu is indeed my preferred OS on the Pi 4B. Recently upgraded to Jammy and it's been...interesting.