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

Preview

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

Name of the database.

--resource-group -g

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

--server -s

Name of the Arc-enabled SQL Server instance.

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

Preview

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

Name of the database.

--resource-group -g

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

--server -s

Name of the Arc-enabled SQL Server instance.

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

Preview

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

Name of the database.

--resource-group -g

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

--server -s

Name of the Arc-enabled SQL Server instance.

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.