다음을 통해 공유


az sql server-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 server-arc backups-policy command. Learn more about extensions.

This command group 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 server-arc backups-policy delete

Delete your current backups policy.

Extension Preview
az sql server-arc backups-policy set

Set your backups policy.

Extension Preview
az sql server-arc backups-policy show

See your current backups policy.

Extension Preview

az sql server-arc backups-policy delete

Preview

Command group 'sql server-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 server-arc backups-policy delete --name
                                        --resource-group
                                        [--yes]

Examples

Ex 1 - Deleting a backups policy

az sql server-arc backups-policy delete --name myServerName --resource-group myResourceGroup

Required Parameters

--name -n

Name of the Arc-enabled SQL Server instance.

--resource-group -g

Name of the resource group where the Arc-enabled SQL Server instance is located.

Optional Parameters

--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 sql server-arc backups-policy set

Preview

Command group 'sql server-arc backups-policy' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Set your backups policy.

az sql server-arc backups-policy set --name
                                     --resource-group
                                     [--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 server-arc backups-policy set --name myServerName --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 server-arc backups-policy set --name myServerName --resource-group myResourceGroup --default-policy

Ex 3 - Disabling a backups policy

az sql server-arc backups-policy set --name myServerName --resource-group myResourceGroup --retention-days 0

Required Parameters

--name -n

Name of the Arc-enabled SQL Server instance.

--resource-group -g

Name of the resource group where the Arc-enabled SQL Server instance is located.

Optional Parameters

--default-policy

Set the default policy of weekly retention period, weekly full, daily differential, and 5 min transaction log backups.

Default value: False
--diff-backup-hours

Interval, in hours, at which differential backups should be performed. Valid values – 12 or 24.

--full-backup-days

Interval, in days, at which a new full backup should be performed. Valid values – 0-7.

--retention-days

Number of days to keep the backups for. Valid values 0-35.

--tlog-backup-mins

Interval, in minutes, at which transactional backups should be performed. Valid values – 0 to 60.

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 sql server-arc backups-policy show

Preview

Command group 'sql server-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 server-arc backups-policy show --name
                                      --resource-group

Examples

Ex 1 - Displaying a backups policy

az sql server-arc backups-policy show --name myServerName --resource-group myResourceGroup

Required Parameters

--name -n

Name of the Arc-enabled SQL Server instance.

--resource-group -g

Name of the resource group where the Arc-enabled SQL Server instance is located.

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.