APICe: Servizi e Progetti » Ghetto Backup

ghettoVCB Backup script


GhettoVCB Backup script is a free alternative for backing up VM.

The script will do 

  • Online back up of VM(s)
  • Shutdown guestOS and initiate backup process and power on VM afterwards with the option of hard power timeout
  • Support for multiple VMDK disk(s) backup per VM
  • Supports the following backup mediums: LOCAL STORAGE, SAN and NFS. 
  • is non-interactive and can be setup to run via cron.

The script can me divided in few essential modules: 

  • The script file
  • a configuration file
  • a vm’s list file

The script file already has inside the default configuration settings so, in case the script is runed without a configuration file it will adopt the default settings.

Usage: {

./ghettoVCB.sh -f {vm’s list file here} -g {configuration file here} -l {path to log file here} -d {debug mode (only for debugging)}

through a snapshot for each vm which name is in the vm’s list file and save it in the path specified within the configuration file or in the default settings.
Thanks to the separation of the modules, many combinations can be done such as the backup of some vm’s weekly with a particular configuration and a backup of other ones daily with another settings. This one is the policy adopted for each server inside the lab.

Debug options can be used for testing, specially dryrun mode -d dryrun runs the script without actually touch any vm, this way we can take a look at the configuration process of the script for any errors on the vm’s counting or names, rotation numbers, paths and destinations.

ghettoVCB recovery

Source: http://communities.vmware.com/docs/DOC-10595


} ./ghettoVCB-restore.sh -c{vm’s to restore list file here} -l {path to logfile here} -d {debug mode (only for debugging)} {{/code}}

In order to set up a backup made with ghettoVCB it is necessary to use the {{code}} #";;;"
  2. 1 = zeroedthick
  3. 2 = 2gbsparse
  4. 3 = thin
  5. 4 = eagerzeroedthick
  6. e.g.

    "/vmfs/volumes/datastore_for_backups/backups/examplevm/examplevm-2009-08-18--1;/vmfs/volumes/regular_datastore;1" "/vmfs/volumes/datastore_for_backups/backups/examplevm/examplevm-2009-08-18--1;/vmfs/volumes/regular_datastore;1;RESTORED_VM" {{/code}}

    The script allows to change the name of the restored machine by modifying an entry on the IMPORTANT: After a backup restore it will be necessary to reconfigure the network adapters and IP addresses for the new vm.

Contact Info

APICe Laboratory
Via Venezia, 52
47023, Cesena (FC)

+39 0547 339 205
+39 0547 339 208

Send Mail