다음을 통해 공유


DPM 2012 R2: Remove Recovery Points

When using the backup system from the company Microsoft - System Center 2012 R2 Data Protection Manager arise standard administrative tasks that can not be solved immediately. For example, moving from one group to another protection, creating or deleting restore points (Recovery Points).

In this paper, a method for the removal of restore points through PowerShell, because at the moment of the GUI can not perform this action.

 One of the reasons to remove one or more restore points may be the last incorrect backup task specific object in a particular group protection (Protection Group).

Source example: 6 points recovery folder \ OpenEMM

http://blog.it-kb.ru/wp-content/uploads/2014/06/image_thumb40.png

You must remove the last 2 recovery points.

Description of the solution

Powershell cmdlets use the standard on the DPM server or computer console installed DPM. 

 Import-Module DataProtectionManager 

Get a list of all protection groups:

 $pg = Get-ProtectionGroup – DPMServerName $DPMServerName

Introduce a protection group (the number in order):

 $ProtectionGroup = 0 

Get a list of all the protected objects in this particular group:

 $ds = Get-Datasource – ProtectionGroup $pg [ $ProtectionGroup ] 

Introduce one (number of order) data source (protected object):

 $Datasource = 0

Get the list of all recovery points:

 $rp = Get-RecoveryPoint – Datasource $ds [ $Datasource ] 

Determine the required number of points to be deleted. 

 $CountremovePoint = 2 

Determine what point will be deleted. 

 $NumRecPoint = 1 

Delete without confirmation two points, from 1 (the default recovery point begin with "0"):

for($k=1; $k –le $CountRemovePoint; $k=$k+1) {remove-recoverypoint $rp[$NumRecPoint] -confirm:$False; [int]$NumRecPoint=[int]$NumRecPoint+1} 

The result can be seen in the console DPM:

http://blog.it-kb.ru/wp-content/uploads/2014/06/image_thumb41.png

***Full script (with screenshots) with a choice from the list in the gallery scripts technet: ***DPM 2012 R2: Remove Recovery

Original post at Russian:  System Center 2012 R2 Data Protection Manager — Удаление точек восстановления