Edit

Share via


Copy-AzRecoveryServicesVault

Copies data from a vault in one region to a vault in another region.

Syntax

AzureRSVaultDataMoveParameterSet (Default)

Copy-AzRecoveryServicesVault
    [-SourceVault] <ARSVault>
    [-TargetVault] <ARSVault>
    [-Force]
    [-DefaultProfile <IAzureContextContainer>]
    [-RetryOnlyFailed]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

AzureRSVaultTriggerMoveParameterSet

Copy-AzRecoveryServicesVault
    [-SourceVault] <ARSVault>
    [-TargetVault] <ARSVault>
    -CorrelationIdForDataMove <String>
    [-Force]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Copy-AzRecoveryServicesVault cmdlet copies data from a vault in one region to a vault in another region. Currently we only support vault level data move.

Examples

Example 1: Copy data from vault1 to vault2

$sourceVault = Get-AzRecoveryServicesVault -ResourceGroupName "rgName1" -Name "vault1"
$targetVault = Get-AzRecoveryServicesVault -ResourceGroupName "rgName2" -Name "vault2"
Copy-AzRecoveryServicesVault -SourceVault $sourceVault -TargetVault $targetVault

The first two cmdlets fetch Recovery Services Vault - vault1 and vault2 respectively. The second command triggers a complete data move from vault1 to vault2. $sourceVault and $targetVault can also belong to different subscription within same tenant, can be fetched by setting different subscription contexts.

Example 2: Copy data from vault1 to vault2 with only failed items

$sourceVault = Get-AzRecoveryServicesVault -ResourceGroupName "rgName1" -Name "vault1"
$targetVault = Get-AzRecoveryServicesVault -ResourceGroupName "rgName2" -Name "vault2"
Copy-AzRecoveryServicesVault -SourceVault $sourceVault -TargetVault $targetVault -RetryOnlyFailed

The first two cmdlets fetch Recovery Services Vault - vault1 and vault2 respectively. The second command triggers a partial data move from vault1 to vault2 with only those items which failed in previous move operations. $sourceVault and $targetVault can also belong to different subscription within same tenant, can be fetched by setting different subscription contexts.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CorrelationIdForDataMove

Correlation Id for triggering DS Move.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

AzureRSVaultTriggerMoveParameterSet
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Force

Forces the data move operation (prevents confirmation dialog) without asking confirmation for target vault storage redundancy type. This parameter is optional.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RetryOnlyFailed

Switch parameter to try data move only for containers in the source vault which are not yet moved.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

AzureRSVaultDataMoveParameterSet
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SourceVault

The source vault object to be moved.

Parameter properties

Type:ARSVault
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-TargetVault

The target vault object where the data has to be moved.

Parameter properties

Type:ARSVault
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:2
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

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.

Inputs

ARSVault

Outputs

String