az dataprotection backup-instance

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-instance command. Learn more about extensions.

Command group 'az dataprotection' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Manage backup instance with dataprotection.

Commands

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

Trigger adhoc backup.

Extension Experimental
az dataprotection backup-instance create

Configure backup for a resource in a backup vault.

Extension Experimental
az dataprotection backup-instance delete

Delete a backup instance in a backup vault.

Extension Experimental
az dataprotection backup-instance deleted-backup-instance

Perform operations on soft-deleted backup instances.

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

List deleted backup instances belonging to a backup vault.

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

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

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

Undelete soft-deleted backup instances.

Extension Experimental
az dataprotection backup-instance initialize

Initialize JSON request body for configuring backup of a resource.

Extension Experimental
az dataprotection backup-instance initialize-backupconfig

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

Extension Experimental
az dataprotection backup-instance initialize-restoreconfig

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

Extension Experimental
az dataprotection backup-instance list

Gets backup instances belonging to a backup vault.

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

List backup instances across subscriptions, resource groups and vaults.

Extension Experimental
az dataprotection backup-instance restore

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

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

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

Extension Experimental
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 Experimental
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 Experimental
az dataprotection backup-instance restore trigger

Triggers restore for a BackupInstance.

Extension Experimental
az dataprotection backup-instance resume-protection

This operation will resume protection for a stopped backup instance.

Extension Experimental
az dataprotection backup-instance show

Get a backup instance with name in a backup vault.

Extension Experimental
az dataprotection backup-instance stop-protection

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

Extension Experimental
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 Experimental
az dataprotection backup-instance update-msi-permissions

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

Extension Experimental
az dataprotection backup-instance update-policy

Update backup policy associated with backup instance.

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

Validate whether configure backup will be successful or not.

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

Validates if Restore can be triggered for a DataSource.

Extension Experimental
az dataprotection backup-instance wait

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

Extension Experimental

az dataprotection backup-instance adhoc-backup

Experimental

Command group 'az dataprotection' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

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

Experimental

Command group 'az dataprotection' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

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

Experimental

Command group 'az dataprotection' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

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

Experimental

Command group 'az dataprotection' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Initialize JSON request body for configuring backup of a resource.

az dataprotection backup-instance initialize --datasource-id
                                             --datasource-location
                                             --datasource-type {AzureBlob, AzureDatabaseForPostgreSQL, 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, AzureDatabaseForPostgreSQL, 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

Experimental

Command group 'az dataprotection' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

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

az dataprotection backup-instance initialize-backupconfig --datasource-type {AzureBlob, AzureDatabaseForPostgreSQL, AzureDisk, AzureKubernetesService}
                                                          [--backup-hook-references]
                                                          [--excluded-namespaces]
                                                          [--excluded-resource-type]
                                                          [--include-cluster-scope {false, true}]
                                                          [--included-namespaces]
                                                          [--included-resource-type]
                                                          [--label-selectors]
                                                          [--snapshot-volumes {false, true}]

Examples

Initialize backup configuration

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

Required Parameters

--datasource-type

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

accepted values: AzureBlob, AzureDatabaseForPostgreSQL, AzureDisk, AzureKubernetesService

Optional Parameters

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

Property sets the hook reference to be executed during backup.

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

Experimental

Command group 'az dataprotection' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

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

az dataprotection backup-instance initialize-restoreconfig --datasource-type {AzureBlob, AzureDatabaseForPostgreSQL, 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}]
                                                           [--restore-hook-references]

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, AzureDatabaseForPostgreSQL, 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
--restore-hook-references --restore-hook-refs

Property sets the hook reference to be executed during restore.

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

Experimental

Command group 'az dataprotection' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

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

Experimental

Command group 'az dataprotection' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

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, AzureDatabaseForPostgreSQL, 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, AzureDatabaseForPostgreSQL, 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

Experimental

Command group 'az dataprotection' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

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

Experimental

Command group 'az dataprotection' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

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

Experimental

Command group 'az dataprotection' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

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}]
                                                  [--resource-group]
                                                  [--subscription]
                                                  [--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
--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 suspend-backup

Experimental

Command group 'az dataprotection' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

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}]
                                                 [--resource-group]
                                                 [--subscription]
                                                 [--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
--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 update-msi-permissions

Experimental

Command group 'az dataprotection' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

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

az dataprotection backup-instance update-msi-permissions --datasource-type {AzureBlob, AzureDatabaseForPostgreSQL, 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]
                                                         [--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, AzureDatabaseForPostgreSQL, 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.

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

Experimental

Command group 'az dataprotection' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Update backup policy associated with backup instance.

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

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

Experimental

Command group 'az dataprotection' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

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

Experimental

Command group 'az dataprotection' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

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

Experimental

Command group 'az dataprotection' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

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.