You might have seen our solution for Hyper-V Backups – which involves imaging the host, and using the BackupAssist Granular Restore console to be able to “dig down” into the backups and into the guests to retrieve individual files and folders.
However, I have been asked the question, “what if I only want to protect one or two VMs”?
Another client even posed the scenario – “I have a standby server, and want to copy the VMs from my main server to standby server every day, so should something go wrong, I can flick a switch and run the VMs on the standby.”
The important file to copy across is the VHD file – the virtual hard disk of the Guest VM. If you copy that across to another location – either your backup device or a standby server – then you will have a valid backup and snapshot of the Guest VM.
However, a normal copy program won’t do, because it isn’t VSS aware, and won’t tell Hyper-V to commit itself. However, the BackupAssist File Replication Engine is VSS aware and Hyper-V aware, and can certainly be used to protect individual VMs by copying the VHD files.
1. Set up a File Replication job
2. Use the Mirror scheme if you only want to keep the last copy, or a scheme with history
3. Select the appropriate VHDs to replicate.
4. In the Open Files tab, you need to enable the VSS writers (so Hyper-V is properly committed for backup)
Additionally if you are backing up to a standby server:
5. The destination path of the VHDs will be important. In the Replication options, you need to uncheck the “use full path” option so that we don’t put the VHD into a special path based on the source directory.
When setting up the destination, then you need to be careful to specify the destination directory accurately so that the VHD goes into the correct location. Our File Replication Engine will use the common “root” path – for example, if there are the source files:
Then on the destination, you’ll get:
6. Now, on the standby Hyper-V server, you’ll need to create another copy of the virtual machine with identical settings. This is because it’s not possible to copy the VM settings from the original Hyper-V Host to the secondary host – it’s only possible to copy the VHD. I wrote more about this here: http://www.backupassist.com/blog/support/granular-individual-vm-restore-of-hyper-v-virtual-machine-from-backup/
If you are backing up to a backup device, then you need to be aware of your restore options:
– Restore to the same Host – copy the VHD back
– Restore to a different Host – copy the VHD to new host and create a new VM, using the existing VHD as the hard disk
– Please see http://www.backupassist.com/blog/support/granular-individual-vm-restore-of-hyper-v-virtual-machine-from-backup/
Note: These instructions assume that Hyper-V Snapshots are not used! We recommend against using Hyper-V Snapshots as they can impact performance, and they are not a real backup. However, if you do have snapshots, you need to back up and restore all the VHD files (and the AVHD files, which are differencing hard disks).
I hope this helps!