Big size of backup file

fintnovo

Renowned Member
Jan 4, 2014
23
0
66
Good day,
I have VM with 120 Gb virtual disk:
upload_2018-7-27_10-48-4.png
Guest operating system (ubuntu linux 12.04 Lts) use only 3,4Gb of disk storage.
But backup file of VM is 26Gb! (with LZO compression)
If I use gzip type compression size of backup file is 17,5Gb
How to reduce size of backup file?

Why backup file size 5-6 times more, than real guest OS data?
 
Unless you use 'fstrim' inside the VM, the file system may contain random garbage and will increase backup size.
 
If TRIM is not supported (due to missing discard option or storage backend that does not support trim), you can use this:

Code:
dd if=/dev/zero of=zero bs=64k; sync; sync; sync; rm -f zero

for every real fs based mountpoint.