az backup container

Resource which houses items or applications to be protected.

Commands

az backup container list

List containers registered to a Recovery services vault.

az backup container re-register

Reset the registration details for a given container.

az backup container register

Register a Resource to the given Recovery Services Vault.

az backup container show

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

az backup container unregister

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

az backup container list

List containers registered to a Recovery services vault.

az backup container list --backup-management-type {AzureIaasVM, AzureStorage, AzureWorkload}
                         --resource-group
                         --vault-name
                         [--query-examples]
                         [--subscription]

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

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

--query-examples

Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.

--subscription

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

az backup container re-register

Reset the registration details for a given container.

az backup container re-register --container-name
                                --workload-type {AzureFileShare, MSSQL, SAPHANA, SAPHanaDatabase, SQLDataBase, VM}
                                [--backup-management-type {AzureIaasVM, AzureStorage, AzureWorkload}]
                                [--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://docs.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

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

--workload-type

Specifiy the type of applications within the Resource which should be discovered and protected by Azure Backup.

accepted values: AzureFileShare, MSSQL, SAPHANA, SAPHanaDatabase, SQLDataBase, VM

Optional Parameters

--backup-management-type

Specifiy 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
default value: AzureWorkload
--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

Name of the Recovery services vault.

--yes -y

Do not prompt for confirmation.

az backup container register

Register a Resource to the given Recovery Services Vault.

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

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 --resource-id MyResourceID

Required Parameters

--resource-id

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

--workload-type

Specifiy the type of applications within the Resource which should be discovered and protected by Azure Backup.

accepted values: AzureFileShare, MSSQL, SAPHANA, SAPHanaDatabase, SQLDataBase, VM

Optional Parameters

--backup-management-type

Specifiy 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
default value: AzureWorkload
--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

Name of the Recovery services vault.

az backup container show

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

az backup container show --name
                         [--backup-management-type {AzureIaasVM, AzureStorage, AzureWorkload}]
                         [--ids]
                         [--query-examples]
                         [--resource-group]
                         [--subscription]
                         [--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

Required Parameters

--name -n

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

Optional Parameters

--backup-management-type

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

--query-examples

Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.

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

az backup container unregister

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

az backup container unregister --container-name
                               [--backup-management-type {AzureIaasVM, AzureStorage, AzureWorkload}]
                               [--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

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

Optional Parameters

--backup-management-type

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

Name of the Recovery services vault.

--yes -y

Do not prompt for confirmation.