Windows Server Backup 备份Hypver-V VM

在Windows Server 2012中,可以通过Windows Server Backup备份Hypver-V VM。在还原时,将会还原到Hypver-V管理器中。

设置只保存2个备份副本,命令如下:

wbadmin delete backup -keepversions:2 -quiet

计划任务:

程序:wbadmin.exe

参数: delete backup -keepversions:2 -quiet (注:delete前面有一个空格)

 

======================================

When DPM protects a Hyper-V guest using HOST level protection, the Hyper-V writer on the hyper-V host communicates with the integration components inside the guest and determines if child partition or saved state backup will be performed.  Once DPM adds the guest to a protection group, the description: "Backup using child partition" or "backup using saved state" will not change, even thought the condition that determines the state may change.

To get a real-time view of how then next backup will be perfomed, you can run the following test.

To list hyper-V writer captions for guests to see if online or saved state backups can be done:

From an administrative command prompt:

a. Type: copy con script.txt and press enter
 b. Type: list writers and press enter
 c. Press CTRL + Z (to save)
 d. Type: diskshadow /s script.txt | find /i "caption: backup using"

Output will be displayed for each guest.


Here are the general conditions that make a VM go into a saved state during backup.

Protecting Hyper-V machines
http://technet.microsoft.com/en-us/library/hh757866.aspx


Conditions when DPM fails to back up Hyper-V virtual machines in an online state

By default, System Center 2012 – Data Protection Manager (DPM) performs a backup of a Hyper-V Virtual Machine (VM) in an online state. However, DPM cannot back up a Hyper-V VM in an online state, if one or more of the following conditions are true:

•Backup (Volume Snapshot) Integration Service is disabled or not installed.
•The virtual machine has one or more dynamic disks.
•The virtual machine has one or more non-NTFS based volumes.
•The virtual machine Cluster Resource Group in a cluster setup is offline.
•The virtual machine is not in a running state.
•A ShadowStorage assignment of a volume inside the virtual machine is explicitly set to a different volume other than itself.
•An App-V drive is installed on the virtual machine that creates a non-NTFS volume.

These conditions are set by the Hyper-V writer. In such a case, the VM is put in a saved state before a snapshot of host volumes are taken (except when the VM is turned off) for a backup. The Hyper-V writer adds the VM in the following format:
•For offline backups: Backup Using Saved State\<VMName>
•For online backups: Backup Using Child Partition Snapshot\<VMName>

Additional reason is if there is less than 300MB free space on a volume in the guest.


If you are using DPM 2010/2012/2012 Sp1 to backup Windows 2008 (R2) hyper-v guests you may observe that Windows 2012 server / Windows 8 guest VM's only get the option "Backup using saved state". It is also reported that some Windows 2012 server guests transfer the whole VM during backups instead on block level changes. 

The below resolves both of these issues.

SOLUTION
=======

The Hyper-V integration components needs to have scoped VSS snapshots to be turned off in order to support hot backups. This is a new feature apparently in Win8/2012 and the default is enabled.

Implement this registry key on EACH Windows 8 or Windows 2012 guest to resolve the issue.  You must add a key called SystemRestore, then add a value called ScopeSnapshots as follows.

HKLM\Software\Microsoft\Windows NT\CurrentVersion\SystemRestore 
REG_DWORD ScopeSnapshots 0x0

See the additional info on scoped snapshots.

http://msdn.microsoft.com/en-us/library/windows/desktop/aa378941(v=vs.85).aspx


Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Mike J. [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights.

 

From:http://social.technet.microsoft.com/Forums/en-US/9c3371f9-a3d3-4183-be99-a9f254ec5352/backup-hyperv-using-child-partition?forum=dpmhypervbackup

===========================================================================

为计划备份配置磁盘后,Windows Server Backup 将自动管理磁盘的使用情况 - 您不需要担心多次备份之后的磁盘空间不足。创建新备份时,Windows Server Backup 将自动重复使用旧备份的空间(当没有足够的磁盘空间来执行本次备份时)。

 D盘需要清理被备份副本占用的磁盘空间, 我们可以使用下面的命令来手动清除这些副本:
 
1. 打开命令提示行,如果您使用是的Windows Server 2008 或以上的版本,请用管理员权限来打开命令提示行。
2. 输入 VSSAdmin delete shadows /for=c: /oldest 回车。请注意,每个“/”都有一个空格。
3. 您可以重复运行这条命令多次来释放必要的磁盘空间。您看到的文章来自活动目录seo http://gnaw0725.blog.51cto.com/156601/d-3
 
另外,您可以通过 VSSAdmin list shadows来查看每个备份副本的信息,这些信息里包含了创建的时间点和这些副本的GUID。
您可以使用vssadmin delete shadows /shadow={特定的副本GUID} 回车来删除指定的备份副本。
*注* 副本的GUID通常是:{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX } 这样的形式。

你可能感兴趣的:(windows)