Setting Up Windows Server Backup on Hyper-V Server 2008 R2

Part of my testing of Microsoft Hyper-V Server 2008 R2 will be the built-in backup solution. But although Windows Server Backup it is a built-in feature, it is not enabled by default. Here’s how to activate it and to register the VSS writer so it will tell your virtual machines to do a snapshot for the backup.

You also can’t add features remotely using Server Manager, so type these commands at the Hyper-V Server command prompt:

1. Start PowerShell:

powershell

2. Import the server manager module so you have access to those PowerShell commands:

import-module ServerManager

3. (Optional) Check available and installed features:

Get-WindowsFeature

4. (Optional) Get help on a PowerShell cmdlet:

Get-Help [cmdlet_name] -full
For example:  Get-Help Add-WindowsFeature -full

5. Install Windows Server Backup Features:

Add-WindowsFeature -Name Backup-Features -IncludeAllSubfeature

6. Quit PowerShell:

exit

7. Register the VSS writer for use with Windows Server Backup (see this TechNet article and MSKB 958662):

reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\WindowsServerBackup\Application Support\{66841CD4-6DED-4F4B-8F17-FD23F8DDC3DE}"

reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\WindowsServerBackup\Application Support\{66841CD4-6DED-4F4B-8F17-FD23F8DDC3DE}" /v "Application Identifier" /t REG_SZ /d Hyper-V

8. Check the registration of VSS writer for use with Windows Server Backup:

reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WindowsServerBackup\Application Support\{66841CD4-6DED-4F4B-8F17-FD23F8DDC3DE}" /s

Note You can also type regedit at the server’s command prompt to launch the familiar graphical registry editor and check the setting.

Using Windows Server Backup

Once installed, it seems you are left with the Wbadmin command line tool for running backups and restores unless you have a full installation of Windows Server 2008 with the Windows Server Backup MMC plug-in. That plug-in is not available in the Remote Administration Tools available for Windows 7.

According to this TechNet article, Wbadmin has been extended for Windows Server 2008 R2 (there are some cool new backup features in R2), however as of this writing, the Wbadmin command reference has not been updated. The built-in help has been updated, so for details you can, for example, type the following at the server command line:

Wbadmin -help
Wbadmin Enable Backup -help

Here’s the command to do a one-time backup of the system drive C: and the data drive D: to an external drive F:

Wbadmin start backup -backupTarget:F: -include:C:,D: -systemState -allCritical

The -systemState flag is actually redundant since backing up the system drive C: includes the system state. The -allcritical flag means “back up everything needed to restore the operating system to bare metal,” which in this case adds the 100MB System Reserved volume used by Bitlocker.

4 thoughts on “Setting Up Windows Server Backup on Hyper-V Server 2008 R2

  1. Rick Backus

    Excellent article. This helped me resolve the replication inconsistencies with my DPM 2010 backup of my Hyper-V 2008 R2 server for system state and BMR. Thanks again.

  2. Cris Sinnott

    There is a lot out there on how to backup Hyper-V, but not much that properly covers how to operate when you have the free edition (Microsoft Hyper-V Server 2008 R2) installed. This solution is clear, complete and to the point. Thanks for the info.

  3. Steven Lewin

    Fantastic article. What about Server 2008 Hyper-V R2 in a clustered config?

Leave a Reply

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.

This site uses Akismet to reduce spam. Learn how your comment data is processed.