How to shrink your full VM-Backups (Windows/Linux)

How to Backup VMware VMs?

If you’ve no salery cap left, like me. You want to use an Open-Source tool.
I’d love to use GhettoVCB: On Github

I’ll list some usecaeses below.

My environment contains:

  • ESX 6.5
  • NFS-Server


  • Backup VMs including a list:
$ ./ -m "<VM name>" -g /opt/ghettovcb/conf/backup.conf
  • Backup VMs with an excluding list:
    - vm2 and vm4 will be backed up
    - vm1, vm3 and vm5 will be excluded from the Backup
$ cat vm_exclusion_listvm1
$ ./ -a -e vm_exclusion_list
  • Backup all VMs on ESX:
$ ./ -a -g /opt/ghettovcb/conf/backup.conf

If your backup is bigger than your used diskspace than you’ve junk left on your harddrive (which was alread deleted).


$ df -hd 1
336G ./jenkins-2018-04-15

In this case, you’ve to override it with zeroes, to make your thin-provisioned disk small again.

To do so you just have to type the following command:

Single partition systems:

$ df -h ; time dd if=/dev/zero of=/EMPTY ; df -h ; time rm -f /EMPTY


Download sdelete (windows utility)

$ sdelete -z c:

Multi partition systems:

$ dd if=/dev/zero of=/var/EMPTY ; df -h ; time rm -f /var/EMPTY

If you now backup again, you’ll see that only mostly your used diskspace will remain in your backup.

After overriding the free space with zero’s:

$ df -hd 1
336G ./jenkins-2018-04-15
292G ./jenkins-2018-04-16

Working as a IT-Operations engineer at NeXenio, a spin-off by Hasso-Plattner-Institute for products around a digitial workspace.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store