OMV backup creates >25GB dd images despite system partition <5GB full

  • I guess the subject line sums it up.


    I have OMV living in a 32GB partition on a 250GB SSD, and a backup running weekly to dd the system to a folder on my HDD RAID.

    The first few backups (after freshly installing OMV) resulted in image files of 6GB, 11GB, and then 13GB in size. Now they've ballooned to an average of 24-25GB.


    This isn't really a problem for me, as I have ample space, but as the actual filesystem usage in OMV is shown to be less than 5GB, I just wonder why the images are so large (especially since they're compressed .gz files). Something to do with unused space on the SSD not being TRIMmed, maybe? Is there something I can do about it?

  • cubemin

    Changed the title of the thread from “OMV backup creates >30GB dd images despite system partition <5GB full” to “OMV backup creates >25GB dd images despite system partition <5GB full”.
  • my understanding:

    dd is doing a bit-by-bit (or block-by-block) copy of the filesystem. This is done for actually used data but also for free space and deleted data. If the unused data are mostly Zeros the compression works very good, but deleted data do not compress well. Benefit: you could still restore deleted files.

    To reduce the size of the backup you could write zeros to the space of deleted data, but this will greatly increase the bytes written to the drive. So not a good idea.

    You could also use a different method like fsarchiver.

  • You're right. I suppose I'm spoiled by the way Windows imaging software takes a volume snapshot and only copies blocks in use by the filesystem, not a forensic image of the entire partition.

    I guess I was just more surprised that unused blocks on my OMV (ext4) partition (which is to say, non-zero blocks) piled up so quickly. Must be a result of log file rotation and temp files, etc.

    I'll look into fsarchiver etc. and see if they suit my needs better. Thank you. :)

  • You're right. I suppose I'm spoiled by the way Windows imaging software takes a volume snapshot and only copies blocks in use by the filesystem, not a forensic image of the entire partition.

    Clonezilla does that as does fsarchiver and borgbackup. Pretty sure no one wants the backup plugin to zero all free space before doing the dd backup.

    omv 5.6.9 usul | 64 bit | 5.11 proxmox kernel | omvextrasorg 5.6.2 | kvm plugin 5.1.5
    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!

  • I'm not in the habit of resurrecting old threads, but just wanted to mention I happened across a solution to the issue of overly large 'dd' backup files (while doing something completely unrelated). ^^


    Turns out my SSD hasn't been TRIMmed since the system was first installed because the fstrim.timer service was disabled. So I issued systemctl enable fstrim.timer (for those unaware, this sets up a weekly TRIM of all existing filesystems every Monday at midnight).


    I also ran systemctl start fstrim.service to immediately TRIM my SSD and then ran a new backup. Bam! Much, much smaller now and reflecting the actual filesystem usage of my system. :)

  • cubemin

    Added the Label resolved

Participate now!

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