One of the benefits of virtualized systems is the portability of the guest machines. At their core, they are nothing more than a collection of files. What the guest machines believe to be their “hard drives” are actually .VHD files. Their “hardware components” are determined by a list stored in an XML file. At this time, the files can’t simply be copied from one point to another without some fairly involved work, but the “Export” command can be used to prepare the VM and copy its data to another location. This also provides a rudimentary form of backup. 

Import Hyper-V Virtual Machine

To download a free PowerShell script to automate exports of Hyper-V VMs then please check out this blog article – http://www.altaro.com/blog/free-download-powershell-script-for-hyper-v-export/
 

The Drawbacks of Export as Backup

There are really only a few places in which the Export function makes sense to use a backup solution. If your budget is extremely tight, Exports can be made to work, but should be considered a temporary solution at most. If you can get by with a “Gold Master” exported image that only rarely needs to be updated, Export is a viable option. For all other situations, use an actual backup solution.

The drawbacks:

  • Cost savings are minimal; Hyper-V backups are often priced per-host, not per-VM, so you can probably back up all your virtual machines for a few hundred dollars per year. Once you factor in the extra effort it takes to manage exported VMs instead of a professionally developed backup application, you’ve probably lost money.
  • The virtual machine must be shut off or saved for the duration of an export. None of the benefits of online VSS snapshots can be leveraged.
  • The VM doesn’t know anything happened, so no files are marked as archived and no databases are committed. Your SQL and Exchange logs won’t be flushed.
  • With default permissions, the export function cannot copy .VHD files to a network share or mapped drive. You must target all VMs to a local storage unit (iSCSI and Fibre attached LUNs count as long as they have been assigned drive letters). The workaround is either to modify the security on the target share and (if applicable) NTFS volume such that the computer accounts of your Hyper-V host(s) have read/write permissions, or you have to run the Hyper-V service on the host(s) as an account with privileges to read/write at that location. The latter is definitely not recommended in most cases because it introduces fragility in the event that the account can’t be validated for some reason. Depending on your environment, it is possible that neither way can be implemented.
  • Exports are not automated at all. You will need to remember to manually run them or set up scheduled tasks to run scripts. There’s nothing wrong with scripting, but the amount of time put into building and maintaining a decent script is another risk and cost factor to balance against simply purchasing a backup solution.
  • Export provides none of the advanced capabilities of modern backup software, such as delta differencing storage, de-duplication, or compression.
  • There’s no meaningful level of support available for export/import as a backup solution like there is with paid backup software.
  • Export can be somewhat fragile. Its initial design concept was that it would be done manually and overseen by an administrator. If it fails, it fails.
  • There is no mechanism for the restoration of individual files. The best option is to manually mount the VHD and use the mounting computer as an interim copy location.
  • Proper backup software provides for some method of a controlled, repeatable restore. The import function is not the same. It does bring the virtual machine back in the exact state that it was in at the time the export was taken, but if you forget to designate it as a “Copy” import, Hyper-V will run it from the export location and you’ll have to perform another export if you want to move it.

Is Export All Bad?

Export isn’t a bad tool; it just isn’t robust enough to be the best solution for backup. Since it has no grand interface, it can be the fastest way to make a one-off copy of a virtual machine – a scenario which is often perfect for a development or test environment. Export also has the ability to export a snapshot as an entire VM, so testing environments can be copied and distributed fairly rapidly. However, facilities that don’t perform development or detailed testing won’t gain nearly as much purpose out of them and should strongly consider utilizing a proper backup solution.

To download a free PowerShell script to automate exports of Hyper-V VMs then please check out this blog article – http://www.altaro.com/blog/free-download-powershell-script-for-hyper-v-export/ 
 

Is Your Office 365 Data Secure?

Did you know Microsoft does not back up Office 365 data? Most people assume their emails, contacts and calendar events are saved somewhere but they're not. Secure your Office 365 data today using Altaro Office 365 Backup - the reliable and cost-effective mailbox backup, recovery and backup storage solution for companies and MSPs

Share this post

Not a DOJO Member yet?

Join thousands of other IT pros and receive a weekly roundup email with the latest content & updates!

4 thoughts on "Using Hyper-V Export for Backups"

Leave a comment or ask a question

Your email address will not be published. Required fields are marked *

Your email address will not be published. Required fields are marked *

Notify me of follow-up replies via email

Yes, I would like to receive new blog posts by email

What is the color of grass?

Please note: If you’re not already a member on the Dojo Forums you will create a new account and receive an activation email.

Related posts