Creating ESXi snapshot backups with ghettoVCB.sh

July 2nd, 2009

This is the second post in a series regarding the backup of ESXi Virtual Machines.  Once you’ve got ssh and ftp access sorted you’ll be able to connect remotely to the ESXi host and run scripts (which use the ESXi command line) to automate certain tasks.

One of the best scripts out there for backing up ESXi hosts is called ghetto.vcb You can find out more about the script here:

http://communities.vmware.com/docs/DOC-8760

So, here’s how to set this up

Stage 2 – implementing the ghettoVCB.sh script.

1. First of all, download the ghettoVCB.sh script, and the example file vmbackup

2. Now, you’ll need to ftp these files to you ESXi host (If you haven’t already enabled ftp access, you can find my guide on how to do it here http://www.rancidswan.com/?p=4)

3. Now, ssh to your ESXi host and edit the ghettoVCB.sh file. There are a number of options at the top of the file, but not many, and they should all be fairly self explanatory. Just for testing you can set the path of the backup location to be somewhere on the ESXi host itself. Later I’ll be writing a guide on how to setup an NFS share on a Windows 2003 server so that these snapshot backups can be pushed directly to a windows machine.

4. You’ll also need to edit the file I’ve called vmbackup. This file purely contains just the name of the machine you want to backup (note: it’s the machine’s Virtual Machine name, not it’s Computer name you use, the name has to be understandable by the ESXi host)  You can have multiple machine names if you wish, with distinct names on each line, but personally I’d recommend just having one name in the file, this will make it easier to automate individual machine backups later on)

5. OK, now you’ll need to set the permissions on the file ghettoVCB.sh like this:

chmod 777 ghettoVCB.sh

5. Now, to run the script, you simply need to write:

./ghettoVCB.sh vmbackups

The script will now run and either show a progress meter, or show you any error messages you might need to tackle!


One Response to “Creating ESXi snapshot backups with ghettoVCB.sh”

  1. Automating VMWare ESXi snapshots through Scheduled Tasks at Technology Daily on July 7, 2009 2:15 am

    [...] Automating VMWare ESXi snapshots through Scheduled Tasks July 7th, 2009 [...]

Trackback URI | Comments RSS

Leave a Reply

Name (required)

Email (required)

Website

Speak your mind