Backing up Hyper-V guests / vhdx

Are there any advanced options that are a good idea to add when backing up a handfull of Hyper-V guests?

Is there any difference if I backup either by:

  • choosing a Hyper-V guest under the Hyper-V icon/tree
  • manually selecting the vhd/vhdx files plus vmrs/vmcx files by browsing disks and folders?

(Maybe if a guest adds or moves it’s vhds the first way of doing things will still pick up the correct files and the latter way of doing things will not of course)

Thx all!!

Disclaimer - I have never tested Duplicati for doing Hyper-V backups - I didn’t even know it could.

But I may be able to answer your question from a more generalized backup point of view, as I have experience with other backup products and Hyper-V (Commvault, DPM, Backup Exec, Veeam, etc).

If you protect the VHD files direectly, you will be getting crash-consistent copies of those hard disks. You will not back up VM configurations themselves. And as you pointed out, if the VHD files moved your backups would need to be reconfigured. If you had a server failure you’d have to configure Hyper-V, recreate the VMs, and then attach the restored VHD disks to the VMs.

If you are working with a Hyper-V-aware backup product, it’s almost always better to select the VMs themselves from the Hyper-V selection tree in the backup program. This will ensure all associated data for the VM is backed up: its configuration, VHD files (where ever they may be located), etc. Also the disks can be backed up in an application-consistent state instead of just crash-consistent (think of a clean shutdown vs dirty shutdown).

No idea if Duplicati can interface with Hyper-V in a way to actually achieve application-consistent backups. Would be cool if it were the case.

Thx for your reply!!

I toally agree that backing up VHD files when the guests are running is not a good idea.

But backing up a whole Hyper-V guest using VSS and temporarily saving or pausing it should be ok, I presume that is what Duplicati does when I use the built in “backup-hyper-v-guest” option instead of backing up individual VHD files?

And so then I wondered if backing up individual VHD files would also use VSS and also temporarily pause or save the status of the process using/locking the file. I’d guess it’s not doing it the same way, that Duplicati doesn’t notify the guest in this case which it probably does when backing up the guest as a whole. And if a guest has multiple VHDs and they are shadow copied at different times (doing one file at a time) things would get veeeeery interesting.

What I’m looking for is a solution to exclude one single VHD file (huge huge storage volume) from a server when backing it up. Hence my train of thought… :slight_smile:

I can definitely cope with backups of only VHDs and not the Hyper-V configs. The guests are all very basic and it only takes a few minutes to set them up using the VHDs only.