Hyper-V back up VHD live with PowerShell

11,323

Definitely! Just make a VSS snapshot of the volume, mount it as a drive letter, grab the VHD files, and put them somewhere else. Here's one I wrote a few years back:

http://www.send4help.net/full-backups-of-running-hyper-v-guests-309

If I had to do it again though, I'd follow this method:

http://blogs.msdn.com/b/virtual_pc_guy/archive/2009/03/11/backing-up-hyper-v-with-windows-server-backup.aspx

It enables native-like support for Hyper-V in the default Windows Backup tool.

Enjoy!

Share:
11,323
conners
Author by

conners

Updated on June 04, 2022

Comments

  • conners
    conners almost 2 years

    I've heard people say that you can back up VHD files on Windows 2008 R2 Hyper-V (non clustered) and back them up while the guest is live and running with powershell scripts. Does anyone have any experience of this they can share?

    What kind of back up is it an export? A Snapshot that is made, then copied then reverted? I know there are copious pay-to-use models but this is a test environment and I simply want to know if there is a "weak but functional" way of doing it.

  • conners
    conners over 11 years
    sounds like a plan.. so, use powershell to make a snapshot, mount it (I don't get that bit! :-D) grab the VHD files (how? :D) I like the way you say it though thanks I will get back to you once I have success!
  • Chris N
    Chris N over 11 years
    The two links above provide plenty of detail on both. Like I said, I'd go with the second method and avoid PowerShell/DiskShadow potential hackiness.