[windows2000] Re: [THIN] Download Pick: New Version of Veem FastSCP

  • From: "Robert K Coffman Jr. -Info From Data Corp." <bcoffman@xxxxxxxxxxxxxxxx>
  • To: <thin@xxxxxxxxxxxxx>, <windows2000@xxxxxxxxxxxxx>
  • Date: Wed, 9 Apr 2008 21:33:16 -0400

 > however the VM must be powered off to back it up 
 
Negative Ghost Rider, add a redo file and you can then backup a running VM
on ESX, something like so:
 
#!/bin/bash
#predefined NFS share we backup to
mount /root/vm_citrix
sleep 10
 
#vmfsdir is a text file with the full vmfs path to where the VMs are stored.

while read pathname
        do
                vmfspath=$pathname
        done < vmfsdir
 
# vmlist is a text file with the name of the VM (and vmfs subdir, which must
match or this script must be modifed)
while read vmname
        do
                clear
                cd /vmfs/volumes/$vmfspath/$vmname/
                pwd
                echo starting $vmname
                echo Adding Redo File..
                vmware-cmd /vmfs/volumes/$vmfspath/$vmname/$vmname.vmx
createsnapshot backup
                sleep 30
                # I use bzip2 to compress the backup file, seems to do a
better job than gzip
                echo creating bzip2 archive.
                rm /root/vm_citrix/vm_backup/$vmname.bz2.old
                mv /root/vm_citrix/vm_backup/$vmname.bz2
/root/vm_citrix/vm_backup/$vmname.bz2.old
                bzip2 -c -k -z -9 $vmname-flat.vmdk
>/root/vm_citrix/vm_backup/$vmname.bz2
                echo Committing Redo
                vmware-cmd /vmfs/volumes/$vmfspath/$vmname/$vmname.vmx
removesnapshots
                sleep 30
                echo Done.
        done < vmlist

Hope this helps someone and I'm all ears for feedback/improvements (like
incorporating FastSCP).
 
- Bob Coffman

Other related posts:

  • » [windows2000] Re: [THIN] Download Pick: New Version of Veem FastSCP