none
Server Maintenance tasks to age out/expire stale data RRS feed

  • Question

  • Does anyone know of a way to allow laptops to age out of DPM 2012 R2?

    For example, we would like the DPM server to delete any data for laptops that have not had any contact with the server for 6 months. 

    Monday, September 14, 2015 2:06 AM

Answers

  • Hi Malco,

    There is no built-in feature for what you are asking for. You could however use Powershell to locate and delete all Recovery Points older then 6 months (182days). I've written an example how it could look to help you get started:

    # Number of days since last recovery point
    $Days= "182"
    
    # Get Protection Group containing your Laptops
    $pg = Get-ProtectionGroup | where {$_.Name -eq "Laptops"}
    
    # Get all datasources in Protection Group "Laptops"
    $dsList = Get-Datasource -ProtectionGroup $pg
    
    # List and deletes all Recovery Points for datasource in Protection Group "Laptops" that is older than $Days
    ForEach ($ds in $dsList)
    {
        $RPs = @(Get-RecoveryPoint -datasource $ds | Where-Object {$_.RepresentedPointInTime.Date -ge $((Get-Date).AddDays(-$Days))})
        ForEach ($rp in $RPs)
        {
            Remove-DPMRecoveryPoint -RecoveryPoint $rp
        }
    }

    Remeber to be very careful when working with scripts that deletes Recovery Points!

    Kind Regards
    Markus Eliasson


    • Edited by MarkusEliasson Monday, September 14, 2015 7:52 AM
    • Marked as answer by [Malco] Monday, September 14, 2015 10:01 PM
    Monday, September 14, 2015 7:52 AM

All replies

  • Hi Malco,

    There is no built-in feature for what you are asking for. You could however use Powershell to locate and delete all Recovery Points older then 6 months (182days). I've written an example how it could look to help you get started:

    # Number of days since last recovery point
    $Days= "182"
    
    # Get Protection Group containing your Laptops
    $pg = Get-ProtectionGroup | where {$_.Name -eq "Laptops"}
    
    # Get all datasources in Protection Group "Laptops"
    $dsList = Get-Datasource -ProtectionGroup $pg
    
    # List and deletes all Recovery Points for datasource in Protection Group "Laptops" that is older than $Days
    ForEach ($ds in $dsList)
    {
        $RPs = @(Get-RecoveryPoint -datasource $ds | Where-Object {$_.RepresentedPointInTime.Date -ge $((Get-Date).AddDays(-$Days))})
        ForEach ($rp in $RPs)
        {
            Remove-DPMRecoveryPoint -RecoveryPoint $rp
        }
    }

    Remeber to be very careful when working with scripts that deletes Recovery Points!

    Kind Regards
    Markus Eliasson


    • Edited by MarkusEliasson Monday, September 14, 2015 7:52 AM
    • Marked as answer by [Malco] Monday, September 14, 2015 10:01 PM
    Monday, September 14, 2015 7:52 AM
  • Thanks Markus, I'll stat testing... carefully!

    Does anyone know when DPM for laptops will become a proper Laptop backup solution in it's own right with standard features you would expect?

    We use both the server and laptop side of DPM and although the Server side works really well, the Laptop side leaves a lot to be desired!

    Monday, September 14, 2015 10:03 PM