Backing up and restoring system on Raspberry Pi

  • Not sure where to post this. I've got my OMV up and running, and now I want to use this state as reference. What is the best way to do that?

    • OMV own backup plugin. I have only three tabs — Photorec, Extundelete and System backup. Last one just copies all system drive to a folder on external HDD. How do I restore from this backup?
    • I could just dd entire sd card into an image file and restore from it later. But last time I tried to do that, system refused to boot after restoring. Did I miss something?

    Another question — would there be any problems with file ownership on external HDD after restoring system?

    • Offizieller Beitrag

    How do I restore from this backup?


    In a normal PC environment, i would copy with rsync (archive mode) all the files back to a disk with the same format, recreate folders /dev, /sys and /proc. Edit fstab to replace the rootfs new UUID (in ext4 you can change the UUID so maybe you can avoid that and change the uuid instead). Finally chroot properly to the disk to execute grub-install. In a Rpi environment it might be the same but @ryecoaaron should know better if i am missing a step. Last time I did this for real was with rsnapshot OS backup two years ago.


    would there be any problems with file ownership on external HDD after restoring system?


    If you use rsync archive mode you shouldn't have a problem.


    I could just dd entire sd card into an image file and restore from it later. But last time I tried to do that, system refused to boot after restoring. Did I miss something?


    I most cases that should work, but is suppose to be done with the card offline, not mounted.

  • For people using Windows machines I just use win32diskimager. I put the micro sd card in a card reader and image it with win32diskimager. Then I zip the image so it will take less space. It images and restores fine.

  • In a normal PC environment, i would copy with rsync (archive mode) all the files back to a disk with the same format, recreate folders /dev, /sys and /proc. Edit fstab to replace the rootfs new UUID (in ext4 you can change the UUID so maybe you can avoid that and change the uuid instead). Finally chroot properly to the disk to execute grub-install.


    Thank you. How to do that exactly? Could you point me to some guide?


    I most cases that should work, but is suppose to be done with the card offline, not mounted.


    Of course. Still, I'm pretty sure I did shutdown system and unmounted card. Hm.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!