Get-AzRecoveryServicesBackupRecoveryPoint
Gets the recovery points for a backed up item.
Note
This is the previous version of our documentation. Please consult the most recent version for up-to-date information.
Syntax
Get-AzRecoveryServicesBackupRecoveryPoint
[-Item] <ItemBase>
[-UseSecondaryRegion]
[-Tier <RecoveryPointTier>]
[-IsReadyForMove <Boolean>]
[-TargetTier <RecoveryPointTier>]
[-VaultId <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzRecoveryServicesBackupRecoveryPoint
[[-StartDate] <DateTime>]
[[-EndDate] <DateTime>]
[-Item] <ItemBase>
[-UseSecondaryRegion]
[-Tier <RecoveryPointTier>]
[-IsReadyForMove <Boolean>]
[-TargetTier <RecoveryPointTier>]
[-VaultId <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzRecoveryServicesBackupRecoveryPoint
[-Item] <ItemBase>
[-RecoveryPointId] <String>
[[-KeyFileDownloadLocation] <String>]
[-UseSecondaryRegion]
[-VaultId <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
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
$vault = Get-AzRecoveryServicesVault -ResourceGroupName "resourceGroup" -Name "vaultName"
$startDate = (Get-Date).AddDays(-7)
$endDate = Get-Date
$container = Get-AzRecoveryServicesBackupContainer -ContainerType AzureVM -Status Registered -Name "V2VM" -VaultId $vault.ID
$backupItem = Get-AzRecoveryServicesBackupItem -ContainerType AzureVM -WorkloadType AzureVM -VaultId $vault.ID
$rp = Get-AzRecoveryServicesBackupRecoveryPoint -Item $backupItem -StartDate $startdate.ToUniversalTime() -EndDate $enddate.ToUniversalTime() -VaultId $vault.ID
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
$vault = Get-AzRecoveryServicesVault -ResourceGroupName "resourceGroup" -Name "vaultName"
$startDate = (Get-Date).AddDays(-7).ToUniversalTime()
$endDate = Get-Date.ToUniversalTime()
$item = Get-AzRecoveryServicesBackupItem -BackupManagementType "AzureVM" -WorkloadType "AzureVM" -VaultId $vault.ID
$rp = Get-AzRecoveryServicesBackupRecoveryPoint -StartDate $startDate -EndDate $endDate -VaultId $vault.ID -Item $item[3]
-IsReadyForMove $true -TargetTier 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
$vault = Get-AzRecoveryServicesVault -ResourceGroupName "resourceGroup" -Name "vaultName"
$startDate = (Get-Date).AddDays(-7).ToUniversalTime()
$endDate = Get-Date.ToUniversalTime()
$item = Get-AzRecoveryServicesBackupItem -BackupManagementType "AzureVM" -WorkloadType "AzureVM" -VaultId $vault.ID
$rp = Get-AzRecoveryServicesBackupRecoveryPoint -StartDate $startDate -EndDate $endDate -VaultId $vault.ID -Item $item[3]
-Tier VaultStandard
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.
Parameters
The credentials, account, tenant, and subscription used for communication with azure.
| Type: | IAzureContextContainer |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the end of the date range.
| Type: | Nullable<T>[DateTime] |
| Position: | 1 |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Filters the Recovery Points based on whether RP is Ready to move to target tier. Use this along with target tier parameter.
| Type: | Boolean |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the item for which this cmdlet gets recovery points. To obtain an AzureRmRecoveryServicesBackupItem object, use the Get-AzRecoveryServicesBackupItem cmdlet.
| Type: | ItemBase |
| Position: | 2 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Specifies the location to download the input file to restore the KeyVault key for an encrypted virtual machine.
| Type: | String |
| Position: | 2 |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the recovery point ID.
| Type: | String |
| Position: | 1 |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the start of the date range.
| Type: | Nullable<T>[DateTime] |
| Position: | 0 |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Target tier to check move readiness of recovery point. Currently only valid value is 'VaultArchive'.
| Type: | RecoveryPointTier |
| Accepted values: | VaultArchive |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Filter recovery points based on tier value.
| Type: | RecoveryPointTier |
| Accepted values: | VaultStandard, Snapshot, VaultArchive, VaultStandardRehydrated, SnapshotAndVaultStandard, SnapshotAndVaultArchive |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Filters from Secondary Region for Cross Region Restore
| Type: | SwitchParameter |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
ARM ID of the Recovery Services Vault.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |