GhettoVCB not backing up ESXi 5.0 VMs

backupvmware-esxi

I use ghettoVCB to backup my VMs to a NFS share. When I try and run the script on one of my VMs it fails with the error "Snapshot found for ServerName, backup will not take place!"

The thing is there are no snapshots on that VM!

2013-01-29 15:03:45 -- info: CONFIG - VERSION = 2011_11_19_1
2013-01-29 15:03:45 -- info: CONFIG - GHETTOVCB_PID = 4647292
2013-01-29 15:03:45 -- info: CONFIG - VM_BACKUP_VOLUME = /vmfs/volumes/VMStore/esxi-server1
2013-01-29 15:03:45 -- info: CONFIG - VM_BACKUP_ROTATION_COUNT = 1
2013-01-29 15:03:45 -- info: CONFIG - VM_BACKUP_DIR_NAMING_CONVENTION = 2013-01-29_15-03-45
2013-01-29 15:03:45 -- info: CONFIG - DISK_BACKUP_FORMAT = zeroedthick
2013-01-29 15:03:45 -- info: CONFIG - POWER_VM_DOWN_BEFORE_BACKUP = 0
2013-01-29 15:03:45 -- info: CONFIG - ENABLE_HARD_POWER_OFF = 0
2013-01-29 15:03:45 -- info: CONFIG - ITER_TO_WAIT_SHUTDOWN = 3
2013-01-29 15:03:45 -- info: CONFIG - POWER_DOWN_TIMEOUT = 5
2013-01-29 15:03:45 -- info: CONFIG - SNAPSHOT_TIMEOUT = 15
2013-01-29 15:03:45 -- info: CONFIG - LOG_LEVEL = info
2013-01-29 15:03:45 -- info: CONFIG - BACKUP_LOG_OUTPUT = /tmp/ghettoVCB-2013-01-29_15-03-45.log
2013-01-29 15:03:45 -- info: CONFIG - VM_SNAPSHOT_MEMORY = 0
2013-01-29 15:03:45 -- info: CONFIG - VM_SNAPSHOT_QUIESCE = 0
2013-01-29 15:03:45 -- info: CONFIG - VMDK_FILES_TO_BACKUP = all
2013-01-29 15:03:45 -- info: CONFIG - EMAIL_LOG = 0
2013-01-29 15:03:45 -- info: 
2013-01-29 15:03:47 -- info: Snapshot found for ServerName, backup will not take place

2013-01-29 15:03:47 -- info: ###### Final status: ERROR: All VMs failed! ######

Best Answer

If you look into the ghettoVCB shell script, the way it tries to check if there is a snapshot for a particular VM is by 'grepping' for the string 'delta' in the ESX datastore for the VM.

ls "${VMX_DIR}" | grep -q "\-delta\.vmdk"

1 - manually try to confirm that this file does not exit. Either by sshing to your esxi server or browsing the datastore using VIclient.

2 - use vmware commands to check if there is a snapshot - replace $vmid with the id of the vm

vmware-vim-cmd vmsvc/snapshot.get $vmid

3 - if i encounter such a problem, what i usually do is, I create a new snapshot and then use the 'delete all' to clear all the snapshots. That seems to clear up some partially completed snaps.