Κοινή χρήση μέσω


az sql db geo-backup

Manage SQL database geo redundant backups.

Commands

Name Description Type Status
az sql db geo-backup list

Gets a list of recoverable databases.

Core GA
az sql db geo-backup restore

Restore a geo-redundant backup to a new database.

Core GA
az sql db geo-backup show

Gets a recoverable database, which is a resource representing a database's geo backup.

Core GA

az sql db geo-backup list

Gets a list of recoverable databases.

az sql db geo-backup list [--ids]
                          [--resource-group]
                          [--server --server-name]
                          [--subscription]

Examples

Gets a list of recoverable databases.

az sql db geo-backup list -s myserver -g mygroup

Optional Parameters

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

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

Retrieves all requested geo-redundant backups under this resource group.

Property Value
Parameter group: Resource Id Arguments
--server --server-name -s

Retrieves all requested geo-redundant backups under this server.

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
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 sql db geo-backup restore

Restore a geo-redundant backup to a new database.

az sql db geo-backup restore --dest-database
                             --dest-server
                             --geo-backup-id
                             --resource-group
                             [--assign-identity {false, true}]
                             [--auto-pause-delay]
                             [--availability-zone]
                             [--backup-storage-redundancy --bsr]
                             [--capacity]
                             [--compute-model {Provisioned, Serverless}]
                             [--edition --tier]
                             [--elastic-pool]
                             [--encryption-protector]
                             [--encryption-protector-auto-rotation --epauto {false, true}]
                             [--family]
                             [--federated-client-id]
                             [--ha-replicas --read-replicas]
                             [--keys]
                             [--license-type {BasePrice, LicenseIncluded}]
                             [--min-capacity]
                             [--preferred-enclave-type {Default, VBS}]
                             [--read-scale {Disabled, Enabled}]
                             [--service-level-objective --service-objective]
                             [--tags]
                             [--umi --user-assigned-identity-id]
                             [--zone-redundant {false, true}]

Examples

Restore Geo-redundant backup.

az sql db geo-backup restore \
--dest-database targetdb --dest-server myserver --resource-group mygroup \
--geo-backup-id "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup/providers/Microsoft.Sql/servers/myserver/databases/mydb/geoBackupPolicies/Default"

Required Parameters

--dest-database

Name of the database that will be created as the restore destination.

--dest-server

Name of the server to restore database to.

--geo-backup-id

The resource id of the geo-redundant backup to be restored. Use 'az sql db geo-backup list' or 'az sql db geo-backup show' for backup id.

--resource-group

Name of the target resource group of the server to restore database to.

Optional Parameters

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

--assign-identity -i

Assign identity for database.

Property Value
Accepted values: false, true
--auto-pause-delay

Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled.

Property Value
Parameter group: Serverless offering Arguments
--availability-zone

Availability zone.

--backup-storage-redundancy --bsr

Backup storage redundancy used to store backups. Allowed values include: Local, Zone, Geo, GeoZone.

--capacity -c

The capacity component of the sku in integer number of DTUs or vcores.

Property Value
Parameter group: Performance Level (components) Arguments
--compute-model

The compute model of the database.

Property Value
Parameter group: Serverless offering Arguments
Accepted values: Provisioned, Serverless
--edition --tier -e

The edition component of the sku. Allowed values include: Basic, Standard, Premium, GeneralPurpose, BusinessCritical, Hyperscale.

Property Value
Parameter group: Performance Level (components) Arguments
--elastic-pool

The name or resource id of the elastic pool to create the database in.

Property Value
Parameter group: Performance Level Arguments
--encryption-protector

Specifies the Azure key vault key to be used as database encryption protector key.

--encryption-protector-auto-rotation --epauto

Specifies the database encryption protector key auto rotation flag. Can be either true, false or null.

Property Value
Accepted values: false, true
--family -f

The compute generation component of the sku (for vcore skus only). Allowed values include: Gen4, Gen5.

Property Value
Parameter group: Performance Level (components) Arguments
--federated-client-id

The federated client id for the SQL Database. It is used for cross tenant CMK scenario.

--ha-replicas --read-replicas

The number of high availability replicas to provision for the database. Only settable for Hyperscale edition.

--keys

The list of AKV keys for the SQL Database.

--license-type

The license type to apply for this database.LicenseIncluded if you need a license, or BasePriceif you have a license and are eligible for the Azure HybridBenefit.

Property Value
Accepted values: BasePrice, LicenseIncluded
--min-capacity

Minimal capacity that database will always have allocated, if not paused.

Property Value
Parameter group: Serverless offering Arguments
--preferred-enclave-type

Specifies type of enclave for this resource.

Property Value
Accepted values: Default, VBS
--read-scale

If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica. This property is only settable for Premium and Business Critical databases.

Property Value
Accepted values: Disabled, Enabled
--service-level-objective --service-objective

The service objective for the new database. For example: Basic, S0, P1, GP_Gen4_1, GP_S_Gen5_8, BC_Gen5_2, HS_Gen5_32.

Property Value
Parameter group: Performance Level Arguments
--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

--umi --user-assigned-identity-id

The list of user assigned identity for the SQL Database.

--zone-redundant -z

Specifies whether to enable zone redundancy. Default is true if no value is specified.

Property Value
Accepted values: false, true
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 sql db geo-backup show

Gets a recoverable database, which is a resource representing a database's geo backup.

az sql db geo-backup show [--database --database-name]
                          [--expand-keys {false, true}]
                          [--ids]
                          [--keys-filter]
                          [--resource-group]
                          [--server --server-name]
                          [--subscription]

Examples

Gets a recoverable database, which represents a database's geo backup.

az sql db geo-backup show --server myserver --database mydb --resource-group mygroup

Optional Parameters

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

--database --database-name -d

Retrieves a requested geo-redundant backup under this database.

Property Value
Parameter group: Resource Id Arguments
--expand-keys

Expand the AKV keys for the database.

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

Property Value
Parameter group: Resource Id Arguments
--keys-filter

Expand the AKV keys for the database.

--resource-group -g

Retrieves a requested geo-redundant backup under this resource group.

Property Value
Parameter group: Resource Id Arguments
--server --server-name -s

Retrieves a requested geo-redundant backup under this server.

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