Doubts about openmediavault-plugin ddfull for microsd

  • Hi,


    was reading this thread [Backup Plugin] create a single img backup image for use with win32 disk imager / etcher, etc.


    So if i understand this correctly, i can install the openmediavault-backup plugin and:


    -backup full microsd card.

    -write the resulting image to a microsd card to restore.


    Got it right?


    I'm actually powering down my Odroid HC2, removing the microsd and cloning it with usbimager.


    Would like to ask how the plugin works, or better saying, how backing up a running system works in this case? Should i stop some services before starting the backup process?


    Thanks in advance!

  • Got it right?

    That's the idea.


    I'm actually powering down my Odroid HC2, removing the microsd and cloning it with usbimager.

    This is a better backup since nothing is running.


    Would like to ask how the plugin works, or better saying, how backing up a running system works in this case?

    It runs a command against the system. If the data changes while the image is being written, then it will be wrong when restored. Most of the time (databases like mysql excluded), it won't cause a problem.


    Should i stop some services before starting the backup process?

    That is better but may not be a problem depending on what is running on your system.

    omv 5.6.12 usul | 64 bit | 5.11 proxmox kernel | omvextrasorg 5.6.2 | kvm plugin 5.1.6
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • It runs a command against the system. If the data changes while the image is being written, then it will be wrong when restored. Most of the time (databases like mysql excluded), it won't cause a problem.

    Interesting, could you elaborate more?

    Or better, maybe i can do some kind of check before starting a backup of this kind?

  • could you elaborate more?

    If you choose ddfull, the plugin runs a dd command that will read the blocks of the os drive sequentially and write them to a file. If one of those blocks changes after it has been read and written to the image file, it could cause an issue.


    maybe i can do some kind of check before starting a backup of this kind?

    Sure. Test backing up your system and restoring it multiple times.

    omv 5.6.12 usul | 64 bit | 5.11 proxmox kernel | omvextrasorg 5.6.2 | kvm plugin 5.1.6
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • If you choose ddfull, the plugin runs a dd command that will read the blocks of the os drive sequentially and write them to a file. If one of those blocks changes after it has been read and written to the image file, it could cause an issue.

    So this could happen:


    dd reads a block, the block change in the meantime, the read value is written - but the block changed in the middle so it's wrong, Correct


    Well powering down and clone the microsd sounds a lot safer. Assumed that the user should always test the backups, the ddfull seems a risk.

  • Assumed that the user should always test the backups, the ddfull seems a risk.

    For the average home user, you would never notice. This is also why I prefer copying at the file level. Your backup may have older files but not partially changed blocks.

    omv 5.6.12 usul | 64 bit | 5.11 proxmox kernel | omvextrasorg 5.6.2 | kvm plugin 5.1.6
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • So you say it's better to shut down and clone right?

    It is better to shutdown. But what I am trying to say is you keep backing up your system by shutting it down say once a month but use the online backup daily, I think you can get the best of both worlds.

    omv 5.6.12 usul | 64 bit | 5.11 proxmox kernel | omvextrasorg 5.6.2 | kvm plugin 5.1.6
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • It is better to shutdown. But what I am trying to say is you keep backing up your system by shutting it down say once a month but use the online backup daily, I think you can get the best of both worlds.

    So in case of disaster the first restore should be from the ddfull and in case it does not work as intended i can use the backup performed shutting down?

  • So in case of disaster the first restore should be from the ddfull and in case it does not work as intended i can use the backup performed shutting down?

    That is what I would do.

    omv 5.6.12 usul | 64 bit | 5.11 proxmox kernel | omvextrasorg 5.6.2 | kvm plugin 5.1.6
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • Maybe this is dumb but i'll try, say i restore and it seems to be working. There is some way to check the system integrity. Just to be sure that issues that could happen after some time are not related to the restore.

    That would be tough because there may be a changed block in a log file or some other non-package file. There is no checksum to know that this is different but it also doesn't cause any problem. I think in 99% of cases, you will know quickly. If your system is too important to risk this, then you will have to keep doing the offline backup. My systems can be recreated easily because there is no data on the OS drive. So, other than an inconvenience and time to recreate, an OS drive failure isn't hard to recover from.

    omv 5.6.12 usul | 64 bit | 5.11 proxmox kernel | omvextrasorg 5.6.2 | kvm plugin 5.1.6
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • ddfull gives you an image you can just write to the media. dd requires you recreating grub (on some systems), mbr, etc, and then write the partition image. So, ddfull is just easier. I kept the dd option because some people have extra data partitions that might be very large that they don't want in the OS backup.

    omv 5.6.12 usul | 64 bit | 5.11 proxmox kernel | omvextrasorg 5.6.2 | kvm plugin 5.1.6
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • ddfull gives you an image you can just write to the media. dd requires you recreating grub (on some systems), mbr, etc, and then write the partition image. So, ddfull is just easier. I kept the dd option because some people have extra data partitions that might be very large that they don't want in the OS backup.

    Thanks a lot!


    So my first backup took 40 minutes. All 32 GB were read and the dd full backup image is less than 2 GB. The microsd is 32 GB. Cloning it after shutdown only took 8 minutes. It's because it's live?


    Two other things:


    -It's ok to manually delete the backup files i assume.

    -i can just copy somewhere else the .ddfull.gz file ignoring the other files generated by the backup process? If yes, why they are needed also after the backup is complete?

  • It's because it's live?

    Probably. The OS is using the OS disk which will make any backup slower.

    It's ok to manually delete the backup files i assume.

    If you want. That functionality is builtin to the backup plugin if you scheduled it. That is what the days to keep is for.


    i can just copy somewhere else the .ddfull.gz file ignoring the other files generated by the backup process?

    I assume you mean a different server? Yes.


    If yes, why they are needed also after the backup is complete?

    They aren't needed for ddfull. They are just helpful files to have for advanced users.

    omv 5.6.12 usul | 64 bit | 5.11 proxmox kernel | omvextrasorg 5.6.2 | kvm plugin 5.1.6
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!