Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have setup a ghettoVCB script in order to backup three VM.

I put it in a crontab but I have an issue.

In my backup folder I have 3 different folders, one for each VM.

In each folder I have the following files:

-rw-r--r-- 1 root root 1263 Mar 17 01:51 vm1-2010-03-16--2.gz
-rw-r--r-- 1 root root 1263 Mar 17 00:41 vm1-2010-03-16--3.gz
-rw-r--r-- 1 root root 1261 Mar 18 01:22 vm1-2010-03-17--1.gz
drwxr-xr-x 1 root root 980 Mar 19 23:39 vm1-2010-03-19

The problem is the last folder. It seems that a backup didn't finish the process.

When I read the logs concerning this folder I get:

2010-03-19 23:00:01 -- info: CONFIG - VM_BACKUP_VOLUME = /vmfs/volumes/datastore1/backup/
2010-03-19 23:00:01 -- info: CONFIG - VM_BACKUP_ROTATION_COUNT = 3
2010-03-19 23:00:01 -- info: CONFIG - DISK_BACKUP_FORMAT = zeroedthick
2010-03-19 23:00:01 -- info: CONFIG - ADAPTER_FORMAT = buslogic
2010-03-19 23:00:01 -- info: CONFIG - POWER_VM_DOWN_BEFORE_BACKUP = 0
2010-03-19 23:00:01 -- info: CONFIG - ENABLE_HARD_POWER_OFF = 0
2010-03-19 23:00:01 -- info: CONFIG - ITER_TO_WAIT_SHUTDOWN = 3
2010-03-19 23:00:01 -- info: CONFIG - POWER_DOWN_TIMEOUT = 5
2010-03-19 23:00:01 -- info: CONFIG - SNAPSHOT_TIMEOUT = 15
2010-03-19 23:00:01 -- info: CONFIG - LOG_LEVEL = info
2010-03-19 23:00:01 -- info: CONFIG - BACKUP_LOG_OUTPUT = stdout
2010-03-19 23:00:01 -- info: CONFIG - VM_SNAPSHOT_MEMORY = 0
2010-03-19 23:00:01 -- info: CONFIG - VM_SNAPSHOT_QUIESCE = 0
2010-03-19 23:00:01 -- info: CONFIG - VMDK_FILES_TO_BACKUP = all

http://...

2010-03-19 23:39:35 -- info: Initiate backup for vm1
2010-03-19 23:39:35 -- info: Creating Snapshot "ghettoVCB-snapshot-2010-03-19" for vm1

Destination disk format: VMFS zeroedthick
Cloning disk '/vmfs/volumes/datastore1/vm1/vm1_1.vmdk'...
^MClone: 0% done.^MClone: 1% done.^MClone: 2% done.^MClone: 3% done.^MClone: 4% done.^MClone: 5% done.^MClone: 6% done.^MClone: 7% done.^MClone: 8% done.^MClone: 9% done.^MClone
Failed to clone disk : The file already exists (39).
Destination disk format: VMFS zeroedthick
Cloning disk '/vmfs/volumes/datastore1/vm1/vm1.vmdk'...
2010-03-20 00:46:20 -- info: Removing snapshot from vm1 ...
one: 7% done.^MClone: 8% done.^MClone: 9% done.^MClone: 10% done.^MClone: 11% done.^MClone: 12% done.^MClone: 13% done.^MClone: 14% done.^MClone: 15% done.^MClone: 16% done.^MCl
2010-03-19 23:51:19 -- info: Removing snapshot from vm1 ...

I can't run ghettoVCB anymore because the VM has a snapshot which has not been deleted. I know how to delete the snapshot, but I don't know why the VCB script is not able to handle rotation of the VM backups?

Any ideas?

Thanks!

share|improve this question
    
Do you have an error log from a failed run where the snapshot didn't exist? That's the only way to tell why that backup failed, and the snapshot wasn't deleted. –  Jeff Leyser Jun 7 '10 at 17:35
    
Are you sure you did not run this backup a second time, while the first one was still running? The timestamps don't make sense: 2010-03-20 00:46:20 -- info: Removing snapshot from vm1 ... [...] 2010-03-19 23:51:19 -- info: Removing snapshot from vm1 ... –  exo_cw Jul 6 '11 at 19:05
1  
There is a reason it's called "ghetto" –  Wesley Aug 6 '11 at 21:28
add comment

1 Answer

Consider the Cronjob FAQ here:

i qoute:

Important Note: Always redirect the ghettoVCB output to /dev/null and/or to a log when automating via cron [...] may cause ghettoVCB to stop in the middle of a backup.

This primarily only affects users on ESXi, but it is good practice to always redirect the output.

Hope that helps.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.