x

Agile Insider Blog

How To: Create Online Hyper-V Backup (Snapshots) of VHD Guests From The PowerShell Command Line

Note- This topic covers the use of virtual machine snapshots…which Microsoft does not recommend them as a permanent data or system recovery solution. Virtual machine snapshots are intended mainly for use in development and test environments because they provide a convenient way to store different points of system state, data, and configuration (such as applying a software update, and allowing easy rollback without “restoring the server”). However, there are some inherent risks of unintended data loss if they are not managed appropriately. For more information about virtual machine snapshots, see http://go.microsoft.com/fwlink/?LinkId=133342.

See Planning Hyper-V for Backup for more information of backing up the host or guest operating system.

Snapshot backups offer a simple way to create online snapshots of running guest machines to separate VHD’s.

The machine is running quite happily and has never been snapped. Late on Monday make a snapshot. This does two things

1.If the Machine is running or in a saved state we make a copy of memory

2. We stop writing changes to its VHD and start writing changes to a new AVHD file. (Lets call this AVHD-1)

At any point when we want to revert, we go back to the original hard disk and the Monday memory state. Throughout Tuesday changes are written to the AVHD-1then on Tuesday night we do another Snapshot. The same thing happens

1.If the Machine is running or in a saved state we make a copy of memory

2. We stop writing changes to AVHD-1 file and start writing changes to a new AVHD file. (Lets call this one AVHD-2)

Now we can revert to two points, Monday’s memory state and the original VHD or Tuesdays memory state and the combination of the original VHD and AVHD-1

Lets assume that on Wednesday something happens to cause us to go back to Monday’s state. We can either (a) Keep AVHD-2 and save the memory state as it was on Wednesday or (b) Discard AVHD-2 and memory state. Either way the server now starts a new AVHD file – lets call this one AVHD3. Thursdays changes get written to this, and on Thursday night as before we do another snapshot and start AVHD4 for Friday’s changes and keep the memory state as it was on Thursday.

Now we can apply 3 states (or 4 if we kept Wednesday’s). We often talk about “rolling back” to a snapshot, but here, some of the snapshots we can apply aren’t simply forward or backward, hence Hyper-V talks about applying snapshots.

James O’Neill’s blog : Hyper-v and Snapshots (Part 1)

James O’Neill’s blog : Hyper-v and Snapshots (Part 2)

Leave a comment

Learn More Today

Have questions or want to learn more about the services and solutions Agile IT has to offer?

Schedule a call with us today!

Schedule a Call
or

Request a Quote