none
DPM 2007: Expired recovery points not getting deleted completely RRS feed

  • Question

  • Hi,

    I have a DPM 2007 server running in my environment. It's being used to take the backup of the File servers. The DPM server has already been updated to SP1. The problem that I am having is I'm constantly running out of space on the recovery points volume. Though the recovery points are getting deleted fine according to the retention range that's been set and even after deleting them manually, i still don't see any change in the free space of the storage pool attached to the DPM server.

    Please note that I have already applied the following patch:

    http://support.microsoft.com/default.aspx?scid=kb;EN-US;970867

    Also, I am able to run pruneshadowcopies.ps1 without any errors (it doesn't return anything so i believe it is finishing properly)

    Any help would be appreciated.

    Thanks

    Tuesday, May 25, 2010 6:37 AM

Answers

  • Right, heres this script. THIS IS NOT MY SCRIPT, I DID NOT WRITE IT, I just cant find the website I found it on originally, so if you made this please take the credit.

    Make a .ps1 file and put this script in and execute from DPM Shell. It will ask for DPM server name and how many days of retention you want to keep. So if you say 30 days it will delete ALL recovery points from all protections groups over 30 days old, so be carefull. I had to run this several times over the course of 24 hours as it throws up a few errors, this is ok, just keep running it until you DONT have any errors. I think its something to do with the order the recovery points have to be deleted.

    param([string] $dpmname, [int32] $days )
    
    
    
    function Usage()
    
    {
    
    write-host
    
    write-host "Usage::"
    
    write-host "RemoveRecoveryPoints.ps1 "DPMServername" Days(In int)"
    
    write-host
    
    
    
    }
    
    
    
    if(("-?","-help") -contains $args[0])
    
    {
    
    Usage
    
    exit 0
    
    }
    
    
    
    
    
    
    
    if(!$dpmname)
    
    {
    
    $dpmname = read-host "DPMServerName:"
    
    }
    
    
    
    if(!$days)
    
    {
    
    $days = read-host "Number of Days"
    
    }
    
    
    
    
    
    
    
    $pgList = Get-ProtectionGroup $dpmname
    
    
    
    Foreach($pg in $pgList)
    
    {
    
    $Name = $pg.FriendlyName
    
    Write-Host "Getting Data Source list for PG $Name..."
    
    $dsList = Get-Datasource $pg
    
    
    
    Foreach($ds in $dsList)
    
    {
    
    $Name = $ds.Name
    
    Write-Host "Getting Recovery point list for Data-Source $Name ..."
    
    $rpList = Get-RecoveryPoint $ds
    
    
    
    Foreach($rp in $rpList)
    
    {
    
    
    
    $date = Get-Date
    
    $datediff = $date - $rp.RepresentedPointInTime
    
    $rpDays = $datediff.Days
    
    Write-Host "Recovery Point is $rpDays days old "
    
    if($rpDays -ge $days)
    
    {
    
    Write-Host "Removing Recovery Point older than $rpDays"
    
    Remove-RecoveryPoint -RecoveryPoint $rp -Confirm:0
    
    
    
    }
    
    }
    
    }
    
    
    
    }
    I have a vague recolection of coming across this on eggheadcafe.
    Tuesday, May 25, 2010 8:32 AM

All replies

  • Not much help I know, but the prune shadowcopies.ps1 or any permutations of this script only free up space in a recovery point volume that has been defined already for that backup job. It does not shrink the volumes to return space the storage pool.

    For example, if you have an Exchange backup defined with a recovery point volume defined of 100gig with 50 gig free, the pruneshadowcopies may delete 20gig of old exchange backups thus giving you 70gig of free space for the Exchange recovery point volume.

    You can shrink volumes in DPM2010

    Tuesday, May 25, 2010 7:53 AM
  • "For example, if you have an Exchange backup defined with a recovery point volume defined of 100gig with 50 gig free, the pruneshadowcopies may delete 20gig of old exchange backups thus giving you 70gig of free space for the Exchange recovery point volume."

     

    I understand that but this is NOT happening when i run the pruneshadowcopies.ps1 script. The DPM server is deleting the old recovery points just fine but is unable to recover the free space utilized by those recovery points and is constantly running out of space. how do i deal with this?

    Btw thanks for the reply.

    Tuesday, May 25, 2010 8:08 AM
  • Are you talking about this:

    http://nukeitmike.com/blog/2009/08/07/follow-up-to-the-dpm-recovery-point-expiration-issues/

    But it's my understanding that this script only shows the recovery points, without actually expiring them.

    Tuesday, May 25, 2010 8:26 AM
  • Right, heres this script. THIS IS NOT MY SCRIPT, I DID NOT WRITE IT, I just cant find the website I found it on originally, so if you made this please take the credit.

    Make a .ps1 file and put this script in and execute from DPM Shell. It will ask for DPM server name and how many days of retention you want to keep. So if you say 30 days it will delete ALL recovery points from all protections groups over 30 days old, so be carefull. I had to run this several times over the course of 24 hours as it throws up a few errors, this is ok, just keep running it until you DONT have any errors. I think its something to do with the order the recovery points have to be deleted.

    param([string] $dpmname, [int32] $days )
    
    
    
    function Usage()
    
    {
    
    write-host
    
    write-host "Usage::"
    
    write-host "RemoveRecoveryPoints.ps1 "DPMServername" Days(In int)"
    
    write-host
    
    
    
    }
    
    
    
    if(("-?","-help") -contains $args[0])
    
    {
    
    Usage
    
    exit 0
    
    }
    
    
    
    
    
    
    
    if(!$dpmname)
    
    {
    
    $dpmname = read-host "DPMServerName:"
    
    }
    
    
    
    if(!$days)
    
    {
    
    $days = read-host "Number of Days"
    
    }
    
    
    
    
    
    
    
    $pgList = Get-ProtectionGroup $dpmname
    
    
    
    Foreach($pg in $pgList)
    
    {
    
    $Name = $pg.FriendlyName
    
    Write-Host "Getting Data Source list for PG $Name..."
    
    $dsList = Get-Datasource $pg
    
    
    
    Foreach($ds in $dsList)
    
    {
    
    $Name = $ds.Name
    
    Write-Host "Getting Recovery point list for Data-Source $Name ..."
    
    $rpList = Get-RecoveryPoint $ds
    
    
    
    Foreach($rp in $rpList)
    
    {
    
    
    
    $date = Get-Date
    
    $datediff = $date - $rp.RepresentedPointInTime
    
    $rpDays = $datediff.Days
    
    Write-Host "Recovery Point is $rpDays days old "
    
    if($rpDays -ge $days)
    
    {
    
    Write-Host "Removing Recovery Point older than $rpDays"
    
    Remove-RecoveryPoint -RecoveryPoint $rp -Confirm:0
    
    
    
    }
    
    }
    
    }
    
    
    
    }
    I have a vague recolection of coming across this on eggheadcafe.
    Tuesday, May 25, 2010 8:32 AM
  • That's so AWESOME!! thanks man.. greatly appreciate it.
    Tuesday, May 25, 2010 9:08 AM