{"id":581,"date":"2012-06-18T00:00:57","date_gmt":"2012-06-18T00:00:57","guid":{"rendered":"http:\/\/emtunc.org\/blog\/?p=581"},"modified":"2012-11-13T20:42:16","modified_gmt":"2012-11-13T20:42:16","slug":"backing-up-an-esxi-5-guest-vm-by-exporting-to-ova-ovf-template","status":"publish","type":"post","link":"https:\/\/emtunc.org\/blog\/06\/2012\/backing-up-an-esxi-5-guest-vm-by-exporting-to-ova-ovf-template\/","title":{"rendered":"Backing Up an ESXi 5 Guest VM by Exporting to OVA\/OVF Template"},"content":{"rendered":"<p>ESXi acts as a really flexible and powerful monster of an operating system which can easily divvy up your server&#8217;s physical hardware in to virtualised components. These components can then be shared among tens of virtual machines depending on how you&#8217;ve set things up.<\/p>\n<p>Although flexible and powerful, I could not find any straight forward back-up guides for backing up my virtual machines.<br \/>\nSnapshots are in no way shape or form back-ups so that is out of the question. I did take a look at copying the VMs out of the data store either through the vSphere client or SSH but that is a bit messy.<!--more--><br \/>\nThere&#8217;s a tool I came across called <a title=\"ghettoVCB article on VMWare\" href=\"http:\/\/communities.vmware.com\/docs\/DOC-8760\" target=\"_blank\">ghettoVCB<\/a> &#8211; it actually seems like quite an advanced and (potentially) flexible shell script, however it looks like it would take some time to set-up. I may give this a try later down the line and blog about it if I think it will be useful.<\/p>\n<p>After a bit of searching around, I found an inbuilt function in the vSphere client which allows you to export and import OVF templates. After a bit of searching around, I saw people asking similar questions as to whether you can use these as back-ups; there were no definitive answers but after thinking about it, I can&#8217;t see why not?<\/p>\n<p>OVF (<a href=\"http:\/\/www.vmware.com\/technical-resources\/virtualization-topics\/virtual-appliances\/ovf\">Open Virtualization Format<\/a>) templates are most used as &#8230; *surprise* &#8230; VM templates.<br \/>\nThey can be used to take a full dump of a virtual machine in its current state and export it to a file (OVA) or folder of files (OVF). This allows you to store the export somewhere safe and deploy it on the same or other ESXi host as you wish.<\/p>\n<p>I was actually quite surprised as to how easy the entire end-to-end process was. I was expecting it to take me a day or two (seeing as I&#8217;ve never backed up\/restored a VM) but it actually ended up taking only two hours.<\/p>\n<h2>The Process to Back-up &#8211; Manual<\/h2>\n<ol>\n<li>Open your vSphere client<\/li>\n<li>Turn off the VM you want to back-up<\/li>\n<li>Delete and consolidate any snapshots you may have<\/li>\n<li>Highlight the VM in the left pane<\/li>\n<li>Click File &#8212; Export OVF Template<\/li>\n<li>Give your export a name, location to export to and whether you want it in single file or multi file mode. <strong>Folder of files (OVF)<\/strong> mode should be used if you want to later deploy the VM over a web server. <strong>Single file (OVA)<\/strong> mode should be used if it doesn&#8217;t need to be published via a web server. Use if you want to transfer over USB, back-up to some other storage, et cetera.<\/li>\n<\/ol>\n<h2>The Process to Restore<\/h2>\n<ol>\n<li>Open the vSphere client<\/li>\n<li>Click File &#8212; Deploy OVF Template<\/li>\n<li>Locate the .ova file or input the URL where the .ovf is stored<\/li>\n<li>Click Next and input name of the new VM and other fields as necessary<\/li>\n<\/ol>\n<h2>The Process to Back-up &#8211; Automatic\/scripted<\/h2>\n<p>I haven&#8217;t looked in to automating the back-ups as of yet but I plan on using the <a href=\"http:\/\/www.vmware.com\/support\/developer\/vcli\/\"><em>vSphere Command-Line Interface<\/em><\/a> to script the entire back-up process.<\/p>\n<p>Subscribe to the blog so you are notified when I post new ESXi related articles \ud83d\ude09<\/p>\n","protected":false},"excerpt":{"rendered":"<p>ESXi acts as a really flexible and powerful monster of an operating system which can easily divvy up your server&#8217;s physical hardware in to virtualised components. These components can then be shared among tens of virtual machines depending on how you&#8217;ve set things up. Although flexible and powerful, I could not find any straight forward [&hellip;]<\/p>\n","protected":false},"author":32,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"footnotes":""},"categories":[1],"tags":[70,68,69,71],"class_list":["post-581","post","type-post","status-publish","format-standard","hentry","category-tech","tag-backup","tag-esxi","tag-vmware","tag-vsphere"],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1trTO-9n","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/emtunc.org\/blog\/wp-json\/wp\/v2\/posts\/581","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/emtunc.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/emtunc.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/emtunc.org\/blog\/wp-json\/wp\/v2\/users\/32"}],"replies":[{"embeddable":true,"href":"https:\/\/emtunc.org\/blog\/wp-json\/wp\/v2\/comments?post=581"}],"version-history":[{"count":3,"href":"https:\/\/emtunc.org\/blog\/wp-json\/wp\/v2\/posts\/581\/revisions"}],"predecessor-version":[{"id":614,"href":"https:\/\/emtunc.org\/blog\/wp-json\/wp\/v2\/posts\/581\/revisions\/614"}],"wp:attachment":[{"href":"https:\/\/emtunc.org\/blog\/wp-json\/wp\/v2\/media?parent=581"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/emtunc.org\/blog\/wp-json\/wp\/v2\/categories?post=581"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/emtunc.org\/blog\/wp-json\/wp\/v2\/tags?post=581"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}