hvbackup is a very easy and powerful free tool to backup and restore hyper-v virtual machines, in standalone and clustered (CSV) environments, overcoming all the limitations that a generic tool like Diskshadow provides.
This tool targets windows 2008 (R2) and Windows server 2012 (R2). All the corresponding core and free Hyper-V editions are also supported!
HVBackup supports app consistent and crash consistent backups through the Hyper V VSS writer component integrated in the operating system.
There are quite a few expensive commercial solutions on the market supporting this scenario, but this is the first open source one, based on the research we did before publishing the project.
We integrated this tool in our datacenter's production environment management infrastructure, which means that it undergoes continuous testing in a real world environment 🙂
HVBackup can be invoked from the command line, scripted with powershell or integrated in any .Net program through it's class library.
The backup process generates a separate zip file for each virtual machine in the specified output directory, containing all the files owned by the vm and identified for backup by the VSS Hyper-V provider.
.Net Framework 3.5, which can be easily enabled on the command line.
HVBackup -a -o c:\backup
Performs a full VSS backup (using the HyperV VSS writer) of all VMs on the host.
HVBackup -l VM1,VM2 -o \\yourserver\backup
Performs a full VSS backup of the provided list of VMs (use quotes if the names contain spaces).
In this sample the output directory is on a remote server.
HVBackup -f list.txt -o c:\backup
Performs a full VSS backup of the VMs names provided in “list.txt”, one per line.
How to perform a scheduled backup
Now, as we don't have a scheduled task UI on hyper-v or server core, in order to schedule the previous script every night at 01 AM, just run: