az dataprotection backup-vault
Note
This reference is part of the dataprotection extension for the Azure CLI (version 2.67.0 or higher). The extension will automatically install the first time you run an az dataprotection backup-vault command. Learn more about extensions.
Manage backup vault with dataprotection.
Commands
Name | Description | Type | Status |
---|---|---|---|
az dataprotection backup-vault create |
Create a BackupVault resource belonging to a resource group. |
Extension | GA |
az dataprotection backup-vault delete |
Delete a BackupVault resource from the resource group. |
Extension | GA |
az dataprotection backup-vault identity |
Manage Identities for Backup Vaults. |
Extension | GA |
az dataprotection backup-vault identity assign |
Assign the user or system managed identities. |
Extension | GA |
az dataprotection backup-vault identity remove |
Remove the user or system managed identities. |
Extension | GA |
az dataprotection backup-vault identity show |
Show the details of managed identities. |
Extension | GA |
az dataprotection backup-vault identity wait |
Place the CLI in a waiting state until a condition is met. |
Extension | GA |
az dataprotection backup-vault list |
Gets list of backup vault in a subscription or in a resource group. |
Extension | GA |
az dataprotection backup-vault list-from-resourcegraph |
List backup vaults across subscriptions, resource groups and vaults. |
Extension | GA |
az dataprotection backup-vault resource-guard-mapping |
Manage ResourceGuard mappings for a backup vault. |
Extension | GA |
az dataprotection backup-vault resource-guard-mapping create |
Create a ResourceGuard mapping. |
Extension | GA |
az dataprotection backup-vault resource-guard-mapping delete |
Delete the ResourceGuard mapping. |
Extension | GA |
az dataprotection backup-vault resource-guard-mapping show |
Get the ResourceGuard mapping object associated with the vault, and that matches the name in the request. |
Extension | GA |
az dataprotection backup-vault show |
Get a resource belonging to a resource group. |
Extension | GA |
az dataprotection backup-vault update |
Updates a BackupVault resource belonging to a resource group. For example, updating tags for a resource. |
Extension | GA |
az dataprotection backup-vault wait |
Place the CLI in a waiting state until a condition is met. |
Extension | GA |
az dataprotection backup-vault create
Create a BackupVault resource belonging to a resource group.
az dataprotection backup-vault create --resource-group
--storage-setting --storage-settings
--vault-name
[--azure-monitor-alerts-for-job-failures --job-failure-alerts {Disabled, Enabled}]
[--cmk-encryption-key-uri]
[--cmk-encryption-state {Disabled, Enabled, Inconsistent}]
[--cmk-identity-type {SystemAssigned, UserAssigned}]
[--cmk-infra-encryption --cmk-infrastructure-encryption {Disabled, Enabled}]
[--cmk-uami --cmk-user-assigned-identity-id]
[--cross-region-restore-state --crr-state {Disabled, Enabled}]
[--cross-subscription-restore-state --csr-state {Disabled, Enabled, PermanentlyDisabled}]
[--e-tag]
[--immutability-state {Disabled, Locked, Unlocked}]
[--location]
[--mi-system-assigned {0, 1, f, false, n, no, t, true, y, yes}]
[--mi-user-assigned]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--retention-duration-in-days --soft-delete-retention]
[--soft-delete-state {AlwaysOn, Off, On}]
[--tags]
[--type]
[--uami --user-assigned-identities]
Examples
Create BackupVault
az dataprotection backup-vault create --location "WestUS" --azure-monitor-alerts-for-job-failures "Enabled" --storage-setting "[{type:'LocallyRedundant',datastore-type:'VaultStore'}]" --tags key1="val1" --resource-group "SampleResourceGroup" --vault-name "swaggerExample"
Create BackupVault With MSI
az dataprotection backup-vault create --mi-system-assigned --location "WestUS" --azure-monitor-alerts-for-job-failures "Enabled" --storage-setting "[{type:'LocallyRedundant',datastore-type:'VaultStore'}]" --tags key1="val1" --resource-group "SampleResourceGroup" --vault-name "swaggerExample"
Create BackupVault With CMK Encryption
az dataprotection backup-vault create -g "resourceGroupName" -v "vaultName" --location "eastasia" --storage-setting "[{type:'LocallyRedundant',datastore-type:'VaultStore'}]" --mi-user-assigned "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/samplerg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sampleuami" --cmk-encryption-key-uri "https://samplekvazbckp.vault.azure.net/keys/testkey/3cd5235ad6ac4c11b40a6f35444bcbe1" --cmk-encryption-state "Enabled" --cmk-identity-type "UserAssigned" --cmk-infrastructure-encryption "Enabled" --cmk-user-assigned-identity-id "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/samplerg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sampleuami"
Required Parameters
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Storage Settings. Usage: --storage-setting "[{type:'LocallyRedundant',datastore-type:'VaultStore'}]" Support shorthand-syntax, json-file and yaml-file. Try "??" to show more. Singular flags: --storage-settings
.
Property | Value |
---|---|
Parameter group: | Properties Arguments |
The name of the backup vault.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Property that specifies whether built-in Azure Monitor alerts should be fired for all failed jobs.
Property | Value |
---|---|
Parameter group: | Monitoring Settings Azure Monitor Alert Settings Arguments |
Accepted values: | Disabled, Enabled |
The Key URI of the CMK key to be used for encryption. To enable auto-rotation of keys, exclude the version component from the Key URI.
Property | Value |
---|---|
Parameter group: | EncryptionSettings Arguments |
Enable CMK encryption state for a Backup Vault.
Property | Value |
---|---|
Parameter group: | EncryptionSettings Arguments |
Accepted values: | Disabled, Enabled, Inconsistent |
The identity type to be used for CMK encryption - SystemAssigned or UserAssigned Identity.
Property | Value |
---|---|
Parameter group: | EncryptionSettings Arguments |
Accepted values: | SystemAssigned, UserAssigned |
Enable/Disable infrastructure encryption with CMK on this vault. Infrastructure encryption must be configured only when creating the vault.
Property | Value |
---|---|
Parameter group: | EncryptionSettings Arguments |
Accepted values: | Disabled, Enabled |
This parameter is required if the identity type is UserAssigned. Add the user assigned managed identity id to be used which has access permissions to the Key Vault.
Property | Value |
---|---|
Parameter group: | EncryptionSettings Arguments |
Set the CrossRegionRestore state. Once enabled, it cannot be set to disabled.
Property | Value |
---|---|
Parameter group: | CrossRegionRestoreSettings Arguments |
Accepted values: | Disabled, Enabled |
CrossSubscriptionRestore state.
Property | Value |
---|---|
Parameter group: | FeatureSettings Arguments |
Accepted values: | Disabled, Enabled, PermanentlyDisabled |
Optional ETag.
Property | Value |
---|---|
Parameter group: | Parameters Arguments |
Immutability state.
Property | Value |
---|---|
Parameter group: | SecuritySettings Arguments |
Accepted values: | Disabled, Locked, Unlocked |
Location. Values from: az account list-locations
. You can configure the default location using az configure --defaults location=<location>
. When not specified, the location of the resource group will be used.
Property | Value |
---|---|
Parameter group: | Parameters Arguments |
Provide this flag to use system assigned identity.
Property | Value |
---|---|
Parameter group: | Identity Arguments |
Accepted values: | 0, 1, f, false, n, no, t, true, y, yes |
Space separated resource IDs to add user-assigned identities. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Property | Value |
---|---|
Parameter group: | Identity Arguments |
Do not wait for the long-running operation to finish.
Property | Value |
---|---|
Accepted values: | 0, 1, f, false, n, no, t, true, y, yes |
Soft delete retention duration.
Property | Value |
---|---|
Parameter group: | SoftDeleteSettings Arguments |
Default value: | 14.0 |
State of soft delete.
Property | Value |
---|---|
Parameter group: | SoftDeleteSettings Arguments |
Default value: | On |
Accepted values: | AlwaysOn, Off, On |
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Property | Value |
---|---|
Parameter group: | Parameters Arguments |
The identityType which can be "SystemAssigned", "UserAssigned", "SystemAssigned,UserAssigned" or "None".
Property | Value |
---|---|
Parameter group: | Identity Arguments |
Gets or sets the user assigned identities. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Property | Value |
---|---|
Parameter group: | Identity Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
Property | Value |
---|---|
Default value: | False |
az dataprotection backup-vault delete
Delete a BackupVault resource from the resource group.
az dataprotection backup-vault delete [--ids]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--resource-group]
[--subscription]
[--vault-name]
[--yes]
Examples
Delete BackupVault
az dataprotection backup-vault delete --resource-group "SampleResourceGroup" --vault-name "swaggerExample"
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
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.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Do not wait for the long-running operation to finish.
Property | Value |
---|---|
Accepted values: | 0, 1, f, false, n, no, t, true, y, yes |
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
The name of the backup vault.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Do not prompt for confirmation.
Property | Value |
---|---|
Default value: | False |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
az dataprotection backup-vault list
Gets list of backup vault in a subscription or in a resource group.
az dataprotection backup-vault list [--max-items]
[--next-token]
[--resource-group]
Examples
List backup vault in a subscription
az dataprotection backup-vault list
List backup vault in a resource group
az dataprotection backup-vault list -g sarath-rg
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
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.
Property | Value |
---|---|
Parameter group: | Pagination Arguments |
Token to specify where to start paginating. This is the token value from a previously truncated response.
Property | Value |
---|---|
Parameter group: | Pagination Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
Property | Value |
---|---|
Default value: | False |
az dataprotection backup-vault list-from-resourcegraph
List backup vaults across subscriptions, resource groups and vaults.
az dataprotection backup-vault list-from-resourcegraph [--resource-groups]
[--subscriptions]
[--vault-id]
[--vaults]
Examples
Fetch a specific backup vault
az dataprotection backup-vault list-from-resourcegraph --subscriptions 00000000-0000-0000-0000-000000000000 --resource-groups sample_rg --vaults sample_vault
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
List of resource groups.
List of subscription Ids.
Specify vault id filter to apply.
List of vault names.
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
Property | Value |
---|---|
Default value: | False |
az dataprotection backup-vault show
Get a resource belonging to a resource group.
az dataprotection backup-vault show [--ids]
[--resource-group]
[--subscription]
[--vault-name]
Examples
Get BackupVault
az dataprotection backup-vault show --resource-group "SampleResourceGroup" --vault-name "swaggerExample"
Get BackupVault With MSI
az dataprotection backup-vault show --resource-group "SampleResourceGroup" --vault-name "swaggerExample"
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
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.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
The name of the backup vault.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
az dataprotection backup-vault update
Updates a BackupVault resource belonging to a resource group. For example, updating tags for a resource.
az dataprotection backup-vault update [--add]
[--azure-monitor-alerts-for-job-failures --job-failure-alerts {Disabled, Enabled}]
[--cmk-encryption-key-uri]
[--cmk-encryption-state {Disabled, Enabled, Inconsistent}]
[--cmk-identity-type {SystemAssigned, UserAssigned}]
[--cmk-uami --cmk-user-assigned-identity-id]
[--cross-region-restore-state --crr-state {Disabled, Enabled}]
[--cross-subscription-restore-state --csr-state {Disabled, Enabled, PermanentlyDisabled}]
[--force-string {0, 1, f, false, n, no, t, true, y, yes}]
[--ids]
[--immutability-state {Disabled, Locked, Unlocked}]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--operation-requests --resource-guard-operation-requests]
[--remove]
[--resource-group]
[--retention-duration-in-days --soft-delete-retention]
[--set]
[--soft-delete-state {AlwaysOn, Off, On}]
[--subscription]
[--tags]
[--tenant-id]
[--type]
[--uami --user-assigned-identities]
[--vault-name]
Examples
Patch BackupVault
az dataprotection backup-vault update --azure-monitor-alerts-for-job-failures "Enabled" --tags newKey="newVal" --resource-group "SampleResourceGroup" --vault-name "swaggerExample"
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>
.
Property | Value |
---|---|
Parameter group: | Generic Update Arguments |
Property that specifies whether built-in Azure Monitor alerts should be fired for all failed jobs.
Property | Value |
---|---|
Parameter group: | Monitoring Settings Azure Monitor Alert Settings Arguments |
Accepted values: | Disabled, Enabled |
The key uri of the Customer Managed Key.
Property | Value |
---|---|
Parameter group: | EncryptionSettings Arguments |
Enable CMK encryption state for a Backup Vault.
Property | Value |
---|---|
Parameter group: | EncryptionSettings Arguments |
Accepted values: | Disabled, Enabled, Inconsistent |
The identity type to be used for CMK encryption - SystemAssigned or UserAssigned Identity.
Property | Value |
---|---|
Parameter group: | EncryptionSettings Arguments |
Accepted values: | SystemAssigned, UserAssigned |
This parameter is required if the identity type is UserAssigned. Add the user assigned managed identity id to be used which has access permissions to the Key Vault.
Property | Value |
---|---|
Parameter group: | EncryptionSettings Arguments |
Set the CrossRegionRestore state. Once enabled, it cannot be set to disabled.
Property | Value |
---|---|
Parameter group: | CrossRegionRestoreSettings Arguments |
Accepted values: | Disabled, Enabled |
CrossSubscriptionRestore state.
Property | Value |
---|---|
Parameter group: | FeatureSettings Arguments |
Accepted values: | Disabled, Enabled, PermanentlyDisabled |
When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.
Property | Value |
---|---|
Parameter group: | Generic Update Arguments |
Accepted values: | 0, 1, f, false, n, no, t, true, y, yes |
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.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Immutability state.
Property | Value |
---|---|
Parameter group: | SecuritySettings Arguments |
Accepted values: | Disabled, Locked, Unlocked |
Do not wait for the long-running operation to finish.
Property | Value |
---|---|
Accepted values: | 0, 1, f, false, n, no, t, true, y, yes |
Critical operation request which is protected by the resourceGuard Support shorthand-syntax, json-file and yaml-file. Try "??" to show more. Singular flags: --operation-requests
.
Property | Value |
---|---|
Parameter group: | Properties Arguments |
Remove a property or an element from a list. Example: --remove property.list <indexToRemove>
OR --remove propertyToRemove
.
Property | Value |
---|---|
Parameter group: | Generic Update Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Soft delete retention duration.
Property | Value |
---|---|
Parameter group: | SoftDeleteSettings Arguments |
Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>
.
Property | Value |
---|---|
Parameter group: | Generic Update Arguments |
State of soft delete.
Property | Value |
---|---|
Parameter group: | SoftDeleteSettings Arguments |
Accepted values: | AlwaysOn, Off, On |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Resource tags. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Property | Value |
---|---|
Parameter group: | Parameters Arguments |
Tenant ID for cross-tenant calls.
The identityType which can be "SystemAssigned", "UserAssigned", "SystemAssigned,UserAssigned" or "None".
Property | Value |
---|---|
Parameter group: | Identity Arguments |
Gets or sets the user assigned identities. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Property | Value |
---|---|
Parameter group: | Identity Arguments |
The name of the backup vault.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
az dataprotection backup-vault wait
Place the CLI in a waiting state until a condition is met.
az dataprotection backup-vault wait [--created]
[--custom]
[--deleted]
[--exists]
[--ids]
[--interval]
[--resource-group]
[--subscription]
[--timeout]
[--updated]
[--vault-name]
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Wait until created with 'provisioningState' at 'Succeeded'.
Property | Value |
---|---|
Parameter group: | Wait Condition Arguments |
Default value: | False |
Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].
Property | Value |
---|---|
Parameter group: | Wait Condition Arguments |
Wait until deleted.
Property | Value |
---|---|
Parameter group: | Wait Condition Arguments |
Default value: | False |
Wait until the resource exists.
Property | Value |
---|---|
Parameter group: | Wait Condition Arguments |
Default value: | False |
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.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Polling interval in seconds.
Property | Value |
---|---|
Parameter group: | Wait Condition Arguments |
Default value: | 30 |
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Maximum wait in seconds.
Property | Value |
---|---|
Parameter group: | Wait Condition Arguments |
Default value: | 3600 |
Wait until updated with provisioningState at 'Succeeded'.
Property | Value |
---|---|
Parameter group: | Wait Condition Arguments |
Default value: | False |
The name of the backup vault.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |