how to make free space sparse for backup?

CadilLACi

Renowned Member
Sep 20, 2016
15
0
66
44
Hello!

I am backing up a file server vm on a very old node(Celeron J1900).
The VM has a 3TB virtual hard disk. I move what data I could off from this vm, making the virtual disk almost empty.

Still, the backup takes a loooong time it seems, and sparse is 1-2%.

Should I install secure -delete and do an

sudo sfill -lvz

to overwrite the free space I made on the hard drive with zero-s so that sparse would go up, and backup finishes faster?


Is doing "sudo sfill -lvz" a recommended practice before backups, if the vm has lots of free space?
 
Hi,
I think you just need to use to enable the Discard flag on the VM's disk (can be done with e.g. Edit in the web-UI) and then use fstrim -av inside the VM. I don't think using sfill is needed.