az site-recovery policy
Note
This reference is part of the site-recovery extension for the Azure CLI (version 2.51.0 or higher). The extension will automatically install the first time you run an az site-recovery policy command. Learn more about extensions.
Manage the replication policies for a vault.
Commands
Name | Description | Type | Status |
---|---|---|---|
az site-recovery policy create |
Create operation to create a replication policy. |
Extension | GA |
az site-recovery policy delete |
Delete operation to delete a replication policy. |
Extension | GA |
az site-recovery policy list |
List the replication policies for a vault. |
Extension | GA |
az site-recovery policy show |
Get the details of a replication policy. |
Extension | GA |
az site-recovery policy update |
Update operation to update a replication policy. |
Extension | GA |
az site-recovery policy create
Create operation to create a replication policy.
az site-recovery policy create --name
--resource-group
--vault-name
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--provider-input]
Examples
policy create of type in-mage-rcm
az site-recovery policy create -g "rg" --vault-name "vault_name" -n "policy_name" --provider-specific-input '{in-mage-rcm:{app-consistent-frequency-in-minutes:0,crash-consistent-frequency-in-minutes:5,enable-multi-vm-sync:true,recovery-point-history-in-minutes:1440}}'
policy create for type in-mage-rcm-failback
az site-recovery policy create -g rg --vault-name vault_name -n policy_name_rcm_failback --provider-specific-input '{in-mage-rcm-failback:{app-consistent-frequency-in-minutes:60,crash-consistent-frequency-in-minutes:5}}'
policy create for A2A
az site-recovery policy create -g rg --vault-name vault_name -n policy_name --provider-specific-input {a2a:{multi-vm-sync-status:Enable}}
policy create for hyper-v-replica-azure
az site-recovery policy create -g "rg" --vault-name "vault_name" -n "policy_name" --provider-specific-input '{hyper-v-replica-azure:{application-consistent-snapshot-frequency-in-hours:1,recovery-point-history-duration:2,replication-interval:300}}'
Required Parameters
Replication policy name.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
The name of the recovery services vault.
Optional Parameters
Do not wait for the long-running operation to finish.
The ReplicationProviderSettings. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az site-recovery policy delete
Delete operation to delete a replication policy.
az site-recovery policy delete [--ids]
[--name]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--resource-group]
[--subscription]
[--vault-name]
[--yes]
Examples
policy delete
az site-recovery policy delete -g rg --vault-name vault_name -n policy_name_rcm
Optional Parameters
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Replication policy name.
Do not wait for the long-running operation to finish.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
The name of the recovery services vault.
Do not prompt for confirmation.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az site-recovery policy list
List the replication policies for a vault.
az site-recovery policy list --resource-group
--vault-name
[--max-items]
[--next-token]
Examples
policy list
az site-recovery policy list -g rg --vault-name vault_name
Required Parameters
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
The name of the recovery services vault.
Optional Parameters
Total number of items to return in the command's output. If the total number of items available is more than the value specified, a token is provided in the command's output. To resume pagination, provide the token value in --next-token
argument of a subsequent command.
Token to specify where to start paginating. This is the token value from a previously truncated response.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az site-recovery policy show
Get the details of a replication policy.
az site-recovery policy show [--ids]
[--name]
[--resource-group]
[--subscription]
[--vault-name]
Examples
policy show
az site-recovery policy show -g rg --vault-name vault_name -n policy_name_rcm
Optional Parameters
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Replication policy name.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
The name of the recovery services vault.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az site-recovery policy update
Update operation to update a replication policy.
az site-recovery policy update [--ids]
[--name]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--provider-input]
[--resource-group]
[--subscription]
[--vault-name]
Examples
policy update for type in-mage-rcm
az site-recovery policy update -g rg --vault-name vault_name -n policy_name_rcm --provider-specific-input '{in-mage-rcm:{app-consistent-frequency-in-minutes:0,crash-consistent-frequency-in-minutes:5,enable-multi-vm-sync:true,recovery-point-history-in-minutes:1440}}'
policy update for type in-mage-rcm-failback
az site-recovery policy update -g rg --vault-name vault_name -n policy_name_rcm_failback --provider-specific-input '{in-mage-rcm-failback:{app-consistent-frequency-in-minutes:0,crash-consistent-frequency-in-minutes:10}}'
Optional Parameters
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Policy Id.
Do not wait for the long-running operation to finish.
The ReplicationProviderSettings. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
The name of the recovery services vault.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.