az dataprotection backup-vault

Note

This reference is part of the dataprotection extension for the Azure CLI (version 2.51.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 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
                                      --vault-name
                                      [--azure-monitor-alerts-for-job-failures {Disabled, Enabled}]
                                      [--cross-region-restore-state {Disabled, Enabled}]
                                      [--cross-subscription-restore-state {Disabled, Enabled, PermanentlyDisabled}]
                                      [--e-tag]
                                      [--immutability-state {Disabled, Locked, Unlocked}]
                                      [--location]
                                      [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                      [--retention-duration-in-days]
                                      [--soft-delete-state {AlwaysOn, Off, On}]
                                      [--tags]
                                      [--type]

Examples

Create BackupVault

az dataprotection backup-vault create --type "None" --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 --type "systemAssigned" --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"

Required Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--storage-setting --storage-settings

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.

--vault-name -v

The name of the backup vault.

Optional Parameters

--azure-monitor-alerts-for-job-failures --job-failure-alerts

Property that specifies whether built-in Azure Monitor alerts should be fired for all failed jobs.

accepted values: Disabled, Enabled
--cross-region-restore-state --crr-state

Set the CrossRegionRestore state. Once enabled, it cannot be set to disabled.

accepted values: Disabled, Enabled
--cross-subscription-restore-state --csr-state

CrossSubscriptionRestore state.

accepted values: Disabled, Enabled, PermanentlyDisabled
--e-tag

Optional ETag.

--immutability-state

Immutability state.

accepted values: Disabled, Locked, Unlocked
--location -l

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.

--no-wait

Do not wait for the long-running operation to finish.

accepted values: 0, 1, f, false, n, no, t, true, y, yes
--retention-duration-in-days --soft-delete-retention

Soft delete retention duration.

default value: 14.0
--soft-delete-state

State of soft delete.

accepted values: AlwaysOn, Off, On
default value: On
--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--type

The identityType which can be either SystemAssigned or None.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

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

--ids

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.

--no-wait

Do not wait for the long-running operation to finish.

accepted values: 0, 1, f, false, n, no, t, true, y, yes
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--vault-name -v

The name of the backup vault.

--yes -y

Do not prompt for confirmation.

default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

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

--max-items

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.

--next-token

Token to specify where to start paginating. This is the token value from a previously truncated response.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

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

--resource-groups

List of resource groups.

--subscriptions

List of subscription Ids.

--vault-id

Specify vault id filter to apply.

--vaults

List of vault names.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

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

--ids

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.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--vault-name -v

The name of the backup vault.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

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 {Disabled, Enabled}]
                                      [--cross-region-restore-state {Disabled, Enabled}]
                                      [--cross-subscription-restore-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]
                                      [--remove]
                                      [--resource-group]
                                      [--retention-duration-in-days]
                                      [--set]
                                      [--soft-delete-state {AlwaysOn, Off, On}]
                                      [--subscription]
                                      [--tags]
                                      [--tenant-id]
                                      [--type]
                                      [--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

--add

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>.

--azure-monitor-alerts-for-job-failures --job-failure-alerts

Property that specifies whether built-in Azure Monitor alerts should be fired for all failed jobs.

accepted values: Disabled, Enabled
--cross-region-restore-state --crr-state

Set the CrossRegionRestore state. Once enabled, it cannot be set to disabled.

accepted values: Disabled, Enabled
--cross-subscription-restore-state --csr-state

CrossSubscriptionRestore state.

accepted values: Disabled, Enabled, PermanentlyDisabled
--force-string

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

accepted values: 0, 1, f, false, n, no, t, true, y, yes
--ids

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.

--immutability-state

Immutability state.

accepted values: Disabled, Locked, Unlocked
--no-wait

Do not wait for the long-running operation to finish.

accepted values: 0, 1, f, false, n, no, t, true, y, yes
--operation-requests --resource-guard-operation-requests

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.

--remove

Remove a property or an element from a list. Example: --remove property.list OR --remove propertyToRemove.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--retention-duration-in-days --soft-delete-retention

Soft delete retention duration.

--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=.

--soft-delete-state

State of soft delete.

accepted values: AlwaysOn, Off, On
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--tags

Resource tags. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--tenant-id

Tenant ID for cross-tenant calls.

--type

The identityType which can be either SystemAssigned or None.

--vault-name -v

The name of the backup vault.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

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

--created

Wait until created with 'provisioningState' at 'Succeeded'.

default value: False
--custom

Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].

--deleted

Wait until deleted.

default value: False
--exists

Wait until the resource exists.

default value: False
--ids

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.

--interval

Polling interval in seconds.

default value: 30
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--timeout

Maximum wait in seconds.

default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.

default value: False
--vault-name -v

The name of the backup vault.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.