Move-AzRecoveryServicesBackupRecoveryPoint
Moves the recovery point from source tier to destination tier.
Syntax
Move-AzRecoveryServicesBackupRecoveryPoint
[-RecoveryPoint] <RecoveryPointBase>
[-SourceTier] <RecoveryPointTier>
[-DestinationTier] <RecoveryPointTier>
[-VaultId <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Move-AzRecoveryServicesBackupRecoveryPoint cmdlet moves the recovery point from source tier to destination tier. Currently only valid Source tier is VaultStandard, only valid destination tier is VaultArchive.
Examples
Example 1: Move recovery point from VaultStandard tier to VaultArchive tier
$vault = Get-AzRecoveryServicesVault -ResourceGroupName "resourceGroup" -Name "vaultName"
$item = Get-AzRecoveryServicesBackupItem -BackupManagementType "AzureVM" -WorkloadType "AzureVM" -VaultId $vault.ID
$startDate = (Get-Date).AddDays(-7)
$endDate = Get-Date
$rp = Get-AzRecoveryServicesBackupRecoveryPoint -Item $item[3] -StartDate $startDate.ToUniversalTime() -EndDate $endDate.ToUniversalTime() -VaultId $vault.ID -Tier VaultStandard
Move-AzRecoveryServicesBackupRecoveryPoint -RecoveryPoint $rp[2] -SourceTier VaultStandard -DestinationTier VaultArchive -VaultId $vault.ID
First we get the recovery services vault, backup items list. Then, we fetch the recovery points for a particular backup item ($item[3] in this case) which are in VaultStandard tier. Then we trigger move for one of the recovery points from the rp list to VaultArchive tier.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DestinationTier
Destination Tier for Recovery Point move. Currently the only acceptable value is 'VaultArchive'
Type: | RecoveryPointTier |
Accepted values: | VaultArchive |
Position: | 2 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RecoveryPoint
Recovery Point to move to archive
Type: | RecoveryPointBase |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-SourceTier
Source Tier for Recovery Point move. Currently the only acceptable value is 'VaultStandard'
Type: | RecoveryPointTier |
Accepted values: | VaultStandard |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VaultId
ARM ID of the Recovery Services Vault.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |