Skip to main content
Sign In
San Diego Computer & Network Consulting Experts 
Go Search
 
Home
Our Microsoft Expertise
Our Services
Microsoft Solutions Blog
About Gilham Consulting
Contact Us
Support Portal
  

 

z
Home > Gilham Consulting Microsoft Notepad > Posts > How To: Create Online Hyper-V Backup (Snapshots) of VHD Guests From The PowerShell Command Line
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 thingsHyper-V-Snapshots

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)

Comments

Snapshots are not a replacement for Backups

I'm sure you're aware of this, but this post implies otherwise. I'd caution reader to please continue regular backups and add Snapshotting technology to your overall strategy. If you're curious what could happen, here's one example

http://www.networkworld.com/community/?q=node/24806&nlhtmn=rn_021208&nladname=021208
at 5/20/2008 10:55 AM

Great Point

A few comments about his experience...

As the comments point out, Hyper-V snapshots are a way provide high speed recovery of failed software failures (a bad windows update from last night, application database upgrade, etc.).  Like Windows 2003 (0r 2008) Volume Shadow Copy Services which caches "previous versions" of files...you can't just rely on that for a backup solution in hardware failures or DR solution.

Another note is the online backup solution he uses doesn't support VSS which is the Microsoft approved backup API solution requirement for consistent backups of virtual machines.  A solution like EMC's Mozy work well for this...but i's a little bit pricier then his current solution.

More Info on Mozy:
http://www.gilham.org/Pages/Online-Hosted-Online-Microsoft-Server-Desktop-Backup-Solution-Exchange-Sharepoint-SQL-Service.aspx

A more traditional local disk or tape based solution would also work...Microsoft DPM 2007 or Veritas Netbackup are a VSS API aware backup tools.

John Gilham at 5/20/2008 12:03 PM

Automated Backup Script (No Snapshots)

Hi, I found your article while searching for a backup script that would shut down my virtual machines, backup my vhd files, and then power on the VMs again.  I couldn't find one, so I created my own:

http://bunkerhollow.com/blogs/matt/archive/2008/09/24/hyper-v-vm-backup-script-batch-file.aspx
at 9/25/2008 8:23 AM

How we automated our hyper-v backups

after browsing around for some time we found a tool that can move our images off-site to another backup server (which we also operate, so we wanted to keep the data private rather than using an online service we don't really trust). It's called backupchain, hope this helps!
at 3/17/2010 6:36 AM

Add Comment

Items on this list require content approval. Your submission will not appear in public views until approved by someone with proper rights. More information on content approval.

Title


Body *


CommentUrl


Attachments

 Latest Reader Comments

OCS 2007 R2 support for SQL 2008 DB mirroringSQL Server 2008 Mirroring in Standard Edition
what about iPhone 4.0?Configuring Exchange Server 2007 ActiveSync for iPhone OS 3.1 (and prior)
CAS Array in Hyper-VHow to setup an Exchange 2010 CAS Array to Load Balance MAPI
Disallow all agents except SharePoint?Useful SharePoint 2007 (MOSS 2007 SEO) configuration with robots.txt file for public facing SharePoint 2007 sites.
Cloud PBXMicrosoft OCS 2010 Is Coming To Unified Communications, PBX Killer
smart cardHow To: Configure Microsoft Remote Desktop Client and Smart Card Authentication
Profiles missing from ImportImporting and Deleting User Profiles in Sharepoint;Filtering Disabled Users from Import; Managing MySite of Deleted Users
Thank youManual Uninstall of SQL 2005 (32bit / 64bit) SQL Server or Express (including Reporting Services)
Auto-deletes all mysites after Full Import ScheduleImporting and Deleting User Profiles in Sharepoint;Filtering Disabled Users from Import; Managing MySite of Deleted Users
PerfectManual Uninstall of SQL 2005 (32bit / 64bit) SQL Server or Express (including Reporting Services)

 Subscribe and Bookmark

 Last 20 Articles

Category
SharePoint 2010 Search Features (Including FAST)
Sharepoint 2010
 
Remote Desktop Connection Manager (RDCMan)
Windows Deployment
 
SharePoint Server 2010 Product Licensing Details
Sharepoint 2010
 
Manage Windows 7 Power Options from the Command Line
Windows Deployment
 
Download details: Windows Phone 7 Training Kit for Developers - April 2010 CTP
Windows Mobile
 
Clustering Remote Desktop Connection (RDC) Broker for High Availability when Deploying Microsoft VDI
Virtualization
 
SharePoint 2010 Reference .Net Software Development Kit (SDK)
Sharepoint 2010
 
Microsoft Private Cloud “AppFabric” Prepares for Release
Cloud Computing
 
Malware and Virus Scanning Architecture in Forefront Threat Management Gateway (TMG) 2010
Security
 
Best Practices Analyzer (BPA) for HYPER-V (RTM and R2)
Virtualization
 
Microsoft Threat Management Gateway (TMG) 2010 - Key Features & Capabilities
Security
 
The forecast is sunny for [Microsoft] cloud services.
Cloud Computing
 
Microsoft announces "RemoteFX," the Calista-based Hyper-V-requiring PC-over-IP competitor
Virtualization
 
Dynamic Memory (aka Memory Overcommit) Coming To Hyper-V
Virtualization
 
SharePoint Overwhelms Business Intelligence - Gartner
Sharepoint 2010
 
Active Directory Power Tool: AD Explorer (and Editor)
Active Directory
 
Protect your Business Information for Free using Encrypting File System (EFS)
Security
 
How to: Integrate Office Communications Server (OCS) 2007 R2 with Exchange 2010 OWA/CAS
Exchange 2010
 
Microsoft Forefront Identity Manager (FIM) 2010 Released
Security
 
Microsoft Thinks VDI Might Not be the Answer to Every Desktop Scenario
Windows Deployment
 


Contact Us  |   San Diego, California

Copyright 2007-2009 Gilham Consulting - All rights reserved