Disaster recovery backup

  • Hi all,
    I'm starting experimenting a little bit of overclocking for my Raspberry Pi2 with OMV.
    The only way I know to have a disaster recovery solution is to shutdown omv,plug the microSD into my macbook, make an image file using dd.
    If something get corrupted during the day I can quickly (not really quickly, dd is really slow with 8GB image) restore all again via dd (image -> microSd).
    But how can I backup my omv instance live, while it's running in a way that is automatic and allow me to do a quick restore in case of emergency?
    I have an external usb drive attached to the rpi and also a remote share mounted (coming from an usb drive attached to the router)

    • Offizieller Beitrag

    Quick restore? you can't. Does that much change from your image that it wouldn't work anymore?

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | 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!

  • I have to shut down each evening the system, go downstairs, take the microsd and so on...
    I'm looking something that, once a day, can produce "an image" that I can restore quickly.

  • I run dd on cron. It makes an image daily @3:00am when the machine is not in use. I keep a week's worth of backups. This is entirely automated. However, restoring from a backup is not trivial.


    Yes, using dd to backup a live system can lead to some inconsistencies in the backup, but in my use case they would be minor and unimportant.

    --
    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.

  • I don't have critical data on the microSD,so minor inconsistencies could be accepted.
    What do you mean as "not in use"?
    I have jdownloader, mysql, wordpress, emby running on the system, could be hard to stop all of them at certain time, dd and restart all again.
    Could I use dd while this system is running?
    Mysql db, wordpress files, jdwonloader download file, emby cache and database are all on an usb drive, so from what I know only log service is writing during the night

  • "Not in use" means at 3:00am nobody is using any of the services that are running on the machine. Again, people will say not to use dd on a running system. But I understand the implications of doing so and choose to do it anyway.

    --
    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

    Using dd to make an image from a disk isn't dangerous. You just may not get a working image if the system is too busy.

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | 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!

    • Offizieller Beitrag

    Sure there is. You would need to have the OS partition on LVM or btrfs. Then you could snapshot it. Is it worth it? Probably not. So, use dd because it is good enough. If you have mission critical stuff on an RPi, then something else is wrong in your plan.

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | 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!

  • You are right, lets try dd.
    Any suggestion on important/useful dd option to speed up the process?
    To dd from 8GB microSD to ssd mac drive took 2 hours and the restore process almost the same... :(

    • Offizieller Beitrag

    Did you set the block size? bs=1M

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | 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!

  • At the end I tried with bs=4096 but I made some test with pv using bs=1M, bs=2M, bs=512 and also using osx rdisks (raw disks) instead of /dev/disk but transfer speed was around 1MB/sec on a Sandisk class 10 16GB microSD :(

    • Offizieller Beitrag

    That is really low. I always use bs=1M and get 3MB/sec on cheaper SD cards up to around 15 MB/sec on better SD cards.


    I use this reader
    https://www.amazon.com/gp/prod…_detailpage?ie=UTF8&psc=1


    I usually use UHS-1 cards like
    https://www.amazon.com/gp/prod…_detailpage?ie=UTF8&psc=1
    https://www.amazon.com/gp/prod…_detailpage?ie=UTF8&psc=1


    I don't have any good cards right now. So, I couldn't tell you which are faster or slower.

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | 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!

  • No, it's uppercase: M


    From the dd man page:


    BLOCKS and BYTES may be followed by the following multiplicative suffixes: c =1, w =2, b =512, kB =1000, K =1024, MB
    =1000*1000, M =1024*1024, xM =M GB =1000*1000*1000, G =1024*1024*1024, and so on for T, P, E, Z, Y.

    --
    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!