Share via


az backup container

Resource which houses items or applications to be protected.

Commands

Name Description Type Status
az backup container list

List containers registered to a Recovery services vault.

Core GA
az backup container re-register

Reset the registration details for a given container.

Core GA
az backup container register

Register a Resource to the given Recovery Services Vault.

Core GA
az backup container show

Show details of a container registered to a Recovery services vault.

Core GA
az backup container unregister

Unregister a Backup Container to make the underlying 'resource' be protected by another vault.

Core GA

az backup container list

List containers registered to a Recovery services vault.

az backup container list --backup-management-type {AzureIaasVM, AzureStorage, AzureWorkload, MAB}
                         --resource-group
                         --vault-name
                         [--use-secondary-region]

Examples

List containers registered to a Recovery services vault. (autogenerated)

az backup container list --resource-group MyResourceGroup --vault-name MyVault --backup-management-type AzureIaasVM

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

Property Value
Accepted values: AzureIaasVM, AzureStorage, AzureWorkload, MAB
--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.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--use-secondary-region

Use this flag to list containers in secondary region.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False

az backup container re-register

Reset the registration details for a given container.

az backup container re-register --workload-type {MSSQL, SAPASE, SAPAseDatabase, SAPHANA, SAPHanaDBInstance, SAPHanaDatabase, SQLDataBase}
                                [--backup-management-type {AzureIaasVM, AzureStorage, AzureWorkload}]
                                [--container-name]
                                [--ids]
                                [--resource-group]
                                [--subscription]
                                [--vault-name]
                                [--yes]

Examples

Reset the registration details for a given container. To be used only in error scenarios as specified here (https://learn.microsoft.com/azure/backup/backup-sql-server-azure-troubleshoot#re-registration-failures). Understand the failure symptoms and causes before attempting re-registration.

az backup container re-register --resource-group MyResourceGroup --vault-name MyVault --container-name MyContainer --workload-type MSSQL --backup-management-type AzureWorkload --yes

Required Parameters

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

Property Value
Accepted values: MSSQL, SAPASE, SAPAseDatabase, SAPHANA, SAPHanaDBInstance, SAPHanaDatabase, SQLDataBase

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

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

Property Value
Default value: AzureWorkload
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.

Property Value
Parameter group: Resource Id Arguments
--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.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--subscription

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

Property Value
Parameter group: Resource Id Arguments
--vault-name -v

Name of the Recovery services vault.

Property Value
Parameter group: Resource Id Arguments
--yes -y

Do not prompt for confirmation.

Property Value
Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

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

--verbose

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

Property Value
Default value: False

az backup container register

Register a Resource to the given Recovery Services Vault.

az backup container register --resource-group
                             --resource-id
                             --vault-name
                             --workload-type {MSSQL, SAPASE, SAPAseDatabase, SAPHANA, SAPHanaDBInstance, SAPHanaDatabase, SQLDataBase}
                             [--backup-management-type {AzureIaasVM, AzureStorage, AzureWorkload}]

Examples

This command allows Azure Backup to convert the 'Resource' to a 'Backup Container' which is then registered to the given Recovery services vault. The Azure Backup service can then discover workloads of the given workload type within this container to be protected later.

az backup container register --resource-group MyResourceGroup --vault-name MyVault --resource-id MyResourceId --workload-type MSSQL --backup-management-type AzureWorkload

Required Parameters

--resource-group -g

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

--resource-id

ID of the Azure Resource containing items to be protected by Azure Backup service. Currently, only Azure VM resource IDs are supported.

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

Property Value
Accepted values: MSSQL, SAPASE, SAPAseDatabase, SAPHANA, SAPHanaDBInstance, SAPHanaDatabase, SQLDataBase

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

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

Property Value
Default value: AzureWorkload
Accepted values: AzureIaasVM, AzureStorage, AzureWorkload
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False

az backup container show

Show details of a container registered to a Recovery services vault.

az backup container show [--backup-management-type {AzureIaasVM, AzureStorage, AzureWorkload, MAB}]
                         [--ids]
                         [--name]
                         [--resource-group]
                         [--subscription]
                         [--use-secondary-region]
                         [--vault-name]

Examples

Show details of a container registered to a Recovery services vault. (autogenerated)

az backup container show --name MyContainer --resource-group MyResourceGroup --vault-name MyVault

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

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

Property Value
Accepted values: AzureIaasVM, AzureStorage, AzureWorkload, MAB
--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.

Property Value
Parameter group: Resource Id Arguments
--name -n

Name of the container. You can use the backup container list command to get the name of a container.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--subscription

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

Property Value
Parameter group: Resource Id Arguments
--use-secondary-region

Use this flag to show container in secondary region.

--vault-name -v

Name of the Recovery services vault.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

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

--verbose

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

Property Value
Default value: False

az backup container unregister

Unregister a Backup Container to make the underlying 'resource' be protected by another vault.

az backup container unregister [--backup-management-type {AzureIaasVM, AzureStorage, AzureWorkload, MAB}]
                               [--container-name]
                               [--ids]
                               [--resource-group]
                               [--subscription]
                               [--vault-name]
                               [--yes]

Examples

If you are backing up Azure File shares, and want to clean-up, you need to delete backups for those shares and unregister the parent Azure Storage account.

az backup container unregister --container-name MyContainer --resource-group MyResourceGroup --vault-name MyVault --backup-management-type AzureStorage

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

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

Property Value
Accepted values: AzureIaasVM, AzureStorage, AzureWorkload, MAB
--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.

Property Value
Parameter group: Resource Id Arguments
--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.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--subscription

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

Property Value
Parameter group: Resource Id Arguments
--vault-name -v

Name of the Recovery services vault.

Property Value
Parameter group: Resource Id Arguments
--yes -y

Do not prompt for confirmation.

Property Value
Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

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

--verbose

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

Property Value
Default value: False