Share via


az backup protection

Manage protection of your items, enable protection or disable it, or take on-demand backups.

Commands

Name Description Type Status
az backup protection auto-disable-for-azurewl

Disable auto-protection for the specified protectable item.

Core GA
az backup protection auto-enable-for-azurewl

Automatically protect all existing unprotected DBs and any DB which will be added later with the given policy.

Core GA
az backup protection backup-now

Perform an on-demand backup of a backed up item.

Core GA
az backup protection check-vm

The command returns null/empty if the specified resource is not protected under any Recovery Services vault in the subscription. When configuring backup fails, it may return vault details. If Azure Backup is failing, then look for the corresponding error code in the Common issues section - https://zcusa.951200.xyz/en-us/azure/backup/backup-azure-vms-troubleshoot#common-issues. If it is protected, the relevant vault details will be returned.

Core GA
az backup protection disable

Stop protecting a backed up item. Can retain the backed up data forever or choose to delete it.

Core GA
az backup protection enable-for-azurefileshare

Start protecting a previously unprotected Azure File share within an Azure Storage account as per the specified policy to a Recovery services vault.

Core GA
az backup protection enable-for-azurewl

Start protecting a previously unprotected workload within an Azure VM as per the specified policy to a Recovery services vault. Provide the workload details as a protectable item.

Core GA
az backup protection enable-for-vm

Start protecting a previously unprotected Azure VM as per the specified policy to a Recovery services vault.

Core GA
az backup protection resume

Resume backup for the associated backup item. Use this to change the policy associated with the backup item.

Core GA
az backup protection undelete

Rehydrate an item from softdeleted state to stop protection with retained data state.

Core GA
az backup protection update-for-vm

Update disk exclusion settings associated with a backed up VM item.

Core GA

az backup protection auto-disable-for-azurewl

Disable auto-protection for the specified protectable item.

az backup protection auto-disable-for-azurewl --protectable-item-name
                                              --protectable-item-type {HANAInstance, SAPHanaDatabase, SAPHanaSystem, SQLAG, SQLDatabase, SQLInstance}
                                              --resource-group
                                              --server-name
                                              --vault-name
                                              --workload-type {AzureFileShare, MSSQL, SAPHANA, SAPHanaDatabase, SQLDataBase, VM}

Examples

Disable auto-protection for the specified protectable item.

az backup protection auto-disable-for-azurewl --resource-group MyResourceGroup --vault-name MyVault  --protectable-item-name ItemName --protectable-item-type SQLInstance --server-name Myserver --workload-type MSSQL

Required Parameters

--protectable-item-name

Specify the resource name to be protected by Azure Backup service.

--protectable-item-type

Specify the type of items within the Resource which should be discovered and protected by Azure Backup. 'HANAInstance' and 'SAPHanaSystem' can be used interchangeably.

Accepted values: HANAInstance, SAPHanaDatabase, SAPHanaSystem, SQLAG, SQLDatabase, SQLInstance
--resource-group -g

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

--server-name

Parent Server name of the item.

--vault-name -v

Name of the Recovery services vault.

--workload-type

Specify the type of applications within the Resource which should be discovered and protected by Azure Backup. 'MSSQL' and 'SQLDataBase' can be used interchangeably for SQL in Azure VM, as can 'SAPHANA' and 'SAPHanaDatabase' for SAP HANA in Azure VM.

Accepted values: AzureFileShare, MSSQL, SAPHANA, SAPHanaDatabase, SQLDataBase, VM
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 backup protection auto-enable-for-azurewl

Automatically protect all existing unprotected DBs and any DB which will be added later with the given policy.

az backup protection auto-enable-for-azurewl --policy-name
                                             --protectable-item-name
                                             --protectable-item-type {HANAInstance, SAPHanaDatabase, SAPHanaSystem, SQLAG, SQLDatabase, SQLInstance}
                                             --resource-group
                                             --server-name
                                             --vault-name
                                             --workload-type {AzureFileShare, MSSQL, SAPHANA, SAPHanaDatabase, SQLDataBase, VM}

Examples

Automatically protect all existing unprotected DBs and any DB which will be added later with the given policy. Azure backup service will then regularly scan auto-protected containers for any new DBs and automatically protect them.

az backup protection auto-enable-for-azurewl --policy-name MyPolicy --resource-group MyResourceGroup --vault-name MyVault  --protectable-item-name ItemName --protectable-item-type SQLInstance --server-name Myserver --workload-type MSSQL

Required Parameters

--policy-name -p

Name of the backup policy.

--protectable-item-name

Specify the resource name to be protected by Azure Backup service.

--protectable-item-type

Specify the type of items within the Resource which should be discovered and protected by Azure Backup. 'HANAInstance' and 'SAPHanaSystem' can be used interchangeably.

Accepted values: HANAInstance, SAPHanaDatabase, SAPHanaSystem, SQLAG, SQLDatabase, SQLInstance
--resource-group -g

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

--server-name

Parent Server name of the item.

--vault-name -v

Name of the Recovery services vault.

--workload-type

Specify the type of applications within the Resource which should be discovered and protected by Azure Backup. 'MSSQL' and 'SQLDataBase' can be used interchangeably for SQL in Azure VM, as can 'SAPHANA' and 'SAPHanaDatabase' for SAP HANA in Azure VM.

Accepted values: AzureFileShare, MSSQL, SAPHANA, SAPHanaDatabase, SQLDataBase, VM
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 backup protection backup-now

Perform an on-demand backup of a backed up item.

az backup protection backup-now [--backup-management-type {AzureIaasVM, AzureStorage, AzureWorkload}]
                                [--backup-type]
                                [--container-name]
                                [--enable-compression {false, true}]
                                [--ids]
                                [--item-name]
                                [--resource-group]
                                [--retain-until]
                                [--subscription]
                                [--vault-name]
                                [--workload-type {AzureFileShare, MSSQL, SAPHANA, SAPHanaDatabase, SQLDataBase, VM}]

Examples

Perform an on-demand backup of a backed up item. (autogenerated)

az backup protection backup-now --container-name MyContainer --item-name MyItem --resource-group MyResourceGroup --retain-until 01-02-2018 --vault-name MyVault --backup-management-type AzureIaasVM

Optional Parameters

--backup-management-type

Specify the backup management type. Define how Azure Backup manages the backup of entities within the ARM resource. For eg: AzureWorkloads refers to workloads installed within Azure VMs, AzureStorage refers to entities within Storage account. Required only if friendly name is used as Container name.

Accepted values: AzureIaasVM, AzureStorage, AzureWorkload
--backup-type

'Full, Differential, Log, CopyOnlyFull' for backup Item type 'MSSQL'. 'Full, Differential' for backup item type 'SAPHANA'.

--container-name -c

Name of the backup container. Accepts 'Name' or 'FriendlyName' from the output of az backup container list command. If 'FriendlyName' is passed then BackupManagementType is required.

--enable-compression

Option to enable compression.

Accepted values: false, true
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.

--item-name -i

Name of the backed up item.

--resource-group -g

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

--retain-until

The date until which this backed up copy will be available for retrieval, in UTC (d-m-Y). In case of VM and AzureFileShare a default value of 30 days is taken. For MSSQL workload, retain-until min value is 2 days and max value is 99 years for backup-type 'CopyOnlyFull'. For MSSQL and SAPHANA, retain-until min value is 45 days and max value is 99 years for backup-type 'Full'. For any other backup-type, retain-until value is overriden by Policy. If not specified, a default value of 30 days will be taken for backup-type 'CopyOnlyFull', and a value of 45 days for backup-type 'Full' and no default value for other backup types.

--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 Recovery services vault.

--workload-type

Specify the type of applications within the Resource which should be discovered and protected by Azure Backup. 'MSSQL' and 'SQLDataBase' can be used interchangeably for SQL in Azure VM, as can 'SAPHANA' and 'SAPHanaDatabase' for SAP HANA in Azure VM.

Accepted values: AzureFileShare, MSSQL, SAPHANA, SAPHanaDatabase, SQLDataBase, VM
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 backup protection check-vm

The command returns null/empty if the specified resource is not protected under any Recovery Services vault in the subscription. When configuring backup fails, it may return vault details. If Azure Backup is failing, then look for the corresponding error code in the Common issues section - https://zcusa.951200.xyz/en-us/azure/backup/backup-azure-vms-troubleshoot#common-issues. If it is protected, the relevant vault details will be returned.

az backup protection check-vm [--resource-group]
                              [--vm]
                              [--vm-id]

Examples

Find out whether the virtual machine is protected or not. If protected, it returns the recovery services vault ID, otherwise it returns empty. (autogenerated)

az backup protection check-vm --resource-group MyResourceGroup --vm myVM

Optional Parameters

--resource-group -g

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

--vm

Name or ID of the Virtual Machine to be protected.

--vm-id
Deprecated

Argument 'vm_id' has been deprecated and will be removed in a future release. Use '--vm' instead.

ID of the virtual machine to be checked for protection.

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 backup protection disable

Stop protecting a backed up item. Can retain the backed up data forever or choose to delete it.

az backup protection disable [--backup-management-type {AzureIaasVM, AzureStorage, AzureWorkload}]
                             [--container-name]
                             [--delete-backup-data {false, true}]
                             [--ids]
                             [--item-name]
                             [--resource-group]
                             [--retain-as-per-policy {false, true}]
                             [--subscription]
                             [--tenant-id]
                             [--vault-name]
                             [--workload-type {AzureFileShare, MSSQL, SAPHANA, SAPHanaDatabase, SQLDataBase, VM}]
                             [--yes]

Examples

Stop protecting a backed up item. Can retain the backed up data forever or choose to delete it. (autogenerated)

az backup protection disable --container-name MyContainer --backup-management-type AzureIaasVM --delete-backup-data false --item-name MyItem --resource-group MyResourceGroup --vault-name MyVault --yes

Optional Parameters

--backup-management-type

Specify the backup management type. Define how Azure Backup manages the backup of entities within the ARM resource. For eg: AzureWorkloads refers to workloads installed within Azure VMs, AzureStorage refers to entities within Storage account. Required only if friendly name is used as Container name.

Accepted values: AzureIaasVM, AzureStorage, AzureWorkload
--container-name -c

Name of the backup container. Accepts 'Name' or 'FriendlyName' from the output of az backup container list command. If 'FriendlyName' is passed then BackupManagementType is required.

--delete-backup-data

Option to delete existing backed up data in the Recovery services vault.

Accepted values: false, true
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.

--item-name -i

Name of the backed up item.

--resource-group -g

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

--retain-as-per-policy --retain-recovery-points-as-per-policy

Switch parameter that specifies that existing recovery points should be retained for the duration specified by the backup policy.

Accepted values: false, true
Default value: False
--subscription

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

--tenant-id

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

--vault-name -v

Name of the Recovery services vault.

--workload-type

Specify the type of applications within the Resource which should be discovered and protected by Azure Backup. 'MSSQL' and 'SQLDataBase' can be used interchangeably for SQL in Azure VM, as can 'SAPHANA' and 'SAPHanaDatabase' for SAP HANA in Azure VM.

Accepted values: AzureFileShare, MSSQL, SAPHANA, SAPHanaDatabase, SQLDataBase, VM
--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 backup protection enable-for-azurefileshare

Start protecting a previously unprotected Azure File share within an Azure Storage account as per the specified policy to a Recovery services vault.

az backup protection enable-for-azurefileshare --azure-file-share
                                               --policy-name
                                               --resource-group
                                               --storage-account
                                               --vault-name

Examples

Start protecting a previously unprotected Azure File share within an Azure Storage account as per the specified policy to a Recovery services vault. Provide the Azure File share name and the parent storage account name.

az backup protection enable-for-azurefileshare --policy-name MyPolicy --resource-group MyResourceGroup --vault-name MyVault --storage-account MyStorageAccount --azure-file-share MyAzureFileShare

Required Parameters

--azure-file-share

Name of the Azure FileShare.

--policy-name -p

Name of the backup policy.

--resource-group -g

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

--storage-account

Name of the Storage Account of the FileShare.

--vault-name -v

Name of the Recovery services 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 backup protection enable-for-azurewl

Start protecting a previously unprotected workload within an Azure VM as per the specified policy to a Recovery services vault. Provide the workload details as a protectable item.

az backup protection enable-for-azurewl --policy-name
                                        --protectable-item-name
                                        --protectable-item-type {HANAInstance, SAPHanaDatabase, SAPHanaSystem, SQLAG, SQLDatabase, SQLInstance}
                                        --resource-group
                                        --server-name
                                        --vault-name
                                        --workload-type {AzureFileShare, MSSQL, SAPHANA, SAPHanaDatabase, SQLDataBase, VM}

Examples

Start protecting a previously unprotected workload within an Azure VM as per the specified policy to a Recovery services vault. Provide the workload details as a protectable item.

az backup protection enable-for-azurewl --policy-name MyPolicy --resource-group MyResourceGroup --vault-name MyVault --protectable-item-name ItemName --protectable-item-type SQLInstance --server-name Myserver --workload-type MSSQL

Required Parameters

--policy-name -p

Name of the backup policy.

--protectable-item-name

Specify the resource name to be protected by Azure Backup service.

--protectable-item-type

Specify the type of items within the Resource which should be discovered and protected by Azure Backup. 'HANAInstance' and 'SAPHanaSystem' can be used interchangeably.

Accepted values: HANAInstance, SAPHanaDatabase, SAPHanaSystem, SQLAG, SQLDatabase, SQLInstance
--resource-group -g

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

--server-name

Parent Server name of the item.

--vault-name -v

Name of the Recovery services vault.

--workload-type

Specify the type of applications within the Resource which should be discovered and protected by Azure Backup. 'MSSQL' and 'SQLDataBase' can be used interchangeably for SQL in Azure VM, as can 'SAPHANA' and 'SAPHanaDatabase' for SAP HANA in Azure VM.

Accepted values: AzureFileShare, MSSQL, SAPHANA, SAPHanaDatabase, SQLDataBase, VM
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 backup protection enable-for-vm

Start protecting a previously unprotected Azure VM as per the specified policy to a Recovery services vault.

az backup protection enable-for-vm --policy-name
                                   --resource-group
                                   --vault-name
                                   --vm
                                   [--disk-list-setting {exclude, include}]
                                   [--diskslist]
                                   [--exclude-all-data-disks {false, true}]

Examples

Start protecting a previously unprotected Azure VM as per the specified policy to a Recovery services vault. (autogenerated)

az backup protection enable-for-vm --policy-name MyPolicy --resource-group MyResourceGroup --vault-name MyVault --vm myVM

Start protecting a previously unprotected Azure VM as per the specified policy to a Recovery services vault using a Linux shell.

az backup protection enable-for-vm \
  --resource-group myResourceGroup \
  --vault-name myRecoveryServicesVault \
  --policy-name DefaultPolicy \
  --vm "$(az vm show -g VMResourceGroup -n MyVm --query id)"

Required Parameters

--policy-name -p

Name of the backup policy.

--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 Recovery services vault.

--vm

Name or ID of the Virtual Machine to be protected.

Optional Parameters

--disk-list-setting

Option to decide whether to include or exclude the disk or reset any previous settings to default behavior.

Accepted values: exclude, include
--diskslist

List of disks to be excluded or included.

--exclude-all-data-disks

Option to specify to backup OS disk only.

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

Resume backup for the associated backup item. Use this to change the policy associated with the backup item.

az backup protection resume --policy-name
                            [--backup-management-type {AzureIaasVM, AzureStorage, AzureWorkload}]
                            [--container-name]
                            [--ids]
                            [--item-name]
                            [--resource-group]
                            [--subscription]
                            [--vault-name]
                            [--workload-type {AzureFileShare, MSSQL, SAPHANA, SAPHanaDatabase, SQLDataBase, VM}]

Examples

Resume backup for the associated backup item. Use this to change the policy associated with the backup item.

az backup protection resume --vault-name MyVault --resource-group MyResourceGroup --container-name MyContainer --backup-management-type AzureIaasVM --item-name MyItem --policy-name MyPolicy

Required Parameters

--policy-name -p

Name of the backup policy.

Optional Parameters

--backup-management-type

Specify the backup management type. Define how Azure Backup manages the backup of entities within the ARM resource. For eg: AzureWorkloads refers to workloads installed within Azure VMs, AzureStorage refers to entities within Storage account. Required only if friendly name is used as Container name.

Accepted values: AzureIaasVM, AzureStorage, AzureWorkload
--container-name -c

Name of the backup container. Accepts 'Name' or 'FriendlyName' from the output of az backup container list command. If 'FriendlyName' is passed then BackupManagementType is required.

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

--item-name -i

Name of the backed up item.

--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 Recovery services vault.

--workload-type

Specify the type of applications within the Resource which should be discovered and protected by Azure Backup. 'MSSQL' and 'SQLDataBase' can be used interchangeably for SQL in Azure VM, as can 'SAPHANA' and 'SAPHanaDatabase' for SAP HANA in Azure VM.

Accepted values: AzureFileShare, MSSQL, SAPHANA, SAPHanaDatabase, SQLDataBase, VM
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 backup protection undelete

Rehydrate an item from softdeleted state to stop protection with retained data state.

az backup protection undelete [--backup-management-type {AzureIaasVM, AzureStorage, AzureWorkload}]
                              [--container-name]
                              [--ids]
                              [--item-name]
                              [--resource-group]
                              [--subscription]
                              [--vault-name]
                              [--workload-type {AzureFileShare, MSSQL, SAPHANA, SAPHanaDatabase, SQLDataBase, VM}]

Examples

Rehydrate an item from softdeleted state to stop protection with retained data state.

az backup protection undelete --container-name MyContainer --item-name MyItem --resource-group MyResourceGroup --vault-name MyVault --backup-management-type AzureIaasVM --workload-type VM

Optional Parameters

--backup-management-type

Specify the backup management type. Define how Azure Backup manages the backup of entities within the ARM resource. For eg: AzureWorkloads refers to workloads installed within Azure VMs, AzureStorage refers to entities within Storage account. Required only if friendly name is used as Container name.

Accepted values: AzureIaasVM, AzureStorage, AzureWorkload
--container-name -c

Name of the backup container. Accepts 'Name' or 'FriendlyName' from the output of az backup container list command. If 'FriendlyName' is passed then BackupManagementType is required.

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

--item-name -i

Name of the backed up item.

--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 Recovery services vault.

--workload-type

Specify the type of applications within the Resource which should be discovered and protected by Azure Backup. 'MSSQL' and 'SQLDataBase' can be used interchangeably for SQL in Azure VM, as can 'SAPHANA' and 'SAPHanaDatabase' for SAP HANA in Azure VM.

Accepted values: AzureFileShare, MSSQL, SAPHANA, SAPHanaDatabase, SQLDataBase, VM
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 backup protection update-for-vm

Update disk exclusion settings associated with a backed up VM item.

az backup protection update-for-vm [--container-name]
                                   [--disk-list-setting {exclude, include, resetexclusionsettings}]
                                   [--diskslist]
                                   [--exclude-all-data-disks {false, true}]
                                   [--ids]
                                   [--item-name]
                                   [--resource-group]
                                   [--subscription]
                                   [--vault-name]

Examples

Update disk exclusion settings associated with a backed up VM item.

az backup protection update-for-vm --vault-name MyVault --resource-group MyResourceGroup --container-name MyContainer --item-name MyItem --disk-list-setting exclude --diskslist 1

Optional Parameters

--container-name -c

Name of the backup container. Accepts 'Name' or 'FriendlyName' from the output of az backup container list command. If 'FriendlyName' is passed then BackupManagementType is required.

--disk-list-setting

Option to decide whether to include or exclude the disk or reset any previous settings to default behavior.

Accepted values: exclude, include, resetexclusionsettings
--diskslist

List of disks to be excluded or included.

--exclude-all-data-disks

Option to specify to backup OS disk only.

Accepted values: false, true
--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.

--item-name -i

Name of the backed up item.

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