VMWare ESXi 5.1 Hot backup to NFS mounted USB Storage

I use the free tools xsibackup from sourceforge to do the hot backup.

An USB external HD is pre-formatted in ext3 format. I plug this external USB HD to the NFS server, and then it will be auto-mounted. Then I share the USB storage as NFS shares and allow the ESXi host (NFS client) able to access to it.

Logon to the VMware Vsphere Client, upload the xsibackup_3.0.1.zip to ESXi host and start up the ssh sevices there. Also configure the Remote Access firewall to allow NFS Client to connect to the NFS server configured above.

Then ssh to the ESXI 5.1 host and mount the NFS dir as follows:

  • NFS-SERVER1 : NFS Server which mounts the USB Storage
  • /media/30064395-c325-4e0a-a4ce-080fbf8e7103 : NFS shared dir
  • NFSSTORE-01 : Volume Name with mounted NFS share in ESXi host

% esxcli storage nfs add –host=NFS-SERVER1 –share=/media/30064395-c325-4e0a-a4ce-080fbf8e7103 –volume-name=NFSSTORE-01

To list all volumes mounted in ESXi host:

% esxcli storage filesystem list

Suppose the xsibackup is unziped and placed in /vmfs/volumes/data/SharedToolsDir/ and now can start hot backup of VMs , says VM01 and VM02, by ssh to ESXi host and run below command:

% cd /vmfs/volumes/data/SharedToolsDir/xsibackup/
% ./xsibackup –backup-point=/vmfs/volumes/NFSSTORE-01/xsibackup/ –backup-type=custom –backup-vms=”VM01,VM02″ –backup-type=custom

After that backup will be saved to NFS storage /vmfs/volumes/NFSSTORE-01/xsibackup/

To Test Restore of a backup VM, say VM01, first shutdown existing VM “VM01”, remove existing VM “VM01” from inventory from Vsphere client.Then ssh to ESXi host and rename the original dir for the VM.

% cd /vmfs/volumes/data/ ; mv VM01 VM01.ORIGINAL
% mkdir ./VM01
% vmkfstools -i “/vmfs/volumes/nfsstore-01/xsibackup//VM01/VM01.vmdk” “/vmfs/volumes/data/VM01/VM01.vmdk” -d thin
% cp “/vmfs/volumes/nfsstore-01/xsibackup//VM01/VM01.vmx” “/vmfs/volumes/data/VM01/”

Logon back to vsphere client, From File Storage Explorer, browse to this newly restore vmx file , and click Add inventory to finish

After finish backup or restore , un-mount the NFS share from ESXi host as follows:

% esxcli storage nfs remove -v NFSSTORE-01

You may also like...

1 Response

  1. TabooCat你好,







    如有任何查詢, 歡迎電郵至: info@seewide.com