az backup protection
Manage protection of your items, enable protection or disable it, or take on-demand backups.
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://learn.microsoft.com/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 |
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}
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
Specify the resource name to be protected by Azure Backup service.
Specify the type of items within the Resource which should be discovered and protected by Azure Backup. 'HANAInstance' and 'SAPHanaSystem' can be used interchangeably.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Parent Server name of the item.
Name of the Recovery services vault.
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.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
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}
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
Name of the backup policy.
Specify the resource name to be protected by Azure Backup service.
Specify the type of items within the Resource which should be discovered and protected by Azure Backup. 'HANAInstance' and 'SAPHanaSystem' can be used interchangeably.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Parent Server name of the item.
Name of the Recovery services vault.
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.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
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}]
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
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.
'Full, Differential, Log, CopyOnlyFull' for backup Item type 'MSSQL'. 'Full, Differential' for backup item type 'SAPHANA'.
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.
Option to enable compression.
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.
Name of the backed up item.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
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.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Name of the Recovery services vault.
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.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
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://learn.microsoft.com/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]
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
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of the Virtual Machine to be protected.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
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]
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
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.
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.
Option to delete existing backed up data in the Recovery services vault.
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.
Name of the backed up item.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Switch parameter that specifies that existing recovery points should be retained for the duration specified by the backup policy.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
ID of the tenant if the Resource Guard protecting the vault exists in a different tenant.
Name of the Recovery services vault.
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.
Do not prompt for confirmation.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
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
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
Name of the Azure FileShare.
Name of the backup policy.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name of the Storage Account of the FileShare.
Name of the Recovery services vault.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
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}
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
Name of the backup policy.
Specify the resource name to be protected by Azure Backup service.
Specify the type of items within the Resource which should be discovered and protected by Azure Backup. 'HANAInstance' and 'SAPHanaSystem' can be used interchangeably.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Parent Server name of the item.
Name of the Recovery services vault.
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.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
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}]
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)"
Name of the backup policy.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name of the Recovery services vault.
Name or ID of the Virtual Machine to be protected.
Option to decide whether to include or exclude the disk or reset any previous settings to default behavior.
List of disks to be excluded or included.
Option to specify to backup OS disk only.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
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}]
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
Name of the backup policy.
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.
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.
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.
Name of the backed up item.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Name of the Recovery services vault.
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.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
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}]
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
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.
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.
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.
Name of the backed up item.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Name of the Recovery services vault.
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.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
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]
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
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.
Option to decide whether to include or exclude the disk or reset any previous settings to default behavior.
List of disks to be excluded or included.
Option to specify to backup OS disk only.
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.
Name of the backed up item.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Name of the Recovery services vault.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Azure CLI feedback
Azure CLI is an open source project. Select a link to provide feedback: