|
|
||||||
|
#1
|
|
|
|
|
I want to manage the deletion of recovery points using a script. I see an
example of how I can use the following PS script to remove all recovery points but I have been unable to create a filter to uniquely identify a specific recovery point to delete. EXAMPLE 1 $pg = Get-ProtectionGroup -DPMServerName TestingServer $ds = Get-Datasource -ProtectionGroup $pg $rp = Get-RecoveryPoint -Datasource $ds Remove-RecoveryPoint -RecoveryPoint $rp This command removes all the recovery points for a data source. What property is used as the unique ID for a recovery point? Owen |
|
|
|
#2
|
|
|
|
|
You can filter out recovery points which you want to remove
Say if you want to remove all disk based recovery point then you could do something like $rp = get-recoveryPoint -Datasource $ds $myrp = $rp | where-object {$_.Datalocation -eq "Disk"} remove-recoverypoint $myrp or you can also filter based on the RepresentedPointInTime (i.e the backup time for a recovery source) you could filter and get all the recovery points whose RepresentedPointInTime is less than today - 7 to get all the Point In Times which are more than a week old Thanks, Vikash This posting is provided "AS IS" with no warranties, and confers no rights. get-recoveryPoint -Datasource $ds | where-object { "OwenC" <OwenC> wrote in message news:1164 [..] |
|
#3
|
|
|
|
|
Vikash,
Thanks for the response. I tried creating a filter on RepresentedPointInTime but it doesn't work. This the value that I actually want to filter on. I used a filter of <where-object {$_.RepresentedPointInTime -eq "05/03/2008 6:00:42 PM"}>. This time is an exact copy of what is displayed as one of the values for the RepresentedPointInTime property. Please post an example filter on RepresentedPointInTime so that I can see how to implement it. I also tried using the UtcRepresentedPointInTime property. Owen "Vikash Jain [MSFT]" <vikashj> wrote in message news:4376 [..] |
|
#4
|
|
|
|
|
Hi Owen,
Here is the complete example cmdlets for your case, these are working fine. I have verified these on my system. $pg = Get-ProtectionGroup -DPMServerName TestingServer $ds = Get-Datasource -ProtectionGroup $pg $rp = Get-RecoveryPoint -Datasource $ds | where {$_.RepresentedPointInTime -eq "3/6/2008 10:07:27 PM"} remove-recoverypoint $rp make sure you are passing correct $pg and $ds here. As if your system has more than one PG or more than one DS protected you need to filter them also. do let me know if you require more info. Thanks, Mukul This posting is provided "AS IS" with no warranties, and confers no rights. "OwenC" <OwenC> wrote in message news:1944 [..] |
|
#5
|
|
|
|
|
Mukul,
Thanks. I was using the same filter as you were but the problem seems to be that the leading zero that is shown with the day and month when the RepresentedPointInTime property is displayed can't be used the property is being used in a filter. Here are some PS one liners relevant to this type operation: * Display all recovery points on the server TestingServer Get-ProtectionGroup -DPMServerName TestingServer | %{Get-Datasource -ProtectionGroup $_} | %{Get-RecoveryPoint -Datasource $_} * Display all recovery points on the server TestingServer for the protection group TestProtectionGroup Get-ProtectionGroup -DPMServerName TestingServer | where {$_.FriendlyName -eq "TestProtectionGroup"} | %{Get-Datasource -ProtectionGroup $_} | %{Get-RecoveryPoint -Datasource $_} * Display only the recovery point on the server TestingServer for the protection group TestProtectionGroup for a specific time (day and month values can't have leading zeros) Get-ProtectionGroup -DPMServerName TestingServer | where {$_.FriendlyName -eq "TestProtectionGroup"} | %{Get-Datasource -ProtectionGroup $_} | %{Get-RecoveryPoint -Datasource $_} | where {$_.RepresentedPointInTime -eq "3/5/2008 6:00:42 PM"} * Delete only the recovery point on the server TestingServer for the protection group TestProtectionGroup for a specific time Get-ProtectionGroup -DPMServerName TestingServer | where {$_.FriendlyName -eq "TestProtectionGroup"} | %{Get-Datasource -ProtectionGroup $_} | %{Get-RecoveryPoint -Datasource $_} | where {$_.RepresentedPointInTime -eq "3/5/2008 6:00:42 PM"} | %{Remove-RecoveryPoint $_} "Mukul Shekhawat [MSFT]" wrote: [..] |
|
|
| Similar Threads | |
| DPM 2007 - Remove Recovery Point Hi- I have a DPM 2007 server which is being used to backup Exchange 2007 SP2. I have a protection group which is backing up three storage groups and storing the data on... |
|
| Scheduled Recovery Point Backups Fail-Manual Recovery Points Succe I get Insufficient resources exist error on one out of two Hyper-V VM backups. They are both in the same Protection Group and are scheduled to run at 8PM. One fails so I run... |
|
| Remove old recovery point In the past I had 1 big protection group with a 31 day history. (cause by the 1 PG per tape) now that you can add multiple PG to 1 tape I created a seperate PG for my... |
|
| Recovery Point Schedule Not Matching Recovery Points I have a protection group created for backup of a file server using short term to disk only. The syncronization is set for every 6 hours, and the recovery point schedule is... |
|
| How to find closest point(s) around a specific point in point cloud? I can't find any site with information about the simplest way to locate the n number of closest points adjacent to a point in a 3d point cloud with scattered... |
|
|
All times are GMT. The time now is 12:00 PM. | Privacy Policy
|