{"id":2237,"date":"2014-04-29T15:40:18","date_gmt":"2014-04-29T07:40:18","guid":{"rendered":"http:\/\/www.se.cuhk.edu.hk\/~hmleung\/wordpress\/?p=2237"},"modified":"2014-04-29T15:51:30","modified_gmt":"2014-04-29T07:51:30","slug":"vmware-esxi-5-1-hot-backup-to-nfs-mounted-usb-storage","status":"publish","type":"post","link":"https:\/\/www1.se.cuhk.edu.hk\/~hmleung\/wordpress\/?p=2237","title":{"rendered":"VMWare ESXi 5.1 Hot backup to NFS mounted USB Storage"},"content":{"rendered":"<p>I use the free tools <a href=\"http:\/\/sourceforge.net\/projects\/xsibackup\/files\/latest\/download\">xsibackup<\/a> from sourceforge to do the hot backup.<\/p>\n<p>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.<\/p>\n<p>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.<br \/>\n<a href=\"http:\/\/www.se.cuhk.edu.hk\/~hmleung\/wordpress\/wp-content\/uploads\/2014\/04\/xsi1.jpg\" data-rel=\"lightbox-image-0\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2249\" src=\"http:\/\/www.se.cuhk.edu.hk\/~hmleung\/wordpress\/wp-content\/uploads\/2014\/04\/xsi1.jpg\" alt=\"xsi1\" width=\"677\" height=\"679\" srcset=\"https:\/\/www1.se.cuhk.edu.hk\/~hmleung\/wordpress\/wp-content\/uploads\/2014\/04\/xsi1.jpg 677w, https:\/\/www1.se.cuhk.edu.hk\/~hmleung\/wordpress\/wp-content\/uploads\/2014\/04\/xsi1-150x150.jpg 150w, https:\/\/www1.se.cuhk.edu.hk\/~hmleung\/wordpress\/wp-content\/uploads\/2014\/04\/xsi1-300x300.jpg 300w, https:\/\/www1.se.cuhk.edu.hk\/~hmleung\/wordpress\/wp-content\/uploads\/2014\/04\/xsi1-160x160.jpg 160w\" sizes=\"auto, (max-width: 677px) 100vw, 677px\" \/><\/a><\/p>\n<p>Then ssh to the ESXI 5.1 host and mount the NFS dir as follows:<\/p>\n<ul>\n<li>NFS-SERVER1 : NFS Server which mounts the USB Storage<\/li>\n<li>\/media\/30064395-c325-4e0a-a4ce-080fbf8e7103 : NFS shared dir<\/li>\n<li>NFSSTORE-01 : Volume Name with mounted NFS share in ESXi host<\/li>\n<\/ul>\n<p>% esxcli storage nfs add &#8211;host=NFS-SERVER1 &#8211;share=\/media\/30064395-c325-4e0a-a4ce-080fbf8e7103 &#8211;volume-name=NFSSTORE-01<\/p>\n<p>To list all volumes mounted in ESXi host:<\/p>\n<p>% esxcli storage filesystem list<\/p>\n<p>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:<\/p>\n<p>% cd \/vmfs\/volumes\/data\/SharedToolsDir\/xsibackup\/<br \/>\n% .\/xsibackup &#8211;backup-point=\/vmfs\/volumes\/NFSSTORE-01\/xsibackup\/ &#8211;backup-type=custom &#8211;backup-vms=&#8221;VM01,VM02&#8243; &#8211;backup-type=custom<\/p>\n<p>After that backup will be saved to NFS storage \/vmfs\/volumes\/NFSSTORE-01\/xsibackup\/<\/p>\n<p>To Test Restore of a backup VM, say VM01, first shutdown existing VM &#8220;VM01&#8221;, remove existing VM &#8220;VM01&#8221; from inventory from Vsphere client.Then ssh to ESXi host and rename the original dir for the VM.<\/p>\n<p>% cd \/vmfs\/volumes\/data\/ ; mv VM01 VM01.ORIGINAL<br \/>\n% mkdir .\/VM01<br \/>\n% vmkfstools -i &#8220;\/vmfs\/volumes\/nfsstore-01\/xsibackup\/\/VM01\/VM01.vmdk&#8221; &#8220;\/vmfs\/volumes\/data\/VM01\/VM01.vmdk&#8221; -d thin<br \/>\n% cp &#8220;\/vmfs\/volumes\/nfsstore-01\/xsibackup\/\/VM01\/VM01.vmx&#8221; &#8220;\/vmfs\/volumes\/data\/VM01\/&#8221;<\/p>\n<p>Logon back to vsphere client, From File Storage Explorer, browse to this newly restore vmx file , and click Add inventory to finish<\/p>\n<p>After finish backup or restore , un-mount the NFS share from ESXi host as follows:<\/p>\n<p>% esxcli storage nfs remove -v NFSSTORE-01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":2249,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-2237","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tech"],"_links":{"self":[{"href":"https:\/\/www1.se.cuhk.edu.hk\/~hmleung\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/2237","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www1.se.cuhk.edu.hk\/~hmleung\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www1.se.cuhk.edu.hk\/~hmleung\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www1.se.cuhk.edu.hk\/~hmleung\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www1.se.cuhk.edu.hk\/~hmleung\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2237"}],"version-history":[{"count":14,"href":"https:\/\/www1.se.cuhk.edu.hk\/~hmleung\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/2237\/revisions"}],"predecessor-version":[{"id":2253,"href":"https:\/\/www1.se.cuhk.edu.hk\/~hmleung\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/2237\/revisions\/2253"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www1.se.cuhk.edu.hk\/~hmleung\/wordpress\/index.php?rest_route=\/wp\/v2\/media\/2249"}],"wp:attachment":[{"href":"https:\/\/www1.se.cuhk.edu.hk\/~hmleung\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2237"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www1.se.cuhk.edu.hk\/~hmleung\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2237"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www1.se.cuhk.edu.hk\/~hmleung\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2237"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}