none
Data pruning question RRS feed

  • Question

  • Have a DPM2007 PG protecting file data. Settings are: 
    14 days short term retention to disk.
    Sync every 2 hours.
    Recovery points created 12PM every Mon to Fri. 

    Currently utilising 241 GB for replica volume and 8 GB for recovery point.

    If I were to set this to 7 days instead of 14 what should I be expected to see for the utilised sizes and when? I was expecting the utilisation to be reduced dramatically when halving the retention from 14 to 7 days is this not the case?

    Regards,

    M

    Thursday, November 11, 2010 5:32 AM

Answers

  • Hi,

    14 days retention with RP's taken M-F ( 5 days / week) means you have about three weeks of recovery points assuming all recovery were successful.  With only 8GB worth of changes in three weeks, about the best you could hope for is saving about 4GB by reducing the retention from 14 days to 7 days.  Keep in mind we won't prune until midnight unless you manually run the pruneshadowcopies.ps1 script.

     

    The below power shell script will show the size of every recovery point on disk for a selected data source.

     

    # Shows all recovery points on selected data sources in a PG
    $version="V1.2"

    $MB=1024*1024
    $logfile="SHOW-RecoveryPoints-DS-disk.LOG"
    $wait=10 #seconds

    function Show_help
    {
     cls
    # $l="=" * 79
    # write-host $l -foregroundcolor magenta
    # write-host -nonewline "<<<" -foregroundcolor white
    # write-host -nonewline "<<<"
    # write-host ">>>" -foregroundcolor white
    # write-host $l -foregroundcolor magenta
     write-host "Version: $version" -foregroundcolor cyan
            write-host "User Selects data source to Show DISK BASED recovery points for" -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
    "****************** NEW RUN **********************" >> $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
    $ds=$null
    foreach ($onepg in $pglist) {$ds += (get-datasource $onepg)}
    $ds =$ds + ( Get-Datasource $DPMservername -inactive)
    #$ds | format-table -autosize
    $i=0
    foreach ($l in $ds) {
     "[{0}] {1} `t`t {2}" -f $i,$l.psinfo.netbiosname, $l.logicalpath
     $i++
     }
    $DSname=read-host "Enter a data source index from list above "
    if (!$DSname)
    {
     write-host "No datasource selected `n" -foregroundcolor yellow
     "Aborted on Datasource name" >> $logfile
     exit 0
    }
    $DSselected=$ds[$DSname]
    "Selected datasource = $DSselected" >> $logfile
    $DSselected
    #$DSselected=$ds | where {$_.name -eq $DSname}
    if (!$DSselected)
    {
     write-host "No datasource selected `n" -foregroundcolor yellow
     "Aborted on Datasource name" >> $logfile
     exit 0
    }

    write-host "`nCollecting recoverypoint information for datasource $DSselected.name" -foregroundcolor green
    $oldShadowUsage=[math]::round($DSselected.ShadowCopyUsedspace/$MB,1)
    $line=("Total DISK recoverypoint usage {0} MB in {1} recovery points" -f $oldShadowUsage ,$DSselected.TotalRecoveryPoints  )
    write-host $line`n -foregroundcolor white
    $line >> $logfile

    [datetime]$enddate=get-date -uformat %D
    write-host "Showing recovery points for $DSselected" -foregroundcolor yellow
    $rp=get-recoverypoint $DSselected
    $RPselected=$rp | where {($_.Isincremental -eq $FALSE)-and ($_.DataLocation -eq "Disk")}
    if (!$RPselected)
    {
     write-host "No recovery points found!" -foregroundcolor yellow
     "No recovery points found, aborting...!" >> $logfile
     exit 0
    }

    foreach ($onerp in $RPselected)
    {
     $rtime=[string]$onerp.representedpointintime
      $dlocation=[string]$onerp.DataLocation
      $rsize=[math]::round(($onerp.size/$MB),1)
      $line= "Found {0} size {1} MB  Incremental={2} Location={3}"-f $rtime, $rsize,$onerp.Isincremental,$Dlocation
            $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
                    write-host "$line" -foregroundcolor yellow
     }
    }


    $line >> $logfile
    $line="These RP's include only DISK and dependent recovery points"
    write-host $line -foregroundcolor red
    #$line="Data source activity = " + $DSselected.Activity
    write-host "Open SHOW-RecoveryPoints-DS-disk.LOG now ?"
    write-host "Enter <<< Y/N >>>" -foregroundcolor white
    $Y=read-host
    if ($Y -eq "Y")
    {
    Notepad SHOW-RecoveryPoints-DS-disk.LOG
    }
    else
    {
    exit 0
    }

     


    Regards, Mike J. [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights.
    Thursday, November 11, 2010 11:40 PM
    Moderator

All replies

  • Hi,

    14 days retention with RP's taken M-F ( 5 days / week) means you have about three weeks of recovery points assuming all recovery were successful.  With only 8GB worth of changes in three weeks, about the best you could hope for is saving about 4GB by reducing the retention from 14 days to 7 days.  Keep in mind we won't prune until midnight unless you manually run the pruneshadowcopies.ps1 script.

     

    The below power shell script will show the size of every recovery point on disk for a selected data source.

     

    # Shows all recovery points on selected data sources in a PG
    $version="V1.2"

    $MB=1024*1024
    $logfile="SHOW-RecoveryPoints-DS-disk.LOG"
    $wait=10 #seconds

    function Show_help
    {
     cls
    # $l="=" * 79
    # write-host $l -foregroundcolor magenta
    # write-host -nonewline "<<<" -foregroundcolor white
    # write-host -nonewline "<<<"
    # write-host ">>>" -foregroundcolor white
    # write-host $l -foregroundcolor magenta
     write-host "Version: $version" -foregroundcolor cyan
            write-host "User Selects data source to Show DISK BASED recovery points for" -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
    "****************** NEW RUN **********************" >> $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
    $ds=$null
    foreach ($onepg in $pglist) {$ds += (get-datasource $onepg)}
    $ds =$ds + ( Get-Datasource $DPMservername -inactive)
    #$ds | format-table -autosize
    $i=0
    foreach ($l in $ds) {
     "[{0}] {1} `t`t {2}" -f $i,$l.psinfo.netbiosname, $l.logicalpath
     $i++
     }
    $DSname=read-host "Enter a data source index from list above "
    if (!$DSname)
    {
     write-host "No datasource selected `n" -foregroundcolor yellow
     "Aborted on Datasource name" >> $logfile
     exit 0
    }
    $DSselected=$ds[$DSname]
    "Selected datasource = $DSselected" >> $logfile
    $DSselected
    #$DSselected=$ds | where {$_.name -eq $DSname}
    if (!$DSselected)
    {
     write-host "No datasource selected `n" -foregroundcolor yellow
     "Aborted on Datasource name" >> $logfile
     exit 0
    }

    write-host "`nCollecting recoverypoint information for datasource $DSselected.name" -foregroundcolor green
    $oldShadowUsage=[math]::round($DSselected.ShadowCopyUsedspace/$MB,1)
    $line=("Total DISK recoverypoint usage {0} MB in {1} recovery points" -f $oldShadowUsage ,$DSselected.TotalRecoveryPoints  )
    write-host $line`n -foregroundcolor white
    $line >> $logfile

    [datetime]$enddate=get-date -uformat %D
    write-host "Showing recovery points for $DSselected" -foregroundcolor yellow
    $rp=get-recoverypoint $DSselected
    $RPselected=$rp | where {($_.Isincremental -eq $FALSE)-and ($_.DataLocation -eq "Disk")}
    if (!$RPselected)
    {
     write-host "No recovery points found!" -foregroundcolor yellow
     "No recovery points found, aborting...!" >> $logfile
     exit 0
    }

    foreach ($onerp in $RPselected)
    {
     $rtime=[string]$onerp.representedpointintime
      $dlocation=[string]$onerp.DataLocation
      $rsize=[math]::round(($onerp.size/$MB),1)
      $line= "Found {0} size {1} MB  Incremental={2} Location={3}"-f $rtime, $rsize,$onerp.Isincremental,$Dlocation
            $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
                    write-host "$line" -foregroundcolor yellow
     }
    }


    $line >> $logfile
    $line="These RP's include only DISK and dependent recovery points"
    write-host $line -foregroundcolor red
    #$line="Data source activity = " + $DSselected.Activity
    write-host "Open SHOW-RecoveryPoints-DS-disk.LOG now ?"
    write-host "Enter <<< Y/N >>>" -foregroundcolor white
    $Y=read-host
    if ($Y -eq "Y")
    {
    Notepad SHOW-RecoveryPoints-DS-disk.LOG
    }
    else
    {
    exit 0
    }

     


    Regards, Mike J. [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights.
    Thursday, November 11, 2010 11:40 PM
    Moderator
  • Thanks Mike for your answer.
    I was expecting a reduction in the replica volume but that won't be the case since I am not changing anything to this part. Only the recovery point volume is affected by this change.

    Thanks again

    Friday, November 12, 2010 3:37 AM