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.
xsi1

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你好,

    SeeWide特搜網是一個全新互動生活分享平台,集齊各地遊山玩水好去處及講玩講食講生活,讓大家分享不同的生活體驗

    你的網誌十分切合我們網站的主題,內容及相片也很有質素,請問可否讓我們轉載網誌內的相片及內容?(會注明出處及不作改動)

    我們的目的,是盡力網羅優質的相片及內容,建立一個包含豐富資訊的生活分享平台,讓一眾志同道合的網友可更輕易獲得寶貴的參考資料

    希望你能成為我們平台的一份子,助我們更有效地集結豐富不同的好玩好食資訊!

    另外,我們設有「稿費」制度,文章獲得本地瀏覽量,即可兌換稿費!

    我們亦可以你的名義,將稿費捐到香港宣明會,或你指定的慈善機構
    詳情可參閱:http://www.seewide.com/space.php?do=help&essay_id=22#001

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