az sql midb short-term-retention-policy
Manage SQL Managed Instance database backup short term retention policy.
Commands
Name | Description | Type | Status |
---|---|---|---|
az sql midb short-term-retention-policy set |
Update short term retention for automated backups on a single database. |
Core | Preview |
az sql midb short-term-retention-policy show |
Show short term retention for automated backups on a single database. |
Core | Preview |
az sql midb short-term-retention-policy set
This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Update short term retention for automated backups on a single database.
az sql midb short-term-retention-policy set --retention-days
[--deleted-time]
[--ids]
[--managed-instance]
[--name]
[--no-wait]
[--resource-group]
[--subscription]
Examples
Set backup short term retention for live managed database.
az sql midb short-term-retention-policy set -g mygroup --mi myinstance -n mymanageddb --retention-days retentionindays
Set backup short term retention for dropped managed database.
az sql midb short-term-retention-policy set -g mygroup --mi myinstance -n mymanageddb --deleted-time "2018-05-20T05:34:22" --retention-days retentionindays
Required Parameters
New backup short term retention policy in days.Valid policy for live database is 7-35 days, valid policy for dropped databases is 0-35 days.
Optional Parameters
If specified, updates retention days for a deleted database, instead of an existing database.Must match the deleted time of a deleted database on the source Managed Instance.
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 of the Azure SQL Managed Instance.
The name of the Azure SQL Managed Database.
Do not wait for the long-running operation to finish.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
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 short-term-retention-policy show
This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Show short term retention for automated backups on a single database.
az sql midb short-term-retention-policy show [--deleted-time]
[--ids]
[--managed-instance]
[--name]
[--resource-group]
[--subscription]
Examples
Shows backup short term retention for live managed database.
az sql midb short-term-retention-policy show -g mygroup --mi myinstance -n mymanageddb
Show backup short term retention for dropped managed database.
az sql midb short-term-retention-policy show -g mygroup --mi myinstance -n mymanageddb --deleted-time "2018-05-20T05:34:22"
Optional Parameters
If specified, shows retention days for a deleted database, instead of an existing database.Must match the deleted time of a deleted database on the source Managed Instance.
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 of the Azure SQL Managed Instance.
The name of the Azure SQL Managed Database.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
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