The Get-AzRecoveryServicesBackupRecoveryPoint cmdlet gets the recovery points for a backed up Azure Backup item.
After an item has been backed up, an AzureRmRecoveryServicesBackupRecoveryPoint object has one or more recovery points.
Set the vault context by using the -VaultId parameter.
Examples
Example 1: Get recovery points from the last week for an item
The first command gets vault object based on vaultName.
The second command gets the date from seven days ago, and then stores it in the $startDate variable.
The third command gets today's date, and then stores it in the $endDate variable.
The fourth command gets AzureVM backup containers, and stores them in the $Container variable.
The fifth command gets the backup item based on workloadType, vaultId and then stores it in the $backupItem variable.
The last command gets an array of recovery points for the item in $BackupItem, and then stores them in the $rp variable.
Example 2: Get recovery points which are ready to be moved to VaultArchive
The first command gets vault object based on vaultName. The second command gets the date from seven days ago, and then stores it in the $startDate variable.
The third command gets today's date, and then stores it in the $endDate variable.
The fourth command gets backup items based on backupManagementType and workloadType, vaultId and then stores it in the $item variable.
The last command gets an array of recovery points for the item in $backupItem which are ready to be moved to VaultArchive tier and
then stores them in the $rp variable.
Example 3: Get recovery points in a particular tier
The first command gets vault object based on vaultName. The second command gets the date from seven days ago, and then stores it in the $startDate variable.
The third command gets today's date, and then stores it in the $endDate variable.
The fourth command gets backup items based on backupManagementType and workloadType, vaultId and then stores it in the $item variable.
The last command gets an array of recovery points for the item in $backupItem which are ready to be moved to VaultArchive tier and
then stores them in the $rp variable.
Example 4: Getting pruned recovery points in last year after modify policy operation
The first command gets vault object based on vaultName. The second command gets the date from one year days ago, and then stores it in the $startDate variable.
The third command gets today's date, and then stores it in the $endDate variable.
The fourth command gets backup items based on backupManagementType and workloadType, vaultId and then stores it in the $item variable.
The fifth command gets an array of recovery points for the item in $item which are present before the modify policy operation in last one year.
Now we move on to update the policy. The sixth command fetches the policy to be updated which is used to protect the backup item $item[0].
The seventh, eight and ninth commands disable the yearly and monthly retention in the policy to prune the older recovery points.
The tenth command finally updates the retention policy.
The eleventh command waits in the same powershell session until the recovery points are pruned and fetches the recovery points within the same time range, after the policy changes are applied.
The twelfth command takes a diff between recovery point list before and after pruning occurs.
The thirteenth command read the recovery points, from the diff, which were present before and are now pruned.
The last command displays the list of pruned recovery points.
Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Specifies the item for which this cmdlet gets recovery points.
To obtain an AzureRmRecoveryServicesBackupItem object, use the Get-AzRecoveryServicesBackupItem cmdlet.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters.
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.