VZDUMP backup size too big

Darkhunter

New Member
Aug 21, 2015
19
1
1
Hello,
I have virtual, where are backups stored. I deleted all the backups and left only clean debian.
It has 600GB disk and now it uses about 4GB.
When I backup it, backup has about 220GB.
Why is that backup so big?
Does it backup even free space?
 
I suppose you use qcow2?

It's a sparse file system, so it needs only that much space as there is data written (plus a little bit overhead).
When you delete files the disk images doesn't shrinks automatically, as the data is there the guest OS probably only marked it as free space but didn't zeroed it all out, which is only logical on physical disks as (security reasons aside) it won't be needed to zero it out.
Now qcow2 doesn't knows what space is really marked free from the guest system, so it doesn't shrinks and vzdump backups everything which isn't only zero, thus the bigger backup size.

I hope you could follow me, more or less...:D

What you can do now is filling the remaining space with big zero file, then deleting it and then shrinking the virtual disk with a qcow2 command, backup are welcome on this process.

See: https://pve.proxmox.com/wiki/Shrink_Qcow2_Disk_Files#Linux_Guest_Preparaton
 
  • Like
Reactions: Atila Vasconcelos