How to Automate/Script backup of a Virtual Machine

Posted on

QUESTION :

I’ve got a VMware ESX server running some VMs that do some important stuff for me.

I’d like to create a Scheduled Task in Windows that will periodically make a copy of those VMs and store them somewhere for backup purposes.

I figure at the very least a batch script could drive this, but I’m not sure what commands I can use to invoke this. I bet VMware has a utility for this.

Can someone please toss me the name of such a command-line tool? Or perhaps some other solution that sounds like it’d meet my needs?

Much thanks!

ANSWER :

There is a free script that you can run on the ESX/i server that will snapshot the running VMs (or shut them down for backup) – this is probably the best way to do what you want; we are running this script on three production servers and it’s really easy to use.

ghettoVCB.sh – Free alternative for backing up VM’s for ESX(i) 3.5, 4.x+ & 5.x

This script performs backups of virtual machines residing on ESX(i) 3.5/4.x+/5.x servers using methodology similar to VMware’s VCB tool. The script takes snapshots of live running virtual machines, backs up the master VMDK(s) and then upon completion, deletes the snapshot until the next backup.

This script has been tested on ESX 3.5/4.x/5.x and ESXi 3.5/4.x/5.x and supports the following backup mediums: LOCAL STORAGE, SAN and NFS.

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

Leave a Reply

Your email address will not be published.