Delete disk backup recovery point

Hi Guys,
Am using DPM 2012 SP1 version 4.1.3313.0
Looking to delete the disk recovery points & using the script mentioned int he gallery - http://gallery.technet.microsoft.com/scriptcenter/DPM-2012-R2-Remove-6167f338
Somehow when i run the scripts and follow the steps till recovery points there are approx. 192 numbers out of which am not able to distinguish which one is tape and disk recovery point.
I changed my retention from 15days to 5days the older recovery points are not getting removed automatically instead of the scripts i have ran Removeinactiverecoverypoint.ps1, removerecoverypoint.ps1 & pruneshadowcopiesDpm2010.ps1
Somehow i managed to shrink but that not what am looking for. I want to delete the older recovery points than 5days and using that gallery script how can i identify which one is tape / disk recovery point.
Note: i dont want to delete the tape recovery points.
- Charles

Hi,
Please try this script and see if that works for you.
#Author : Ruud Baars
#Date : 11/09/2008
#Edited : 11/15/2012 By: Wilson S.
#edited : 07/25/2014 By: Mike J.
# NOTE: Update script to only remove recovery points on Disk. Recovery points removed will be from the oldest one up to the date
# entered by the user while the script is running
#deletes all recovery points before 'now' on selected data source.
$version="V4.7.2"
$ErrorActionPreference = "silentlycontinue"
add-pssnapin sqlservercmdletsnapin100
Add-PSSnapin -Name Microsoft.DataProtectionManager.PowerShell
#display RP's to delete and ask to continue.
#Check & wait data source to be idle else removal may fail (in Mojito filter on 'intent' to see the error)
#Fixed prune default and logfile name and some logging lines (concatenate question + answer)
#Check dependent recovery points do not pass BEFORE date and adjust selection to not select those ($reselect)
#--- Fixed reselect logic to keep adjusting reselect for as long as older than BEFORE date
#--- Fixed post removal rechecking logic to match what is done so far (was still geared to old logic)
#--- Modified to remove making RP and ask for pruning, fixed logic for removal rechecking logic
#--- Prompt for MM/DD/YYYY hh:mm:ss AM/PM - V4.7.2
$MB=1024*1024
$logfile="DPMdeleteRP.LOG"
$wait=10 #seconds
$confirmpreference = "None"
function Show_help
cls
$l="=" * 79
write-host $l -foregroundcolor magenta
write-host -nonewline "`t<<<" -foregroundcolor white
write-host -nonewline " DANGEROUS :: MAY DELETE MANY RECOVERY POINTS " -foregroundcolor red
write-host ">>>" -foregroundcolor white
write-host $l -foregroundcolor magenta
write-host "Version: $version" -foregroundcolor cyan
write-host "A: User Selects data source to remove recovery points for" -foregroundcolor green
write-host "B: User enters date / time (using 24hr clock) to Delete recovery points" -foregroundcolor green
write-host "C: User Confirms deletion after list of recovery points to be deleted is displayed." -foregroundcolor green
write-host "Appending to log file $logfile`n" -foregroundcolor white
write-host "User Accepts all responsibilities by entering a data source or just pressing [Enter] " -foregroundcolor white -backgroundcolor blue
"**********************************" >> $logfile
"Version $version" >> $logfile
get-date >> $logfile
show_help
$DPMservername=&"hostname"
"Selected DPM server = $DPMservername" >> $logfile
write-host "`nConnnecting to DPM server retrieving data source list...`n" -foregroundcolor green
$pglist = @(Get-ProtectionGroup $DPMservername) # WILSON - Created PGlist as array in case we have a single protection group.
$ds=@()
$tapes=$null
$count = 0
$dscount = 0
foreach ($count in 0..($pglist.count - 1))
# write-host $pglist[$count].friendlyname
$ds += @(get-datasource $pglist[$count]) # WILSON - Created DS as array in case we have a single protection group.
# write-host $ds
# write-host $count -foreground yellow
if ( Get-Datasource $DPMservername -inactive) {$ds += Get-Datasource $DPMservername -inactive}
$i=0
write-host "Index Protection Group Computer Path"
write-host "---------------------------------------------------------------------------------"
foreach ($l in $ds)
"[{0,3}] {1,-20} {2,-20} {3}" -f $i, $l.ProtectionGroupName, $l.psinfo.netbiosname, $l.logicalpath
$i++
$DSname=read-host "`nEnter a data source index from list above - Note co-located datasources on same replica will be effected"
if (!$DSname)
write-host "No datasource selected `n" -foregroundcolor yellow
"Aborted on Datasource name" >> $logfile
exit 0
$DSselected=$ds[$DSname]
if (!$DSselected)
write-host "No datasource selected `n" -foregroundcolor yellow
"Aborted on Datasource name" >> $logfile
exit 0
$rp=get-recoverypoint $DS[$dsname]
$rp
# $DoTape=read-host "`nDo you want to remove when recovery points are on tape ? [y/N]"
# "Remove tape recovery point = $DoTape" >> $logfile
write-host "`nCollecting recoverypoint information for datasource $DSselected.name" -foregroundcolor green
if ($DSselected.ShadowCopyUsedspace -gt 0)
while ($DSSelected.TotalRecoveryPoints -eq 0)
{ # "still 0"
#this is on disk
$oldShadowUsage=[math]::round($DSselected.ShadowCopyUsedspace/$MB,1)
$line=("Total recoverypoint usage {0} MB on DISK in {1} recovery points" -f $oldShadowUsage ,$DSselected.TotalRecoveryPoints )
$line >> $logfile
write-host $line`n -foregroundcolor white
#this is on tape
#$trptot=0
#$tp= Get-RecoveryPoint($dsselected) | where {($_.Datalocation -eq "Media")}
#foreach ($trp in $tp) {$trptot += $trp.size }
#if ($trptot -gt 0 )
# $line=("Total recoverypoint usage {0} MB on TAPE in {1} recovery points" -f ($trptot/$MB) ,$DSselected.TotalRecoveryPoints )
# $line >> $logfile
# write-host $line`n -foregroundcolor white
[datetime]$afterdate="1/1/1980"
#$answer=read-host "`nDo you want to delete recovery points from the beginning [Y/n]"
#if ($answer -eq "n" )
# [datetime]$afterdate=read-host "Delete recovery points AFTER date [MM/DD/YYYY hh:mm]"
[datetime]$enddate=read-host "Delete ALL Disk based recovery points BEFORE and Including date/time entered [MM/DD/YYYY hh:mm:ss AM/PM]"
"Deleting recovery points until $enddate" >>$logfile
write-host "Deleting recovery points until and $enddate" -foregroundcolor yellow
$rp=get-recoverypoint $DSselected
if ($DoTape -ne "y" )
$RPselected=$rp | where {($_.representedpointintime -le $enddate) -and ($_.Isincremental -eq $FALSE) -and ($_.DataLocation -eq "Disk")}
else
$RPselected=$rp | where {($_.representedpointintime -le $enddate) -and ($_.Isincremental -eq $FALSE)}
if (!$RPselected)
write-host "No recovery points found!" -foregroundcolor yellow
"No recovery points found, aborting...!" >> $logfile
exit 0
$reselect = $enddate
$adjustflag = $false
foreach ($onerp in $RPselected)
$rtime=[string]$onerp.representedpointintime
$rsize=[math]::round(($onerp.size/$MB),1)
$line= "Found {0}, RP size= {1} MB (If 0 MB, co-located datasource cannot be computed), Incremental={2} "-f $rtime, $rsize,$onerp.Isincremental
$line >> $logfile
write-host "$line" -foregroundcolor yellow
#Get dependent rp's for data source
$allRPtbd=$DSselected.GetAllRecoveryPointsToBeDeleted($onerp)
foreach ($oneDrp in $allRPtbd)
if ($oneDrp.IsIncremental -eq $FALSE) {continue}
$rtime=[string]$oneDrp.representedpointintime
$rsize=[math]::round(($oneDrp.size/$MB),1)
$line= ("`t...is dependancy for {0} size {1} `tIncremental={2}" -f $rtime, $rsize, $oneDrp.Isincremental)
$line >> $logfile
if ($oneDrp.representedpointintime -ge $enddate)
#stick to latest full ($oneDrp = dependents, $onerp = full)
$adjustflag = $true
$reselect = $onerp.representedpointintime
"<< Dependents newer than BEFORE date >>>" >> $logfile
Write-Host -nonewline "`t <<< later than BEFORE date >>>" -foregroundcolor white -backgroundcolor red
write-host "$line" -foregroundcolor yellow
else
#Ok, include current latest incremental
$reselect = $oneDrp.representedpointintime
write-host "$line" -foregroundcolor yellow
if ($reselect -lt $oneDrp.representedpointintime)
#we adjusted further backward than latest incremental within selection
$reselect = $rtime
$line = "Adjusted BEFORE date to be $reselect to include dependents to $enddate"
$line >> $logfile
Write-Host $line -foregroundcolor white -backgroundcolor blue
$line="`n<<< SECOND TO LAST CHANCE TO ABORT - ONE MORE PROMPT TO CONFIRM. >>>"
write-host $line -foregroundcolor white -backgroundcolor blue
$line >> $logfile
$line="Above recovery points within adjusted range will be permanently deleted !!!"
write-host $line -foregroundcolor red
$line >> $logfile
$line="These RP's include dependent recovery points and may contain co-located datasource(s)"
write-host $line -foregroundcolor red
$line >> $logfile
$line="Data source activity = " + $DSselected.Activity
$line >> $logfile
write-host $line -foregroundcolor white
$DoDelete=""
while (($DoDelete -ne "N" ) -and ($DoDelete -ne "Y"))
$line="Continue with deletion (must answer) Y/N? "
write-host $line -foregroundcolor white
$DoDelete=read-host
$line = $line + $DoDelete
$line >> $logfile
if (!$DSselected.Activity -eq "Idle")
$line="Data source not idle, do you want to wait Y/N ? "
write-host $line -foregroundcolor yellow
$Y=read-host
$line = $line + $Y
$line >> $logfile
if ($Y -ieq "Y")
Write-Host "Waiting for data source to become idle..." -foregroundcolor green
while ($DSselected.Activity -ne "Idle")
("Waiting {0} seconds" -f $wait) >>$logfile
Write-Host -NoNewline "..." -ForegroundColor blue
start-sleep -s $wait
if ($DoDelete -eq "Y")
foreach ($onerp in $RPselected)
#reselect is adjusted to safe range relative to what was requested
#--- if adjustflag not set then all up to including else only older because we must keep the full
if ((($onerp.representedpointintime -le $reselect) -and ($adjustflag -eq $false)) -or ($onerp.representedpointintime -lt $reselect))
$rtime=[string]$onerp.representedpointintime
write-host `n$line -foregroundcolor red
$line >>$logfile
if (($onerp ) -and ($onerp.IsIncremental -eq $FALSE)) { remove-recoverypoint -RecoveryPoint $onerp -confirm:$True} # >> $logfile}
$line =("---`nDeleting recoverypoint -> " + $rtime)
$line >>$logfile
"All Done!" >> $logfile
write-host "`nAll Done!`n`n" -foregroundcolor white
$line="Do you want to View DPMdeleteRP.LOG file Y/N ? "
write-host $line -foregroundcolor white
$Y=read-host
$line = $line + $Y
$line >> $logfile
if ($Y -ieq "Y")
Notepad DPMdeleteRP.LOG
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.

Similar Messages

  • Understanding replica volume and recovery point volume usage with SQL Express Full Backup

    I am running some trials to test DPM 2012 R2's suitability for protection a set of SQL Server databases and I am trying to understand what happens when I create a recovery point with Express Full Backup.
    The databases use simple recovery model and in the tests I have made so far I have loaded more data into the databases between recovery points since that will be a typical scenario - the databases will grow over time. The database files are set to autogrowth
    by 10%
    I have been looking at the change in USED space in the replica volume and in the recovery point volume after new recovery points and have a hard time understanding it.
    After the first test where data was loaded into the database and an Express Full Backup recovery point was created, I saw an increase in used space in the replica volume of 85 Gb and 29 GB in the recovery point volume. That is somewhat more than I think
    the database grew (I realize that should have monitored that, but did not), but anyway it is not completely far out.
    In the next test I did the same thing except I loaded twice as much data into the database.
    Here is where it gets odd: This causes zero increased usage in the replica volume and 33 GB increased use in the recovery point volume.
    I do not understand why the replica volume use increases with some recovery points and not with others.
    Note that I am only discussing increased usage in the volumes - not actual volume growth. The volumes are still their original size.
    I have been using 3-4 days on the test and the retention period is set to 12 days, so nothing should be expired yet.

    Hi,
    The replica volume usage represents the physical database file(s) size. The database file size on the replica should be equal to the database file size on the protected server.  This is both .mdf and .ldf files.  If when you load data
    into the database and you overwrite current tables versus adding new ones, or if there is white space in the database files and the load simply uses that white space, then there will not be any increase in the file size, so there will not be any increase
    in the replica used space.
    The recovery point volume will only contain delta changes applied to the database files.  As the changed blocks overwrite the files on the replica during express full backup, VSS (volsnap.sys) driver copies the old blocks about to be overwritten
    to the recovery point volume before allowing the change to be applied to the file on the replica. 
    Hope this helps explain what you are seeing.
    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.

  • DPM couldn't find valid recovery points for VM listed as having numerous recovery points when writing to tape

    I'm seeing the following events when DPM tries writing to tape:
    Log Name:      DPM Alerts
    Source:        DPM-EM
    Date:          15/02/2014 12:01:07
    Event ID:      3311
    Task Category: None
    Level:         Error
    Keywords:      Classic
    User:          N/A
    Computer:      <backup server FQDN>
    Description:
    The back up to tape job failed for the following reason: (ID: 3311)
    Backup of Non VSS Datasource Writer on <PROD server FQDN> cannot be completed. DPM could not find a valid recovery point on disk. (ID: 30126)
    All VMs on each of the affected servers have recovery points but
    When performing disk to disk to tape backups (d2D2T), tape backups will fail if a new disk based backup is not created before the next scheduled tape backup.  DPM always makes tape backups by mounting last successful disk based recovery point. 
    This is so we don't need to transfer data over the network since that most recent data is already on the DPM server. Look to see why the disk recovery points are failing and correct that to prevent tape backups from failing.
    http://social.technet.microsoft.com/Forums/en-US/a9b80780-2a5c-43bc-8111-ee35db56f359/backup-tapes-dpm-2012?forum=dpmtapebackuprecovery
    Is this the only time that recovery points are verified? Can I do a manual verification of recovery points? I'm concerned that some of the backups I have may be corrupt. If that's the case I need a way of finding out which ones are affected and a way to
    resolve the issue. Unfortunately I've not found much,the DPM error code isn't even listed in the official documentation. http://technet.microsoft.com/en-us/library/hh859159.aspx Other threads where people have seen this issue seem to be for older versions
    of DPM (I'm using the latest 2012 R2 fully updated).

    Hi,
    I've been having some difficulty running the Powershell command, see below. I've been using this for guidance http://technet.microsoft.com/en-us/library/hh881586%28v=sc.20%29.aspx where am I going wrong here?
    $Pg = Get-DPMProtectionGroup
    -DPMServerName <dpm server name here>
    $Ds = Get-DPMDatasource
    -ProtectionGroup $Pg[1]
    New-DPMRecoveryPoint
    -Datasource $Ds
    -Disk -DiskRecoveryPointOption -WithDataIntegrityCheck
    PS C:\Program Files\Microsoft System Center 2012 R2\DPM\DPM\bin> New-DPMRecovery
    Point -Datasource $Ds -Disk -DiskRecoveryPointOption -WithDataIntegrityCheck
    New-DPMRecoveryPoint : Missing an argument for parameter
    'DiskRecoveryPointOption'. Specify a parameter of type 'Microsoft.Internal.Ente
    rpriseStorage.Dls.EngineUICommon.EngineConstants.DbEnums+CreateDiskRecoveryPoin
    tOption' and try again.
    At line:1 char:44
    + New-DPMRecoveryPoint -Datasource $Ds -Disk -DiskRecoveryPointOption
    -WithDataInt ...
    +                                           
    ~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo         
    : InvalidArgument: (:) [New-DPMRecoveryPoint], Par
       ameterBindingException
        + FullyQualifiedErrorId : MissingArgument,Microsoft.Internal.EnterpriseSto
       rage.Dls.UI.Cmdlet.ProtectionCmdLets.CreateRecoveryPoint
    PS C:\Program Files\Microsoft System Center 2012 R2\DPM\DPM\bin>

  • Old recovery points seems to not being cleaned up

    I'm running a Windows Server 2012 server with DPM 2012 SP1, acting as a secondary DPM server for a couple of primary servers. However, the last 5-6 weeks it has begun to behave very strange. Suddenly, I get a lot of "Recovery Point volume threshold
    exceeded", "DPM does not have sufficient storage space available on the recovery point volume to create new recovery Points" and "The used disk space on the computer running DPM for the recovery point volume of SQL Server 2008 database
    XXXXX\DB(servername.domain.com) has exceeded the threshold value of 90% (DPM accounts 600 MB for internal usage in addition to free space available). If you do not allocate more disk space, synchronization jobs may fail due to insufficient disk space. (ID
    3169).
    All of these alerts seem to have a common source - disk space of course, but there is currently 8 TB free in the DPM disk pool. However, I have a feeling that all of this started when we added another DPM disk to the storage pool. Could it be that DPM doesn't
    clean up expired disk data correctly any longer?
    /Amir

    Hi,
    If the pruneshadowcopiesdpm201.ps1 is not completing, hangs, or crashes, then that needs to be addressed as that will definitely cause storage usage problems.
    In the meantime you can use this powershell script to delete old recovery points to help free disk space.  It will prompt to select a datasource, then a date to delete all recovery points made before that time.
    #Author : Ruud Baars
    #Date : 11/09/2008
    #Edited : 11/15/2012 By: Wilson S.
    #edited : 11:27:2012 By: Mike J.
    # NOTE: Update script to only remove recovery points on Disk. Recovery points removed will be from the oldest one up to the date
    # entered by the user while the script is running
    #deletes all recovery points before 'now' on selected data source.
    $version="V4.7"
    $ErrorActionPreference = "silentlycontinue"
    add-pssnapin sqlservercmdletsnapin100
    Add-PSSnapin -Name Microsoft.DataProtectionManager.PowerShell
    #display RP's to delete and ask to continue.
    #Check & wait data source to be idle else removal may fail (in Mojito filter on 'intent' to see the error)
    #Fixed prune default and logfile name and some logging lines (concatenate question + answer)
    #Check dependent recovery points do not pass BEFORE date and adjust selection to not select those ($reselect)
    #--- Fixed reselect logic to keep adjusting reselect for as long as older than BEFORE date
    #--- Fixed post removal rechecking logic to match what is done so far (was still geared to old logic)
    #--- Modified to remove making RP and ask for pruning, fixed logic for removal rechecking logic
    $MB=1024*1024
    $logfile="DPMdeleteRP.LOG"
    $wait=10 #seconds
    $confirmpreference = "None"
    function Show_help
    cls
    $l="=" * 79
    write-host $l -foregroundcolor magenta
    write-host -nonewline "`t<<<" -foregroundcolor white
    write-host -nonewline " DANGEROUS :: MAY DELETE MANY RECOVERY POINTS " -foregroundcolor red
    write-host ">>>" -foregroundcolor white
    write-host $l -foregroundcolor magenta
    write-host "Version: $version" -foregroundcolor cyan
    write-host "A: User Selects data source to remove recovery points for" -foregroundcolor green
    write-host "B: User enters date / time (using 24hr clock) to Delete recovery points" -foregroundcolor green
    write-host "C: User Confirms deletion after list of recovery points to be deleted is displayed." -foregroundcolor green
    write-host "Appending to log file $logfile`n" -foregroundcolor white
    write-host "User Accepts all responsibilities by entering a data source or just pressing [Enter] " -foregroundcolor white -backgroundcolor blue
    "**********************************" >> $logfile
    "Version $version" >> $logfile
    get-date >> $logfile
    show_help
    $DPMservername=&"hostname"
    "Selected DPM server = $DPMservername" >> $logfile
    write-host "`nConnnecting to DPM server retrieving data source list...`n" -foregroundcolor green
    $pglist = @(Get-ProtectionGroup $DPMservername) # WILSON - Created PGlist as array in case we have a single protection group.
    $ds=@()
    $tapes=$null
    $count = 0
    $dscount = 0
    foreach ($count in 0..($pglist.count - 1))
    # write-host $pglist[$count].friendlyname
    $ds += @(get-datasource $pglist[$count]) # WILSON - Created DS as array in case we have a single protection group.
    # write-host $ds
    # write-host $count -foreground yellow
    if ( Get-Datasource $DPMservername -inactive) {$ds += Get-Datasource $DPMservername -inactive}
    $i=0
    write-host "Index Protection Group Computer Path"
    write-host "---------------------------------------------------------------------------------"
    foreach ($l in $ds)
    "[{0,3}] {1,-20} {2,-20} {3}" -f $i, $l.ProtectionGroupName, $l.psinfo.netbiosname, $l.logicalpath
    $i++
    $DSname=read-host "`nEnter a data source index from list above - Note co-located datasources on same replica will be effected"
    if (!$DSname)
    write-host "No datasource selected `n" -foregroundcolor yellow
    "Aborted on Datasource name" >> $logfile
    exit 0
    $DSselected=$ds[$DSname]
    if (!$DSselected)
    write-host "No datasource selected `n" -foregroundcolor yellow
    "Aborted on Datasource name" >> $logfile
    exit 0
    $rp=get-recoverypoint $DS[$dsname]
    $rp
    # $DoTape=read-host "`nDo you want to remove when recovery points are on tape ? [y/N]"
    # "Remove tape recovery point = $DoTape" >> $logfile
    write-host "`nCollecting recoverypoint information for datasource $DSselected.name" -foregroundcolor green
    if ($DSselected.ShadowCopyUsedspace -gt 0)
    while ($DSSelected.TotalRecoveryPoints -eq 0)
    { # "still 0"
    #this is on disk
    $oldShadowUsage=[math]::round($DSselected.ShadowCopyUsedspace/$MB,1)
    $line=("Total recoverypoint usage {0} MB on DISK in {1} recovery points" -f $oldShadowUsage ,$DSselected.TotalRecoveryPoints )
    $line >> $logfile
    write-host $line`n -foregroundcolor white
    #this is on tape
    #$trptot=0
    #$tp= Get-RecoveryPoint($dsselected) | where {($_.Datalocation -eq "Media")}
    #foreach ($trp in $tp) {$trptot += $trp.size }
    #if ($trptot -gt 0 )
    # $line=("Total recoverypoint usage {0} MB on TAPE in {1} recovery points" -f ($trptot/$MB) ,$DSselected.TotalRecoveryPoints )
    # $line >> $logfile
    # write-host $line`n -foregroundcolor white
    [datetime]$afterdate="1/1/1980"
    #$answer=read-host "`nDo you want to delete recovery points from the beginning [Y/n]"
    #if ($answer -eq "n" )
    # [datetime]$afterdate=read-host "Delete recovery points AFTER date [MM/DD/YYYY hh:mm]"
    [datetime]$enddate=read-host "Delete ALL Disk based recovery points BEFORE and Including date/time entered [MM/DD/YYYY hh:mm]"
    "Deleting recovery points until $enddate" >>$logfile
    write-host "Deleting recovery points until and $enddate" -foregroundcolor yellow
    $rp=get-recoverypoint $DSselected
    if ($DoTape -ne "y" )
    $RPselected=$rp | where {($_.representedpointintime -le $enddate) -and ($_.Isincremental -eq $FALSE)-and ($_.DataLocation -eq "Disk")}
    else
    $RPselected=$rp | where {($_.representedpointintime -le $enddate) -and ($_.Isincremental -eq $FALSE)}
    if (!$RPselected)
    write-host "No recovery points found!" -foregroundcolor yellow
    "No recovery points found, aborting...!" >> $logfile
    exit 0
    $reselect = $enddate
    $adjustflag = $false
    foreach ($onerp in $RPselected)
    $rtime=[string]$onerp.representedpointintime
    $rsize=[math]::round(($onerp.size/$MB),1)
    $line= "Found {0}, RP size= {1} MB (If 0 MB, co-located datasource cannot be computed), Incremental={2} "-f $rtime, $rsize,$onerp.Isincremental
    $line >> $logfile
    write-host "$line" -foregroundcolor yellow
    #Get dependent rp's for data source
    $allRPtbd=$DSselected.GetAllRecoveryPointsToBeDeleted($onerp)
    foreach ($oneDrp in $allRPtbd)
    if ($oneDrp.IsIncremental -eq $FALSE) {continue}
    $rtime=[string]$oneDrp.representedpointintime
    $rsize=[math]::round(($oneDrp.size/$MB),1)
    $line= ("`t...is dependancy for {0} size {1} `tIncremental={2}" -f $rtime, $rsize, $oneDrp.Isincremental)
    $line >> $logfile
    if ($oneDrp.representedpointintime -ge $enddate)
    #stick to latest full ($oneDrp = dependents, $onerp = full)
    $adjustflag = $true
    $reselect = $onerp.representedpointintime
    "<< Dependents newer than BEFORE date >>>" >> $logfile
    Write-Host -nonewline "`t <<< later than BEFORE date >>>" -foregroundcolor white -backgroundcolor red
    write-host "$line" -foregroundcolor yellow
    else
    #Ok, include current latest incremental
    $reselect = $oneDrp.representedpointintime
    write-host "$line" -foregroundcolor yellow
    if ($reselect -lt $oneDrp.representedpointintime)
    #we adjusted further backward than latest incremental within selection
    $reselect = $rtime
    $line = "Adjusted BEFORE date to be $reselect to include dependents to $enddate"
    $line >> $logfile
    Write-Host $line -foregroundcolor white -backgroundcolor blue
    $line="`n<<< SECOND TO LAST CHANCE TO ABORT - ONE MORE PROMPT TO CONFIRM. >>>"
    write-host $line -foregroundcolor white -backgroundcolor blue
    $line >> $logfile
    $line="Above recovery points within adjusted range will be permanently deleted !!!"
    write-host $line -foregroundcolor red
    $line >> $logfile
    $line="These RP's include dependent recovery points and may contain co-located datasource(s)"
    write-host $line -foregroundcolor red
    $line >> $logfile
    $line="Data source activity = " + $DSselected.Activity
    $line >> $logfile
    write-host $line -foregroundcolor white
    $DoDelete=""
    while (($DoDelete -ne "N" ) -and ($DoDelete -ne "Y"))
    $line="Continue with deletion (must answer) Y/N? "
    write-host $line -foregroundcolor white
    $DoDelete=read-host
    $line = $line + $DoDelete
    $line >> $logfile
    if (!$DSselected.Activity -eq "Idle")
    $line="Data source not idle, do you want to wait Y/N ? "
    write-host $line -foregroundcolor yellow
    $Y=read-host
    $line = $line + $Y
    $line >> $logfile
    if ($Y -ieq "Y")
    Write-Host "Waiting for data source to become idle..." -foregroundcolor green
    while ($DSselected.Activity -ne "Idle")
    ("Waiting {0} seconds" -f $wait) >>$logfile
    Write-Host -NoNewline "..." -ForegroundColor blue
    start-sleep -s $wait
    if ($DoDelete -eq "Y")
    foreach ($onerp in $RPselected)
    #reselect is adjusted to safe range relative to what was requested
    #--- if adjustflag not set then all up to including else only older because we must keep the full
    if ((($onerp.representedpointintime -le $reselect) -and ($adjustflag -eq $false)) -or ($onerp.representedpointintime -lt $reselect))
    $rtime=[string]$onerp.representedpointintime
    write-host `n$line -foregroundcolor red
    $line >>$logfile
    if (($onerp ) -and ($onerp.IsIncremental -eq $FALSE)) { remove-recoverypoint -RecoveryPoint $onerp -confirm:$True} # >> $logfile}
    $line =("---`nDeleting recoverypoint -> " + $rtime)
    $line >>$logfile
    "All Done!" >> $logfile
    write-host "`nAll Done!`n`n" -foregroundcolor white
    $line="Do you want to View DPMdeleteRP.LOG file Y/N ? "
    write-host $line -foregroundcolor white
    $Y=read-host
    $line = $line + $Y
    $line >> $logfile
    if ($Y -ieq "Y")
    Notepad DPMdeleteRP.LOG
    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.

  • DPM 2012 R2 UR4 - DPM could not set security permissions on the replica or recovery point volume that was created.

    Hi All,
    I am running a fresh install of SCDPM 2012 R2 with a protection group that is backing up the 'C:\', Bare Metal and System State of some VMs. If i add any additional servers to the group since the first creation it returns the following error: 
    Modify protection group: System State & Bare Metal Recovery failed:
    Error 419: DPM could not set security permissions on the replica or recovery point volume that was created.
    Error details: The process cannot access the file because it is being used by another process
    Recommended action: Review the error details, take appropriate action and retry the operation.
    If i re-create the whole protection group it works fine.
    Could any one advise any further diagnostics I can do to try and locate the reason behind not being able to modify the group after the first creation? I can add new servers to other PGs without any issues.
    Thanks in advance,
    Dan

    If you are protecting any of the system state/BMR protection. Can you stop protection by deleting the older recovery points and then recreate the protection group.
    This thread mentions this to be a hardware issue, albeit with less information on what exact hardware issue:
    https://social.technet.microsoft.com/Forums/en-US/480679c2-1079-4847-ab38-5cc8f454ef86/error-419-dpm-could-not-set-security-permissions-on-the-replica-or-recovery-point-volume-that-was?forum=dataprotectionmanager
    Regards, Trinadh [MSFT] This posting is provided AS IS with no warranties, and confers no rights. If you found the reply helpful, please MARK IT AS ANSWER. Looking for source of information for DPM? http://blogs.technet.com/b/dpm/ http://technet.microsoft.com/en-in/library/hh758173.aspx

  • DPM 2012 R2 All backups fail with recovery point volume not available after resizing OS disk

    I resized the C drive partition of my DPM server (the data is on a separate dedicated array) and everything failed. I put it back but everything is still failing with the same problem as here:
    DPM 2007: The recovery point volume is not available?
    I've run chkdsk for a couple and both have given the following after doing 3 stages:
    Windows has scanned the file system and found no problems.
    No further action is required.
    The backups still fail and the only error information I can find in the event logs is:
    Backup job for datasource: Online\<VM name> on production server: <host FQDN> failed.
    How can I find out what the problem actually is?
    Is it possible to resize the C drive containing a DPM install? If so what can it be safely resized to? It easily met the minimum requirements and I don't know of anything in the documentation that says resizing the OS disk may cause issues.
    Preparing your environment for System Center 2012 R2 Data Protection Manager (DPM)

    Hi,
    Resizing the boot partition (usually C:) should not effect DPM in any way.  DPM writes directly to it's volumes contained in the storage pool and not through the mount points on the C: drive.    So is the DPM UI showing
    missing volume next to some data sources ?   Try doing a DPM disk rescan and see if that removes the missing volume flag. 
    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.

  • What type of backup DPM takes in recovery point volume

    Hi,
    Please help me to understand what type of backup DPM takes in recovery point volume as it takes more disk space as compare to replica point volume, though replica point volume is initial full copy of data source and why it takes more disk space.
    Thanks in advance.

    Thanks for valuable inputs.
    But I have still doubt on my understanding i.e.
    I have calculated disk space required as per Microsoft formulas given on above mentioned link. Below table is there output.
    Application
    Data   Size
    Retention   Range in Days
    Replica   Volume
    Recovery   Point Volume
    Total   Volume
    Exchange   Mailbox
    700   GB
    7
    906   GB
    1962   GB
    2868   GB
    SQL   Database
    100   GB
    7
    125   GB
    107   GB
    232   GB
    File   & Folders
    500   GB
    7
    750   GB
    72   GB
    822   GB
    Virtual   Machines
    700   GB
    7
    1050   GB
    100   GB
    1150   GB
    So as we are considering during sync frequency DPM transfers changed data to recovery point volume plus volume shadow copy of replica during each express full for 7 days (as per above table) then how/why required disk space for recovery point volume is less
    as compare to replica point volume for SQL, File, VM apps?
    Please help me to understand.
    Does anyone else have an idea regarding the formulas given by MS to calculate required disk space?
    Please help.

  • Deleting Rescue and Recovery backups

    I using WinXP+SP3 and Rescue and Recovery 4.  I launch Rescue and Recovery via Start-Programs-ThinkVantage-Rescue and Recovery.  In the Window that opens I click 'Change schedule, name a backup, delete backups'. Another Windown opens and I can see my backups listed at the bottom of this Window.   When I select a backup to delete,  a small Window opens that asks if I'm sure I want to delete the backup.  I say 'yes'.  Another Windown opens that says 'Please wait while the backups are deleted'.
    My issue is Rescue and Recovery seems to hang and never finishes the  backup deletion.  I see the access light on my external drive blink at first so Rescue and Recovery seems to be doing something at first but the 'Please wait while the backups are deleted' never closes.  I let the delete run all night and when I got up, the Window was still there.  I tried to delete another backup and got the same result.
    What is causing the problem?  I can see the contents of my external drive in Windows Explorer so I know my PC can access it.

    rmbowma, welcome to the forum,
    delete the last backup on it's own first, you should then be able to delete other backups.
    Please remember that they are incremental backups, you can't delete for instance backups 2-5 leaving 1 & 6 as 6 is dependent on 2-5.
    Hope this helps
    Andy  ______________________________________
    Please remember to come back and mark the post that you feel solved your question as the solution, it earns the member + points
    Did you find a post helpfull? You can thank the member by clicking on the star to the left awarding them Kudos Please add your type, model number and OS to your signature, it helps to help you. Forum Search Option T430 2347-G7U W8 x64, Yoga 10 HD+, Tablet 1838-2BG, T61p 6460-67G W7 x64, T43p 2668-G2G XP, T23 2647-9LG XP, plus a few more. FYI Unsolicited Personal Messages will be ignored.
      Deutsche Community     Comunidad en Español    English Community Русскоязычное Сообщество
    PepperonI blog 

  • Microsoft Azure Backups not reducing available recovery points or destination usage after retention period has been reduced.

    Microsoft Azure Backups not reducing available recovery points or destination usage after retention period has been reduced.  
    I had the retention period set to 30 day with around 6.8TB of backups. Over a week ago I changed the retention period down to 7 days, and it took a couple of days for the total recovery points to go down to 7. The destination usage was still going up.   
    I have come in today (monday) and the total backups is now 10 and the destination usage is now 7.57TB.  
    I only have the one server backing up to Azure Backups Services.  
    My questions are;  
    1. how long does it take for azure to delete backups from outside the retention period*   
    2. why are there move recovery points that the retention period?  
    3. Is there a way to purge just the backups outside the retention period?  
    *It does say the backup agent, "space allocation data is updated on a daily basis".
    It would be a great help if anyone had some information on this as the storage costs are getting very high.
    Thanks for the help in advance
    Z  

    Hi,
    Any update for this issue?
    If issue still exists, please open a case from http://azure.microsoft.com/en-us/support/options/, pick Recovery Services & problem type as “Backup”.
    Also please let me know the case ID so I can forward it to related support team for monitoring. Thank you for your time.
    Please remember to mark the replies as answers if they help and un-mark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Time Machine Backup Error. Time machine could not delete the backup disk image .sparsebundle

    Time Machine is giving an error message.  Time Machine couldnt complete the backup.  I am using the Seagate GoFlex Home.  Error message states Time Machine could not delete the backup disk image "/volumes/Go Flex Home Backup/iMAc.sparsebundle".  Does anybody have any ideas?

    I have deleted all files in the Time Machine backup via Windows, Finder, and GoFlex UI.
    I think this is your problem.. you need to follow the exact setup from seagate to get TM running again.. please read the manual... I do not have one but I do have another brand of NAS and setting up TM involves a fairly complex set of instructions.. because it is not a native Apple device.. your computer does not recognise it as TM capable.. you need to use the work around the manual will explain.

  • Recovery points and consistency checks are failing for one disk on file server. Access is denied (0x80070005)

     Good day! I've built a new DPM 2012 R2 server and migrated or re-created jobs from my older 2012 SP1 DPM servers as trying to upgrade them was not working out. The DPM R2 server is running great besides this one issue. The problem is with a file
    and print server at a remote office. Since it has around 750 GB of user data on it I chose to do manual replica creation on the data disk, (E:) but created the C:\ drive replica normally, over the WAN. The manual replica creation was successful, and the initial
    consistency check and recovery point creation worked as expected, however, since then it will not create another RP or run a CC on the E:\ drive. Recovery points on the C:\ drive are being created properly. When I try to run a CC I get this error: "An
    unexpected error occurred while the job was running. (ID 104 Details: Access is denied (0x80070005))" I've tried to drop protection on the two directories of the E:\ drive (retaining data) and re-create, but that didn't help. I've even done a recovery
    from the initial RP to verify that it was created properly, and that worked as well.

    Hi,
    Access Denied error is usually caused by Antivirus software.  Please disable real time scanning on the DPM Server for DPMRA process. 
    928840 You receive job status failure messages in Data Protection Manager
    http://support.microsoft.com/default.aspx?scid=kb;EN-US;928840
    For DPM 2012 the path has changed.
    To resolve this problem, configure the antivirus program to exclude real-time monitoring of the Dpmra.exe program on the Data Protection Manager server. By default, the Dpmra.exe file is located in the following folder:
    %ProgramFiles%\Microsoft System Center 2012\DPM\DPM\Bin
    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.

  • Can I backup some Azure Virtual Machines at same recovery point by Azure Backup ?

    Can I backup some Azure Virtual Machines at same recovery point by Azure Backup ?
    I want to recovery some related Azure Virtual Machines at same recovery point.
    Senario:
    Azure Virtual Machine 1. some servers for Web servers.
    Azure Virtual Machine 2. a server for SQL server.
    Azure Virtual Machine 3. a server for File server.
    Regards,
    Yoshihiro Kawabata

    Hi Yoshihiro,
    Azure IaaS VM backup is a VM level backup and each VM backup will create its own recovery point.  You can trigger backups in a staggered fashion typically you backup SQL, File server followed by web server, but there is no way to make it a single recovery
    point.  Are there any specific reasons you need this capability?
    Thanks,
    Vijay

  • Disk Full Error... Won't Delete Old Backups

    Hello- Since upgrading to ML, Time Machine is notifying me that disk is full and will erase old backups on next backup. Problem is, its not deleting old backups. Thus, its not backing up any longer. This has only happened since upgrading to ML this week.
    The setup:
    - 2012 MB Air with 250GB SSD and ~ 75GB unused
    - Latest ML Updates
    - External 1TB HD totally devoted to Time Machine- 23GB remaining space available
    It has been setup this way since 2012 and this is the 1st time Time Machine is unable to erase old backups.
    Thoughts?
    Thx!

    See C4.
    Time Machine Troubleshooting

  • HT3275 Time Machine not deleting oldest backups when the disk is full

    Time Machine not deleting oldest backups when the disk is full

    Unfortunately, when this happens, Time Machine cannot erase enough space to create room for the new backup. Your options now are:
    1) Add a new Time Capsule or a hard drive to the USB port on the existing Time Capsule and continue with backups
    2) Manually delete backups from Time Machine....which is a long and tedious process.  After a few hours, not much space will be reclaimed and it will not be long before the Time Capsule is full again
    3) Erase the Time Capsule....if you really do not need all the old backups from months ago....and start over with a new Time Machine backup and move forward again

  • Identify which disk recovery points are stored on?

    We have 3 disks in DPM, one of which is flaky and keeps going missing from DPM.  We started by migrating our most important datasources to another disk (on a temporary basis) while we ordered a new SAN with the view to moving everything onto the new
    SAN.  This has worked for most datasources but I have a problem with one.
    For the purpose of this thread we have:
    Disk 1 - old, flacky disk
    Disk 2 - temporary disk
    Disk 3 - new SAN
    I am trying to move a datasource from disk 2 to disk 3 but am getting the following error:
    Set-ProtectionGroup : D:\ has recently been migrated. You cannot migrate D:\ again until the recovery points on the previous replica volume are available.
    (ID: 31224)
    At C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin\MigrateDatasourceDataFromDPM.ps1:129 char:4
    +             Set-ProtectionGroup $mpg
    +             ~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Set-DPMProtectionGroup], DlsException
        + FullyQualifiedErrorId : ChainedMigrationError,Microsoft.Internal.EnterpriseStorage.Dls.UI.Cmdlet.ProtectionCmdLets.CommitProtectionGroup
    Prior to attempting this, I removed (using remove-recoverypoint) the old recovery points I believed to be on Disk 1 rather than waiting for them to expire on their own.  This worked for other datasources but doesn't work for this.
    I found an SQL query on another fourm post and ran it:
    use DPMDB  
    select dsk.NTDiskNumber,vol.MountPointPath,ag.NetbiosName, ds.DataSourceName,  vol.Usage as "1=REPLvol 2=RPvol", vol.VolumeSize,lr.lastbackuptime
    from tbl_IM_DataSource as ds
    join tbl_PRM_LogicalReplica as lr
    on ds.DataSourceId=lr.DataSourceId
    join tbl_AM_Server as ag
    on ds.ServerId=ag.ServerId
    join tbl_SPM_Volume as vol
    on lr.PhysicalReplicaId=vol.VolumeSetID
    and vol.Usage in (1,2)
    join tbl_SPM_Extent as ext
    on vol.guidname=ext.guidname
    join tbl_SPM_Disk as dsk
    on ext.diskid=dsk.diskid
    where ntdisknumber=4 and lastbackuptime < getdate()-7 and NetbiosName='FILESERVER1'
    order by lastbackuptime
    and the output is:
    NTDiskNumber MountPointPath
    NetbiosName DataSourceName
    1=REPLvol 2=RPvol VolumeSize
    lastbackuptime
    4 File System\vol_783bc0f9-8382-4df5-8f72-819ba012f68f
    FILESERVER1 D:\
    2 359766425600
    2014-05-13 08:01:08.000
    4 File System\vol_783bc0f9-8382-4df5-8f72-819ba012f68f
    FILESERVER1 D:\
    1 2238049157120
    2014-05-13 08:01:08.000
    Is that DPM telling me there are still recovery points on that disk?  If not, is there a way to tell which recovery points pertaining to this datasource are still on Disk 1?

    That message sounds like it expects data to be on the old disk but it may be having issues.  These are all dynamic volumes so taking the disk offline and then back online usually fixes dynamic disk errors.  Then do a rescan in DPM.
    I usually find the volume on the disk by using disk manager. 
    Go to the protected item (e.g. VM, volume, etc.) in the Protection view
    In the bottom pane, choose the Click to view details link to get the path
    Right-click on the path and copy it.
    Paste the path into Notepad or similar so you can see it
    In the path, there will be a GUID prefixed by "vol_"
    Open Disk Manager (diskmgmt.msc)
    Look for the volume that has DPM-vol_GUID where GUID is from step 6.  Click on it and that will highlight the partition in the display at the bottom of disk manager.  That is the disk that holds all the data for that protection item.
    Sometimes it can be hard to tell which partition is highlighted on the disk and I'm sure there is a simpler, more elegant way. 
    After you find the partition, you could clone it onto a new disk.
    You may have to end up just replacing the disk and recreating the replica.  You can do that by following the information in this post (http://social.technet.microsoft.com/Forums/en-US/fa0402d3-67d4-4fe5-8ed1-5666fd6b0ff6/dpm-disk-failure?forum=dpmstorage). 
    Replace the bad drive and then run DPMSYNC -Reallocatereplica.
    Not sure if this helps...
    Rob

Maybe you are looking for