Share via


az dataprotection backup-instance

Note

This reference is part of the dataprotection extension for the Azure CLI (version 2.57.0 or higher). The extension will automatically install the first time you run an az dataprotection backup-instance command. Learn more about extensions.

Manage backup instance with dataprotection.

Commands

Name Description Type Status
az dataprotection backup-instance adhoc-backup

Trigger adhoc backup.

Extension GA
az dataprotection backup-instance create

Configure backup for a resource in a backup vault.

Extension GA
az dataprotection backup-instance delete

Delete a backup instance in a backup vault.

Extension GA
az dataprotection backup-instance deleted-backup-instance

Perform operations on soft-deleted backup instances.

Extension GA
az dataprotection backup-instance deleted-backup-instance list

List deleted backup instances belonging to a backup vault.

Extension GA
az dataprotection backup-instance deleted-backup-instance show

Get a deleted backup instance with name in a backup vault.

Extension GA
az dataprotection backup-instance deleted-backup-instance undelete

Undelete soft-deleted backup instances.

Extension GA
az dataprotection backup-instance initialize

Initialize JSON request body for configuring backup of a resource.

Extension GA
az dataprotection backup-instance initialize-backupconfig

Initialize JSON request body for initializing and configuring backup for AzureKubernetesService or AzureBlobs (for vaulted backups) resources.

Extension GA
az dataprotection backup-instance initialize-restoreconfig

Initialize JSON request body for initializing and configuring restore of an AzureKubernetesService resource.

Extension GA
az dataprotection backup-instance list

Gets backup instances belonging to a backup vault.

Extension GA
az dataprotection backup-instance list-from-resourcegraph

List backup instances across subscriptions, resource groups and vaults.

Extension GA
az dataprotection backup-instance restore

Restore backed up instances from recovery points in a backup vault.

Extension GA
az dataprotection backup-instance restore initialize-for-data-recovery

Initialize restore request object to recover all backed up data in a backup vault.

Extension GA
az dataprotection backup-instance restore initialize-for-data-recovery-as-files

Initialize restore request object to recover all backed up data as files in a backup vault.

Extension GA
az dataprotection backup-instance restore initialize-for-item-recovery

Initialize restore request object to recover specified items of backed up data in a backup vault.

Extension GA
az dataprotection backup-instance restore trigger

Triggers restore for a BackupInstance.

Extension GA
az dataprotection backup-instance resume-protection

This operation will resume protection for a stopped backup instance.

Extension GA
az dataprotection backup-instance show

Get a backup instance with name in a backup vault.

Extension GA
az dataprotection backup-instance stop-protection

This operation will stop protection of a backup instance and data will be held forever.

Extension GA
az dataprotection backup-instance suspend-backup

This operation will stop backup for a backup instance and retains the backup data as per the policy (except latest Recovery point, which will be retained forever).

Extension GA
az dataprotection backup-instance update

Update properties associated with a backup instance.

Extension GA
az dataprotection backup-instance update-msi-permissions

Assign the required permissions needed to successfully enable backup for the datasource.

Extension GA
az dataprotection backup-instance update-policy

Update backup policy associated with backup instance.

Extension GA
az dataprotection backup-instance validate-for-backup

Validate whether configure backup will be successful or not.

Extension GA
az dataprotection backup-instance validate-for-restore

Validates if Restore can be triggered for a DataSource.

Extension GA
az dataprotection backup-instance wait

Place the CLI in a waiting state until a condition is met.

Extension GA

az dataprotection backup-instance adhoc-backup

Trigger adhoc backup.

az dataprotection backup-instance adhoc-backup --rule-name
                                               [--backup-instance-name]
                                               [--ids]
                                               [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                               [--resource-group]
                                               [--retention-tag-override]
                                               [--subscription]
                                               [--vault-name]

Examples

Fetch Backup Policy details for rule name and Trigger Adhoc Backup

az dataprotection backup-policy show -g "000pikumar" --vault-name "PratikPrivatePreviewVault1" -n "backupPolicy"
az dataprotection backup-instance adhoc-backup --name "testInstance1" --rule-name "BackupWeekly" --retention-tag-override "yearly" --resource-group "000pikumar" --vault-name "PratikPrivatePreviewVault1"

Required Parameters

--rule-name

Specify backup policy rule name.

Optional Parameters

--backup-instance-name --name -n

The name of the backup instance.

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

--retention-tag-override

Specify retention override tag.

--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-instance create

Configure backup for a resource in a backup vault.

az dataprotection backup-instance create --backup-instance
                                         --resource-group
                                         --vault-name
                                         [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]

Examples

create a backup instance in a backup vault

az dataprotection backup-instance create -g MyResourceGroup --vault-name MyVault --backup-instance backupinstance.json

Required Parameters

--backup-instance

Request backup instance object for operation. Support json-file and yaml-file.

--resource-group -g

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

--vault-name -v

The name of the backup vault.

Optional Parameters

--no-wait

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

Accepted values: 0, 1, f, false, n, no, t, true, y, yes
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-instance delete

Delete a backup instance in a backup vault.

az dataprotection backup-instance delete [--backup-instance-name]
                                         [--ids]
                                         [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                         [--resource-group]
                                         [--subscription]
                                         [--vault-name]
                                         [--yes]

Examples

Delete BackupInstance

az dataprotection backup-instance delete --name "testInstance1" --resource-group "000pikumar" --vault-name "PratikPrivatePreviewVault1"

Optional Parameters

--backup-instance-name --name -n

The name of the backup instance.

--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-instance initialize

Initialize JSON request body for configuring backup of a resource.

az dataprotection backup-instance initialize --datasource-id
                                             --datasource-location
                                             --datasource-type {AzureBlob, AzureDatabaseForMySQL, AzureDatabaseForPostgreSQL, AzureDatabaseForPostgreSQLFlexibleServer, AzureDisk, AzureKubernetesService}
                                             --policy-id
                                             [--backup-configuration]
                                             [--friendly-name]
                                             [--secret-store-type {AzureKeyVault}]
                                             [--secret-store-uri]
                                             [--snapshot-resource-group-name]
                                             [--tags]

Examples

Initialize backup instance request for Azure Disk

az dataprotection backup-instance initialize --datasource-type AzureDisk -l southeastasia --policy-id {disk_policy_id} --datasource-id {disk_id}

Required Parameters

--datasource-id

ARM Id of the resource to be backed up.

--datasource-location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

--datasource-type

Specify the datasource type of the resource to be backed up.

Accepted values: AzureBlob, AzureDatabaseForMySQL, AzureDatabaseForPostgreSQL, AzureDatabaseForPostgreSQLFlexibleServer, AzureDisk, AzureKubernetesService
--policy-id

Id of the backup policy the datasource will be associated.

Optional Parameters

--backup-configuration

Backup configuration for backup. Use this parameter to configure protection for AzureKubernetesService.

--friendly-name

User-defined friendly name for the backup instance.

--secret-store-type

Specify the secret store type to use for authentication.

Accepted values: AzureKeyVault
--secret-store-uri

Specify the secret store uri to use for authentication.

--snapshot-resource-group-name --snapshot-rg

Name of the resource group in which the backup snapshots should be stored.

--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

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-instance initialize-backupconfig

Initialize JSON request body for initializing and configuring backup for AzureKubernetesService or AzureBlobs (for vaulted backups) resources.

az dataprotection backup-instance initialize-backupconfig --datasource-type {AzureBlob, AzureDatabaseForMySQL, AzureDatabaseForPostgreSQL, AzureDatabaseForPostgreSQLFlexibleServer, AzureDisk, AzureKubernetesService}
                                                          [--backup-hook-references]
                                                          [--container-list]
                                                          [--excluded-namespaces]
                                                          [--excluded-resource-type]
                                                          [--include-all-containers {false, true}]
                                                          [--include-cluster-scope {false, true}]
                                                          [--included-namespaces]
                                                          [--included-resource-type]
                                                          [--label-selectors]
                                                          [--snapshot-volumes {false, true}]
                                                          [--storage-account-name]
                                                          [--storage-account-resource-group]

Examples

Initialize backup configuration for AzureKubernetesService

az dataprotection backup-instance initialize-backupconfig --datasource-type AzureKubernetesService --label-selectors key=val foo=bar --excluded-namespaces excludeNS1 excludeNS2

Initialize backup configuration for AzureBlob

az dataprotection backup-instance initialize-backupconfig --datasource-type "AzureBlob" --include-all-containers --storage-account-rg "sampleRG" --storage-account-name "samplestorage"

Required Parameters

--datasource-type

Specify the datasource type of the resource to be backed up.

Accepted values: AzureBlob, AzureDatabaseForMySQL, AzureDatabaseForPostgreSQL, AzureDatabaseForPostgreSQLFlexibleServer, AzureDisk, AzureKubernetesService

Optional Parameters

--backup-hook-references --backup-hook-refs

Property sets the hook reference to be executed during backup.

--container-list --vaulted-backup-containers

List of containers to be backed up inside the VaultStore. Use this parameter for DatasourceType AzureBlob.

--excluded-namespaces

List of namespaces to be excluded for backup.

--excluded-resource-type --excluded-resource-types

List of resource types to be excluded for backup.

--include-all-containers

Switch parameter to include all containers to be backed up inside the VaultStore. Use this parameter for DatasourceType AzureBlob.

Accepted values: false, true
--include-cluster-scope --include-cluster-scope-resources

Boolean parameter to decide whether cluster scope resources are included for restore. By default this is taken as true.

Accepted values: false, true
--included-namespaces

List of namespaces to be included for backup.

--included-resource-type --included-resource-types

List of resource types to be included for backup.

--label-selectors

List of labels for internal filtering for backup.

--snapshot-volumes

Boolean parameter to decide whether snapshot volumes are included for backup. By default this is taken as true.

Accepted values: false, true
--storage-account-name

Storage account where the Datasource is present. Use this parameter for DatasourceType AzureBlob.

--storage-account-resource-group --storage-account-rg

Storage account resource group name where the Datasource is present. Use this parameter for DatasourceType AzureBlob.

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-instance initialize-restoreconfig

Initialize JSON request body for initializing and configuring restore of an AzureKubernetesService resource.

az dataprotection backup-instance initialize-restoreconfig --datasource-type {AzureBlob, AzureDatabaseForMySQL, AzureDatabaseForPostgreSQL, AzureDatabaseForPostgreSQLFlexibleServer, AzureDisk, AzureKubernetesService}
                                                           [--conflict-policy {Patch, Skip}]
                                                           [--excluded-namespaces]
                                                           [--excluded-resource-type]
                                                           [--include-cluster-scope {false, true}]
                                                           [--included-namespaces]
                                                           [--included-resource-type]
                                                           [--label-selectors]
                                                           [--namespace-mappings]
                                                           [--persistent-restoremode {RestoreWithVolumeData, RestoreWithoutVolumeData}]
                                                           [--resource-modifier]
                                                           [--restore-hook-references]
                                                           [--staging-resource-group-id]
                                                           [--staging-storage-account-id]

Examples

Initialize restore configuration

az dataprotection backup-instance initialize-restoreconfig --datasource-type AzureKubernetesService

Required Parameters

--datasource-type

Specify the datasource type of the resource to be backed up.

Accepted values: AzureBlob, AzureDatabaseForMySQL, AzureDatabaseForPostgreSQL, AzureDatabaseForPostgreSQLFlexibleServer, AzureDisk, AzureKubernetesService

Optional Parameters

--conflict-policy

Conflict policy for restore. Allowed values are Skip, Patch. Default value is Skip.

Accepted values: Patch, Skip
--excluded-namespaces

List of namespaces to be excluded for restore.

--excluded-resource-type --excluded-resource-types

List of resource types to be excluded for restore.

--include-cluster-scope --include-cluster-scope-resources

Boolean parameter to decide whether cluster scope resources are included for restore. By default this is taken as true.

Accepted values: false, true
--included-namespaces

List of namespaces to be included for restore.

--included-resource-type --included-resource-types

List of resource types to be included for restore.

--label-selectors

List of labels for internal filtering for restore.

--namespace-mappings

Namespaces mapping from source namespaces to target namespaces to resolve namespace naming conflicts in the target cluster.

--persistent-restoremode --persistent-volume-restore-mode

Restore mode for persistent volumes. Allowed values are RestoreWithVolumeData, RestoreWithoutVolumeData. Default value is RestoreWithVolumeData.

Accepted values: RestoreWithVolumeData, RestoreWithoutVolumeData
--resource-modifier --resource-modifier-reference

Key value mapping for resource modifier reference.

--restore-hook-references --restore-hook-refs

Property sets the hook reference to be executed during restore.

--staging-resource-group-id --staging-rg-id

Resource group of the staging storage account for AKS vaulted backups.

--staging-storage-account-id --staging-storage-id

Storage Account ID for AKS vaulted backups.

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-instance list

Gets backup instances belonging to a backup vault.

az dataprotection backup-instance list --resource-group
                                       --vault-name
                                       [--max-items]
                                       [--next-token]

Examples

List backup instances in a vault

az dataprotection backup-instance list --resource-group "000pikumar" --vault-name "PratikPrivatePreviewVault1"

Required Parameters

--resource-group -g

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

--vault-name -v

The name of the backup vault.

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.

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-instance list-from-resourcegraph

List backup instances across subscriptions, resource groups and vaults.

az dataprotection backup-instance list-from-resourcegraph [--backup-instance-id]
                                                          [--backup-instance-name]
                                                          [--datasource-id]
                                                          [--datasource-type {AzureBlob, AzureDatabaseForMySQL, AzureDatabaseForPostgreSQL, AzureDatabaseForPostgreSQLFlexibleServer, AzureDisk, AzureKubernetesService}]
                                                          [--protection-status {ProtectionConfigured, ProtectionError}]
                                                          [--resource-groups]
                                                          [--subscriptions]
                                                          [--vaults]

Examples

list backup instances across multiple vaults across multiple resource groups

az dataprotection backup-instance list-from-resourcegraph --resource-groups resourceGroup1 resourceGroup2 --vaults vault1 vault2 --datasource-type AzureBlob

list backup instances in a vault which are in a protection error state.

az dataprotection backup-instance list-from-resourcegraph --resource-groups resourceGroup --vaults vault --protection-status ProtectionError --datasource-type AzureDisk

Optional Parameters

--backup-instance-id

Specify backup instance id filter to apply.

--backup-instance-name

Specify backup instance name filter to apply.

--datasource-id

Specify datasource id filter to apply.

--datasource-type

Specify the datasource type.

Accepted values: AzureBlob, AzureDatabaseForMySQL, AzureDatabaseForPostgreSQL, AzureDatabaseForPostgreSQLFlexibleServer, AzureDisk, AzureKubernetesService
--protection-status

Specify protection status.

Accepted values: ProtectionConfigured, ProtectionError
--resource-groups

List of resource groups.

--subscriptions

List of subscription Ids.

--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-instance resume-protection

This operation will resume protection for a stopped backup instance.

az dataprotection backup-instance resume-protection [--backup-instance-name]
                                                    [--ids]
                                                    [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                                    [--resource-group]
                                                    [--subscription]
                                                    [--vault-name]

Examples

Resume protection

az dataprotection backup-instance resume-protection --name "testbi" --resource-group "testrg" --vault-name "testvault"

Optional Parameters

--backup-instance-name --name -n

The name of the backup instance.

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

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-instance show

Get a backup instance with name in a backup vault.

az dataprotection backup-instance show [--backup-instance-name]
                                       [--ids]
                                       [--resource-group]
                                       [--subscription]
                                       [--vault-name]

Examples

Get BackupInstance

az dataprotection backup-instance show --name "testInstance1" --resource-group "000pikumar" --vault-name "PratikPrivatePreviewVault1"

Optional Parameters

--backup-instance-name --name -n

The name of the backup instance.

--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-instance stop-protection

This operation will stop protection of a backup instance and data will be held forever.

az dataprotection backup-instance stop-protection [--backup-instance-name]
                                                  [--ids]
                                                  [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                                  [--operation-requests]
                                                  [--resource-group]
                                                  [--subscription]
                                                  [--tenant-id]
                                                  [--vault-name]

Examples

Stop protection

az dataprotection backup-instance stop-protection --name "testbi" --resource-group "testrg" --vault-name "testvault"

Optional Parameters

--backup-instance-name --name -n

The name of the backup instance.

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

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

--tenant-id

Tenant ID for cross-tenant calls.

--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-instance suspend-backup

This operation will stop backup for a backup instance and retains the backup data as per the policy (except latest Recovery point, which will be retained forever).

az dataprotection backup-instance suspend-backup [--backup-instance-name]
                                                 [--ids]
                                                 [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                                 [--operation-requests]
                                                 [--resource-group]
                                                 [--subscription]
                                                 [--tenant-id]
                                                 [--vault-name]

Examples

Suspend backups

az dataprotection backup-instance suspend-backup --name "testbi" --resource-group "testrg" --vault-name "testvault"

Optional Parameters

--backup-instance-name --name -n

The name of the backup instance.

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

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

--tenant-id

Tenant ID for cross-tenant calls.

--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-instance update

Update properties associated with a backup instance.

az dataprotection backup-instance update --backup-instance-name
                                         --resource-group
                                         --vault-name
                                         [--container-blob-list]
                                         [--no-wait]

Examples

Update backed up containers for a vaulted blob backup instance

az dataprotection backup-instance update --backup-instance-name MyDisk1 --vaulted-blob-container-list {backup_configuration} -g MyResourceGroup --vault-name MyVault

Required Parameters

--backup-instance-name

Backup instance name.

--resource-group -g

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

--vault-name -v

Name of the backup vault.

Optional Parameters

--container-blob-list --vaulted-blob-container-list

Enter the container list to modify a vaulted blob backup. The output for 'az dataprotection backup-instance initialize-backupconfig' needs to be provided as input.

--no-wait

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

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-instance update-msi-permissions

Assign the required permissions needed to successfully enable backup for the datasource.

az dataprotection backup-instance update-msi-permissions --datasource-type {AzureBlob, AzureDatabaseForMySQL, AzureDatabaseForPostgreSQL, AzureDatabaseForPostgreSQLFlexibleServer, AzureDisk, AzureKubernetesService}
                                                         --operation {Backup, Restore}
                                                         --permissions-scope {Resource, ResourceGroup, Subscription}
                                                         --resource-group
                                                         --vault-name
                                                         [--backup-instance]
                                                         [--keyvault-id]
                                                         [--restore-request-object]
                                                         [--snapshot-resource-group-id]
                                                         [--target-storage-account-id]
                                                         [--yes]

Examples

Assign the required permissions needed to successfully enable backup for the datasource.

az dataprotection backup-instance update-msi-permissions --backup-instance backup_inst.json --resource-group samarth_resource_group --vault-name samarthbackupvault --datasource-type AzureDisk --operation Backup --permissions-scope ResourceGroup

Assign the required permissions needed to successfully enable restore for the datasource.

az dataprotection backup-instance update-msi-permissions --datasource-type AzureKubernetesService --operation Restore --permissions-scope Resource --resource-group sampleRG --vault-name samplevault --restore-request-object aksrestore.json --snapshot-resource-group-id /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sampleRG

Required Parameters

--datasource-type

Specify the datasource type of the resource to be backed up.

Accepted values: AzureBlob, AzureDatabaseForMySQL, AzureDatabaseForPostgreSQL, AzureDatabaseForPostgreSQLFlexibleServer, AzureDisk, AzureKubernetesService
--operation

List of possible operations.

Accepted values: Backup, Restore
--permissions-scope

Scope for assigning permissions to the backup vault.

Accepted values: Resource, ResourceGroup, Subscription
--resource-group -g

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

--vault-name -v

Name of the backup vault.

Optional Parameters

--backup-instance

Request body for operation "Backup" Expected value: json-string/@json-file. Required when --operation is Backup.

--keyvault-id

ARM id of the key vault. Required when --datasource-type is AzureDatabaseForPostgreSQL.

--restore-request-object

Request body for operation "Restore" Expected value: json-string/@json-file. Required when --operation is Restore.

--snapshot-resource-group-id --snapshot-rg-id

ARM id of the snapshot resource group. Required when assigning permissions over snapshot resource group and the --operation is Restore.

--target-storage-account-id

ARM id of the target storage account. Required when assigning permissions over target storage account and the --operation is Restore.

--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-instance update-policy

Update backup policy associated with backup instance.

az dataprotection backup-instance update-policy --backup-instance-name
                                                --policy-id
                                                --resource-group
                                                --vault-name
                                                [--no-wait]
                                                [--operation-requests]
                                                [--tenant-id]

Examples

Update backup policy associated with backup instance

az dataprotection backup-instance update-policy --backup-instance-name MyDisk1 --policy-id {policy_id} -g MyResourceGroup --vault-name MyVault

Required Parameters

--backup-instance-name

Backup instance name.

--policy-id

Specify the ID of the new policy with which backup instance will be associated with.

--resource-group -g

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

--vault-name -v

Name of the backup vault.

Optional Parameters

--no-wait

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

Default value: False
--operation-requests --resource-guard-operation-requests

Critical operation request which is protected by the resourceGuard.

--tenant-id

ID of the tenant if the Resource Guard protecting the vault exists in a different tenant.

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-instance validate-for-backup

Validate whether configure backup will be successful or not.

az dataprotection backup-instance validate-for-backup --backup-instance
                                                      [--ids]
                                                      [--no-wait]
                                                      [--resource-group]
                                                      [--subscription]
                                                      [--vault-name]

Examples

Validate for backup

az dataprotection backup-instance validate-for-backup -g sarath-rg --vault-name sarath-vault --backup-instance backup_instance.json

Required Parameters

--backup-instance

Request body for operation Expected value: json-string/@json-file.

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.

Default value: False
--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

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-instance validate-for-restore

Validates if Restore can be triggered for a DataSource.

az dataprotection backup-instance validate-for-restore --backup-instance-name
                                                       --restore-request-object
                                                       [--ids]
                                                       [--no-wait]
                                                       [--resource-group]
                                                       [--subscription]
                                                       [--use-secondary-region {false, true}]
                                                       [--vault-name]

Examples

Validate for restore

az dataprotection backup-instance validate-for-restore -g sample_rg --vault-name sample_backupvault --backup-instance-name sample_biname-fd53a211-3f3e-4c7e-ba45-81050e27c0be --restore-request-object restorerequestobject.json

Validate for cross-region-restore

az dataprotection backup-instance validate-for-restore -g sample_rg --vault-name sample_backupvault --backup-instance-name sample_biname-fd53a211-3f3e-4c7e-ba45-81050e27c0be --restore-request-object restorerequestobject.json --use-secondary-region

Required Parameters

--backup-instance-name --name -n

Backup instance name.

--restore-request-object

Request body for operation. Expected value: json-string/@json-file.

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.

Default value: False
--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.

--use-secondary-region

Use this flag to restore from a recoverypoint in secondary region.

Accepted values: false, true
--vault-name -v

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-instance wait

Place the CLI in a waiting state until a condition is met.

az dataprotection backup-instance wait [--backup-instance-name]
                                       [--created]
                                       [--custom]
                                       [--deleted]
                                       [--exists]
                                       [--ids]
                                       [--interval]
                                       [--resource-group]
                                       [--subscription]
                                       [--timeout]
                                       [--updated]
                                       [--vault-name]

Optional Parameters

--backup-instance-name --name -n

The name of the backup instance.

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