none
Finding out what backup on a tape is preventing tape from Expiring RRS feed

  • Question

  • Background

    DPM 2012 R2 4.2.1594.0

    As usual, last week we had a set of tapes reported as being required onsite by DPM (as their useful offsite period has expired). They were shipped into us and we inserted the tapes. Usually the tapes are either no longer marked as Offsite Ready but are not marked expired.

    DPM PruneShadowCopies has never appeared to run at all and I have been unable to troubleshoot this properly. Instead, I have three scripts that I customised (based on an original script that I found online but I can't recall where) and each script iterates through one of my three PGs, identifies RPs that are over the allotted period (e.g. 25 days for one group) and then force expire the RPs on tape.

    I do this manually every week and it’s been working well for some years now.

    Only recently did I notice that one of these scripts was actually expiring disk backups too and much earlier than their allotted limit of 25 days. Before correcting the script I decided to try running PruneShadowCopies again and it now seemed to work but for only one of the PGs (but this was the most significant PG that backs up all VMs). It seemed to expire the tape RPs and lave the correct number of disk based RPs in place .

    I now run PruneShadowCopies (8/05/2017 pruneshadowcopiesDpm2010.ps1) first each week, then my two other script to expire the tape backups for the remaining two PGs.

    Issue

    In this case, the VM PG tapes still had the Offsite Ready green tick despite the expiration date on each RP in the tape being listed as Jul 12th - over a week earlier. I left them for a few days more. They still did not show expired after running pruneshadowcopies2010.

    The VM PG that pruneshadowcopies runs against is backing up the bulk of VMs from Hyper-V to disk for 25 days and tape for 13 weeks. There is a single express backup @ 18:00 Everyday.

    Right now, these tapes have no status next to them - neither “Expired” nor “Offsite Ready”. The date of each RP on the tape is July 12th and the backup date is April 12th. I cannot "Mark tape as free": "the selected tapes cannot be marked as free becuase they belong to protection groups."

    I run “wilson-duetape.ps1”. This script lists the tapes that are offsite and the three tapes in the library that are Offsite Ready. It does not list anything to do with the tapes I'm having an issue with - the output ignores these tapes as if they're not in DPM at all.

    I suspect that, if I run my old force script, it will force expire the data on the tapes successfully by rooting out the disk based backups that are responsible (but I don’t want to lose these disk based RPs when I don’t know which ones it will be).

    Possibly Related

    I have two Hyper-V VMs running Linux in this PG. Since a recent update, these Linux VMs no longer create Recovery Points when up and running. As such, they probably don't meet the 25 days limit specified. I have temporarily deleted their membership in the PG and their inactive disk based backups but still those tapes are not expired.

    Question

    I realise that DPM is probably doing exactly what it is supposed to and that I am missing something but that is because I don't know how to identify the issue. Can someone assist me in identifying what exactly on the disks or PG is preventing these tapes from expiring in DPM?

    Monday, July 31, 2017 12:54 PM

Answers

  • The DPM PruneShadowCopies script is only expiring/removing some disk based RPs it seems - and not the tape RPs. I went back to using the old custom script but updated it to treat disk based Recovery Points differently to tape based RPs. I thought I'd attach it here in case it's of use. (My Protection Group is for 25 days on disk and 91 days on tape). There's a few references in here that don't really need to be here as it's a jury rigging of scripts from the Internet.

    #This Script allowes you to remove Recovery Points on a Microsoft Data Protection Manager 2007 Server, after 26/92 Days.
    #This will Remove All Recoverypoints on Tape over 91 days and on disk over 25 days
    
    param([string] $dpmname, [int32] $diskdays ,  [int32] $tapedays )
    $dpmname = "DPMSERVER"
    $diskdays = "26"
    $tapedays = "92"
    function Usage()
    {
    write-host
    write-host "Usage::"
    write-host "RemoveRecoveryPointsOlderThan25Days.ps1 "DPMServername" Days(In int)"
    write-host
    }
    if(("-?","-help") -contains $args[0])
    {
    Usage
    exit 0
    }
    
    $pgList = Get-ProtectionGroup DPMSERVER | Where-Object {$_.Name -eq 'PG_Important_VMs'}
    
    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
      $media = $rp.Location
      $rpDays = $datediff.Days
     Write-Host "Recovery Point is $rpDays days old "
       if($media -eq 'Media')
        {
         if($rpDays -ge $tapedays)
         {
         Write-Host "WARNING Removing Tape Based Recovery Point older than $rpDays"
         Remove-RecoveryPoint -RecoveryPoint $rp -Confirm:$False
         }
        Write-Host "^^^Tape Based Backup^^^"
        }
    
       if($media -eq 'Disk')
        {
        if($rpDays -ge $diskdays)
         {
         Write-Host "WARNING - Removing Disk Based Recovery Point older than $rpDays"
         Remove-RecoveryPoint -RecoveryPoint $rp -Confirm:$False
         }
        Write-Host "^^^Disk Based Backup^^^"
        }
    }
    }
    }
    


    • Marked as answer by Steve Ireland Thursday, August 10, 2017 3:00 PM
    • Edited by Steve Ireland Thursday, August 10, 2017 3:02 PM Spelling
    Thursday, August 10, 2017 2:57 PM

All replies

  • Does anyone know how I might see which condition in a PG is withholding an actual expired backup on the tape from being allowed to technically expire?
    Friday, August 4, 2017 9:03 AM
  • The DPM PruneShadowCopies script is only expiring/removing some disk based RPs it seems - and not the tape RPs. I went back to using the old custom script but updated it to treat disk based Recovery Points differently to tape based RPs. I thought I'd attach it here in case it's of use. (My Protection Group is for 25 days on disk and 91 days on tape). There's a few references in here that don't really need to be here as it's a jury rigging of scripts from the Internet.

    #This Script allowes you to remove Recovery Points on a Microsoft Data Protection Manager 2007 Server, after 26/92 Days.
    #This will Remove All Recoverypoints on Tape over 91 days and on disk over 25 days
    
    param([string] $dpmname, [int32] $diskdays ,  [int32] $tapedays )
    $dpmname = "DPMSERVER"
    $diskdays = "26"
    $tapedays = "92"
    function Usage()
    {
    write-host
    write-host "Usage::"
    write-host "RemoveRecoveryPointsOlderThan25Days.ps1 "DPMServername" Days(In int)"
    write-host
    }
    if(("-?","-help") -contains $args[0])
    {
    Usage
    exit 0
    }
    
    $pgList = Get-ProtectionGroup DPMSERVER | Where-Object {$_.Name -eq 'PG_Important_VMs'}
    
    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
      $media = $rp.Location
      $rpDays = $datediff.Days
     Write-Host "Recovery Point is $rpDays days old "
       if($media -eq 'Media')
        {
         if($rpDays -ge $tapedays)
         {
         Write-Host "WARNING Removing Tape Based Recovery Point older than $rpDays"
         Remove-RecoveryPoint -RecoveryPoint $rp -Confirm:$False
         }
        Write-Host "^^^Tape Based Backup^^^"
        }
    
       if($media -eq 'Disk')
        {
        if($rpDays -ge $diskdays)
         {
         Write-Host "WARNING - Removing Disk Based Recovery Point older than $rpDays"
         Remove-RecoveryPoint -RecoveryPoint $rp -Confirm:$False
         }
        Write-Host "^^^Disk Based Backup^^^"
        }
    }
    }
    }
    


    • Marked as answer by Steve Ireland Thursday, August 10, 2017 3:00 PM
    • Edited by Steve Ireland Thursday, August 10, 2017 3:02 PM Spelling
    Thursday, August 10, 2017 2:57 PM