Simple backup script for VMWare Workstation.

| December 10, 2009 | Reply

There are more sophisticated ways of doing this, but here is a simple script I’m using to backup my virtual machines. It runs out of cron at 3am on Sundays. I also take snapshots of the VM before any major change.

#!/bin/bash

echo “BACKUP Virtual Machines Initiated”
echo “Suspending running VMs”
vmrun -T ws suspend “/datastore/Virtual Machines/Windows 7 x64/Windows 7 x64.vmx”
echo “Copying VMDKs”
rsync -az “/datastore/Virtual Machines/Windows 7 x64″ “/backup/Virtual Machines”
echo “Restarting suspended VMs”
vmrun -T ws start “/datastore/Virtual Machines/Windows 7 x64/Windows 7 x64.vmx”
echo “Complete”

Tags: ,

Category: Uncategorized

About the Author ()