Backup VMs between two VMware ESX servers using just NFS, SSH and VCB utilities

Backup VMs between two VMware ESX servers using just NFS, SSH and VCB utilities

PHASE 1

  • Setup NFS

  • Setup SSH RSA login

  • Setup mailx

  • Setup host,username,password in /etc/vmware/backuptools.conf

PHASE 2

Create vcbBack.sh (on masteresx)

#

VMIMBK=/vmimages/vmbk

mount slaveesx:$VMIMBK $VMIMBK

rm -rf $VMIMBK/$1

vcbMounter -a name:$1 -r $VMIMBK/$1

umount $VMIMBK

Create vcbRes.sh (on slaveesx)

#

VMIMBK=/vmimages/vmbk

CATALOG=$VMIMBK/$1/catalog

echo $CATALOG

sed 's/masteresx\.com/slaveesx\.com/' $CATALOG > $CATALOG.rest

vcbRestore -s $VMIMBK/$1 -a $CATALOG.rest -b overwrite

Create vcbCron.sh (on masteresx)

#

/root/vcbBack.sh $1

ssh slaveesx -c "/root/vcbRest.sh $1"

Create cronjob

#

0 * * * * /root/vcbCron.sh myvm1 | smtp=upstream /usr/local/bin/mailx -s "<subject>" <name@domain>

Sit back and enjoy being a SysAdmin

Comments

hey thats exactly what I am trying to do , one thisn I am having trouble with is via NFS

I try to export the VMFS partition and get this error when I try to mount it.

Feb 2 11:43:49 engr-vserv2 rpc.mountd: getfh failed: Operation not permitted

which when I google it talks about XFS not being mountable via NFS I wonder if VMFS is similarly problematic,

you cant mess with the /vmfs partition directly always vsbmount them to your NFS share

 


regards

clive (aka osde.info)

http://www.vizz.info

Version history
Revision #:
1 of 1
Last update:
‎02-20-2009 02:07 PM
Updated by: