你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
az sql db-arc backups-policy
Note
This reference is part of the arcdata extension for the Azure CLI (version 2.3.1 or higher). The extension will automatically install the first time you run an az sql db-arc backups-policy command. Learn more about extensions.
Command group 'sql db-arc' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Manage backups policy.
Commands
Name | Description | Type | Status |
---|---|---|---|
az sql db-arc backups-policy delete |
Delete your current backups policy. |
Extension | Preview |
az sql db-arc backups-policy set |
Set your backups policy. |
Extension | Preview |
az sql db-arc backups-policy show |
See your current backups policy. |
Extension | Preview |
az sql db-arc backups-policy delete
Command group 'sql db-arc backups-policy' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Delete your current backups policy.
az sql db-arc backups-policy delete --name
--resource-group
--server
[--yes]
Examples
Ex 1 - Deleting a backups policy
az sql db-arc backups-policy delete --name myDatabase --server myInstance --resource-group myResourceGroup
Required Parameters
Name of the database.
Name of the resource group where the Arc-enabled SQL Server instance is located.
Name of the Arc-enabled SQL Server instance.
Optional Parameters
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 db-arc backups-policy set
Command group 'sql db-arc backups-policy' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Set your backups policy.
az sql db-arc backups-policy set --name
--resource-group
--server
[--default-policy]
[--diff-backup-hours]
[--full-backup-days]
[--retention-days]
[--tlog-backup-mins]
Examples
Ex 1 - Enabling a backups policy with a custom backups policy
az sql db-arc backups-policy set --name myDatabase --server myInstance --resource-group myResourceGroup --retention-days 7 --full-backup-days 7 --diff-backup-hours 12 --tlog-backup-mins 5
Ex 2 - Enabling a backups policy with the default backups policy
az sql db-arc backups-policy set --name myDatabase --server myInstance --resource-group myResourceGroup --default-policy
Ex 3 - Disabling a backups policy
az sql db-arc backups-policy set --name myDatabase --server myInstance --resource-group myResourceGroup --retention-days 0
Required Parameters
Name of the database.
Name of the resource group where the Arc-enabled SQL Server instance is located.
Name of the Arc-enabled SQL Server instance.
Optional Parameters
Set the default policy of weekly retention period, weekly full, daily differential, and 5 min transaction log backups.
Interval, in hours, at which differential backups should be performed. Valid values – 12 or 24.
Interval, in days, at which a new full backup should be performed. Valid values – 0-7.
Number of days to keep the backups for. Valid values 0-35.
Interval, in minutes, at which transactional backups should be performed. Valid values – 0 to 60.
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 db-arc backups-policy show
Command group 'sql db-arc backups-policy' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
See your current backups policy.
az sql db-arc backups-policy show --name
--resource-group
--server
Examples
Ex 1 - Displaying a backups policy
az sql db-arc backups-policy show --name myDatabase --server myInstance --resource-group myResourceGroup
Required Parameters
Name of the database.
Name of the resource group where the Arc-enabled SQL Server instance is located.
Name of the Arc-enabled SQL Server instance.
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.