שתף באמצעות


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.

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

--use-secondary-region

Use this flag to list containers in secondary region.

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 container re-register

Reset the registration details for a given container.

az backup container re-register --workload-type {MSSQL, SAPASE, SAPHANA, 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://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

--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: MSSQL, SAPASE, SAPHANA, SAPHanaDatabase, SQLDataBase

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

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

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

Accepted values: MSSQL, SAPASE, SAPHANA, SAPHanaDatabase, SQLDataBase

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

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

--name -n

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

--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 show container in secondary region.

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

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

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

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.