Newbie question on backing up boot device

  • I get it. I am looking for what other people are using and open for any successful details to try out and document findings afterwards.

    I use dd in the shell. It's a one liner:


    dd if=backup-image-file-name of=/dev/sdx bs=1M status=progress


    x in /dev/sdx is the letter of the drive you wish to write the image out to and you had better be sure you are targeting the correct drive.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

    • Offizieller Beitrag

    Yes, but it gets more complicated if you have a headless system like RPi or HC2. Then you need another computer to restore the backup.

    Personally I use fsarchiver on Mint or Kubuntu to create backups.


    Did you ever got into troubles backing up a live system?

  • OK I ran dd with the backup plugin (the same as command line dd result I suppose) and got files as in here


    This part is automated and can run on schedule. Cool !


    What do I do next ?

    (Windows or Ubuntu)

  • My system is headless but it's much more capable than RPi or HC2. It has an SOL console, reachable from anywhere.


    I also have another bootable media plugged into it (my OMV 4 install on a USB drive that was current the day I moved to OMV 5), along with a spare USB that would become the replacement OMV system disk.


    All I have to do is access the console, reboot the machine, and select the old OMV 4 disk. That gets me to a login shell and after verifying the target disk letter, it's that one liner.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

    • Offizieller Beitrag

    usbimager is available for windows and linux.

    So, up to you.

    Mac OS too.

  • I use dd in the shell. It's a one liner:


    dd if=backup-image-file-name of=/dev/sdx bs=1M status=progress


    x in /dev/sdx is the letter of the drive you wish to write the image out to and you had better be sure you are targeting the correct drive.

    When I ran dd from the back up plugin. It created a number of files. There wasn't a traditional image file but a couple dd files. Do we just pick the largest one? It seems like all the rest would be necessary also.

  • The .ddfull.gz is the compressed dd image file of the entire drive. The other files are not needed for a restore from this image.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

  • gderf

    So I took output of dd backup file backup-omv-26-Jun-2020_12-07-45.ddful (~65GB) as was produced by the BackUp plugin (option dd full disk - use dd to clone the entire drive to a compressed image file.)


    Used pishrink https://github.com/Drewsif/PiShrink and shrunk it to size 3.5GB and used Etcher to burn on to the SD card.

    While in general I was able to boot up and log into OMV, I saw SMB and DLNA services as red.

    So assuming it did not quite work as expected.


    Question - is the dd full back up suppose to and was tested to restore fully operational backups ?


    Or I am missing something here.

  • Question - is the dd full back up suppose to and was tested to restore fully operational backups ?


    Or I am missing something here.

    I use my own one line dd command that runs on cron nightly and have done so for more than five years. The restored images are fully functional. I have never had the slightest problem with this, never. I routinely test a restore about every six to eight weeks.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

    • Offizieller Beitrag

    While in general I was able to boot up and log into OMV, I saw SMB and DLNA services as red.

    So assuming it did not quite work as expected.


    Question - is the dd full back up suppose to and was tested to restore fully operational backups ?


    Or I am missing something here.

    You did things after the plugin backed up your image. I would attribute the service start failures to pishrink or something else you did. Did the services start when disabled and re-enabled? Since you are backing a live OS, it is possible that some things may not be perfect (nothing the plugin can do about that) but I call your restore test a pretty good restore.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • ryecoaaron

    I actually was able on the second try to successful restore the system

    Steps:

    - run Backup plugin

    - gzip -d backup-omv-30-Jun-2020_14-57-39.ddfull.gz

    - sudo pishrink.sh -v backup-omv-30-Jun-2020_14-57-39.ddfull.img backup-omv-30-Jun-2020_14-57-39.ddfull-shrunk.img

    - used Etcher to restore shrunk file


    But had the same thought you described "Since you are backing a live OS, it is possible that some things may not be perfect"


    How do you do manage that with crontab dd ? Do you stop services and then run dd?

    Please share script if possible.

  • How do you do manage that with crontab dd ? Do you stop services and then run dd?

    Please share script if possible.

    Cron runs the script. No services are stopped.



    You must determine what the if device is and you must decided where the images are stored.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

    • Offizieller Beitrag

    Before burning the backup image using usbimager, should the sd card be formatted first? I haven't seen any reference to this. Is that just a given, or is usbimager just magical?

  • dd copies what you tell it to copy.


    If the if= is a device it copies the entire device.


    If the if= is a partition on a device it copies only that partition.


    You can use OMV's Scheduled Jobs or edit root's crontab. It makes no difference. I edited root's crontab in the shell.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

Jetzt mitmachen!

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