az sql midb ltr-backup
Manage SQL Managed Instance database long term retention backups.
Commands
Name | Description | Type | Status |
---|---|---|---|
az sql midb ltr-backup delete |
Delete a long term retention backup. |
Core | Preview |
az sql midb ltr-backup list |
List the long term retention backups for a location, instance or database. |
Core | Preview |
az sql midb ltr-backup restore |
Restore a long term retention backup to a new database. |
Core | Preview |
az sql midb ltr-backup show |
Get a long term retention backup for a managed database. |
Core | Preview |
az sql midb ltr-backup wait |
Place the CLI in a waiting state until a condition of the managed database is met. |
Core | GA |
az sql midb ltr-backup delete
This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Delete a long term retention backup.
az sql midb ltr-backup delete [--backup-id]
[--database]
[--location]
[--managed-instance]
[--name]
[--yes]
Examples
Delete long term retention backup for a managed database.
az sql midb ltr-backup delete -l southeastasia --mi myinstance -d mymanageddb --name "3214b3fb-fba9-43e7-96a3-09e35ffcb336;132292152080000000"
Delete long term retention backup for a managed database.
az sql midb ltr-backup delete --backup-id '/subscriptions/6caa113c-794c-42f8-ab9d-878d8aa104dc/resourceGroups/mygroup/providers/Microsoft.Sql/locations/southeastasia/longTermRetentionManagedInstances/myinstance/longTermRetentionDatabases/mymanageddb/longTermRetentionManagedInstanceBackups/3214b3fb-fba9-43e7-96a3-09e35ffcb336;132292152080000000'
Optional Parameters
The resource id of the backups. Use 'az sql midb ltr-backup show' or 'az sql midb ltr-backup list' for backup id. If provided, other arguments are not required.
The name of the Azure SQL Managed Database.
The location of the desired backup(s).
Name of the Azure SQL Managed Instance.
The name of the LTR backup. Use 'az sql midb ltr-backup show' or 'az sql midb ltr-backup list' for backup name.
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.
az sql midb ltr-backup list
This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
List the long term retention backups for a location, instance or database.
az sql midb ltr-backup list --location
[--database]
[--database-state]
[--latest]
[--managed-instance]
[--resource-group]
Examples
List long term retention backups for a managed database.
az sql midb ltr-backup list -l southeastasia --mi myinstance -d mymanageddb
List long term retention backups for a managed instance (list only the latest LTR backups, which belong to live databases).
az sql midb ltr-backup list -l southeastasia --mi myinstance --database-state Live --only-latest-per-database
List long term retention backups for a managed instance (with resource group argument).
az sql midb ltr-backup list -l southeastasia -g mygroup --mi myinstance
List long term retention backups for a location (list only the latest LTR backups, which belong to live databases).
az sql midb ltr-backup list -l southeastasia --database-state Live --only-latest-per-database
List long term retention backups for a location (with resource group argument).
az sql midb ltr-backup list -l southeastasia -g mygroup
Required Parameters
The location of the desired backup(s).
Optional Parameters
The name of the Azure SQL Managed Database. If specified (along with instance name), retrieves all requested backups under this database.
'All', 'Live', or 'Deleted'. Will fetch backups only from databases of specified state. If no state provied, defaults to 'All'.
If true, will only return the latest backup for each database.
Name of the Azure SQL Managed Instance. If specified, retrieves all requested backups under this managed instance.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
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.
az sql midb ltr-backup restore
This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Restore a long term retention backup to a new database.
az sql midb ltr-backup restore --backup-id
--dest-database
--dest-mi
--dest-resource-group
[--no-wait]
Examples
Restore a managed database using LTR backup.
az sql midb ltr-backup restore \
--dest-database targetmidb --dest-mi myinstance --dest-resource-group mygroup \
--backup-id "/subscriptions/6caa113c-794c-42f8-ab9d-878d8aa104dc/resourceGroups/mygroup/providers/Microsoft.Sql/locations/southeastasia/longTermRetentionManagedInstances/myinstance/longTermRetentionDatabases/sourcemidb/longTermRetentionManagedInstanceBackups/3214b3fb-fba9-43e7-96a3-09e35ffcb336;132292152080000000"
Required Parameters
The resource id of the long term retention backup to be restored. Use 'az sql midb ltr-backup show' or 'az sql midb ltr-backup list' for backup id.
Name of the managed database that will be created as the restore destination.
Name of the managed instance to restore managed database to.
Name of the resource group of the managed instance to restore managed database to.
Optional Parameters
Do not wait for the long-running operation to finish.
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.
az sql midb ltr-backup show
This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Get a long term retention backup for a managed database.
az sql midb ltr-backup show [--backup-id]
[--database]
[--location]
[--managed-instance]
[--name]
Examples
Show long term retention backup for a managed database.
az sql midb ltr-backup show --backup-id '/subscriptions/6caa113c-794c-42f8-ab9d-878d8aa104dc/resourceGroups/mygroup/providers/Microsoft.Sql/locations/southeastasia/longTermRetentionManagedInstances/myinstance/longTermRetentionDatabases/mymanageddb/longTermRetentionManagedInstanceBackups/3214b3fb-fba9-43e7-96a3-09e35ffcb336;132292152080000000'
Optional Parameters
The resource id of the backups. Use 'az sql midb ltr-backup show' or 'az sql midb ltr-backup list' for backup id. If provided, other arguments are not required.
The name of the Azure SQL Managed Database.
The location of the desired backup(s).
Name of the Azure SQL Managed Instance.
The name of the LTR backup. Use 'az sql midb ltr-backup show' or 'az sql midb ltr-backup list' for backup name.
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.
az sql midb ltr-backup wait
Place the CLI in a waiting state until a condition of the managed database is met.
az sql midb ltr-backup wait --database
--managed-instance
--resource-group
[--created]
[--custom]
[--deleted]
[--exists]
[--interval]
[--timeout]
[--updated]
Required Parameters
The name of the Azure SQL Managed Database.
Name of the Azure SQL Managed Instance.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Wait until created with 'provisioningState' at 'Succeeded'.
Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].
Wait until deleted.
Wait until the resource exists.
Polling interval in seconds.
Maximum wait in seconds.
Wait until updated with provisioningState at 'Succeeded'.
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