Windows Blog

VMware Blogs

Backup vm's using ghettoVCB

/opt/ghettovcb/bin/ghettoVCB.sh -g /opt/ghettovcb/ghettoVCB.conf -mVMNAME

Scheduled ghettoVCB using a cron job.

Using the text editor of your choice (e.g. vi ), edit  /var/spool/cron/crontabs/root .
Add a new line containing  0 1 * * * /opt/ghettovcb/bin/ghettoVCB.sh -g/opt/ghettovcb/ghettoVCB.conf -l /tmp/ghettoVCB.log -a > /dev/null .

Save and quit – as this file is typically read-only you may need to force your editor to save
What does this new line do?

At 1am every day, executes the backup command. You can change the time that the backup command is executed by changing the cron expression from 0 1 * * * . If you’re unfamiliar with cron-syntax, you can use a tool such as Cron Maker to generate a suitable cron-syntax.

Uses the configuration file  /opt/ghettovcb/ghettoVCB.conf to adjust how the backup runs.

Outputs a log of the backup process to  /tmp/ghettoVCB.log , which can be viewed later.

Includes all VMs on the host as a backup target. If you only want to backup a specific VM, you can change  -a to  -m VMNAME . To backup a list of VMs, change  -a to  -f/opt/ghettoVCB/vmlist and edit  /opt/ghettoVCB/vmlist so that it contains a list of the VM names you wish to backup, one per line.

Redirects the output of the script to  /dev/null , as some issues have been reported with running ghettoVCB with a cron job when the output isn’t redirected.

Comments