Dela via


Hyper-V snapshots are for rollback, not backup/recovery

I try to hit on this point in every Hyper-V presentation.  Snapshots are GREAT for maintenance and roll-back, but they are very, VERY different than what you might be currently using as “snap-mirrors” on your SAN environment.  The similarities in syntax have lead to some understandable misunderstanding.  (how’s that for prose)

Snapshots are storing all changes out to .AVHD files.  Yes, you can expect these AVHD files to grow over time because only “reads” are now being drawn from your original VHD, all “writes” are now going in to the .AVHD file for your current position.  That’s why it is important to consider where you are going to store snapshots.  This value is configured in the properties of each virtual machine.  If you are planning to take a snapshot and make changes that involve a lot of incoming data, you will want to first make sure your volume has enough free space available for this data  until you are ready to delete the snapshots which will merge your changes back in to your original VHD.

So you are about to apply some change to a file server vm.  You take a snapshot:

  • Everything goes well, you can delete the snapshots and all changes are merged back in, you now have one VHD file to manage.
  • Something goes wrong, you can hit “Apply” on the date and time (or name) for the point you want to restore back to.  The .AVHD file is kept but the machine boots from the original VHD storing changes to a new file.  The snapshot storing the “things that went wrong” is still available if you ever need to “roll forward” as you will see in the console.  When you are done, you can delete all snapshots and all changes in your current hierarchy are merged back in.  You now have one VHD file to manage.

Notice that in either case, when the maintenance for my VM is complete I DELETE the snapshots so changes are merged.  You might even consider checking the snapshots location after the merge is complete to ensure nothing is waiting for a VM reboot to finish merging active files.  Why is this important?

Let’s assume my datacenter has been completely wiped out by natural disaster.  Also assume I have not setup Windows Server 2008 to cluster my VMs across physical locations and my only recovery option is off site VHD file backups.  I can take my VHD file and from any server running Hyper-V I can boot that VM and be back up and running in seconds.  If I have snapshots still in place, I have to restore the host and then restore my VM to that host with the original configuration so my snapshot is still available when the machine boots.  Otherwise I risk losing some data.

If you find yourself in the second case and are searching for any possible solution, see this community article.  Although this would not be technically on the “support” list, it may be your shortest path out of a bad situation.

Community Link: How to Manually Merge Hyper-V Snapshots Back into one VHD
https://blog.networkfoo.org/?p=384

Comments

  • Anonymous
    January 01, 2003
    Microsoft blogger Michael Greene presents a smart article debunking the myth that Hyper-V snapshots are an effective solution for server backup and recovery. He writes: Snapshots are GREAT for maintenance and roll-back, but they are very, VERY different

  • Anonymous
    March 23, 2011
    The comment has been removed

  • Anonymous
    July 15, 2013
    Hi vinod, I have a same problem, did you fix this problem or not, please write any answer...