Share via


az postgres flexible-server long-term-retention

Manage flexible server long-term-retention backups.

Commands

Name Description Type Status
az postgres flexible-server long-term-retention list

List all the long-term-retention backups for a given server.

Core GA
az postgres flexible-server long-term-retention pre-check

Performs all the checks that are needed for the subsequent long-term-retention backup operation to succeed.

Core GA
az postgres flexible-server long-term-retention show

Show the details of a specific long-term-retention backup for a given server.

Core GA
az postgres flexible-server long-term-retention start

Start long-term-retention backup for a flexible server. SAS URL parameter refers to the container SAS URL, inside the storage account, where the backups will be uploaded.

Core GA

az postgres flexible-server long-term-retention list

List all the long-term-retention backups for a given server.

az postgres flexible-server long-term-retention list --name
                                                     --resource-group

Examples

List all long-term-retention backups for 'testsvr'.

az postgres flexible-server long-term-retention list -g resource-group-name -n server-name

Required Parameters

--name -n

Name of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

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 postgres flexible-server long-term-retention pre-check

Performs all the checks that are needed for the subsequent long-term-retention backup operation to succeed.

az postgres flexible-server long-term-retention pre-check --backup-name
                                                          --name
                                                          --resource-group

Examples

Precheck if we can perform long-term-retention command on server 'server-name' on resource group 'resource-group-name' with backup name 'backup-name'.

az postgres flexible-server long-term-retention pre-check -g resource-group-name -b backup-name -n server-name

Required Parameters

--backup-name -b

The name of the new long-term-retention backup.

--name -n

Name of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

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 postgres flexible-server long-term-retention show

Show the details of a specific long-term-retention backup for a given server.

az postgres flexible-server long-term-retention show --backup-name
                                                     --name
                                                     --resource-group

Examples

Show the details of long-term-retention backup 'testbackup' for 'testsvr'.

az postgres flexible-server long-term-retention show -g resource-group-name -n server-name -b backup-name

Required Parameters

--backup-name -b

Backup name.

--name -n

Name of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

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 postgres flexible-server long-term-retention start

Start long-term-retention backup for a flexible server. SAS URL parameter refers to the container SAS URL, inside the storage account, where the backups will be uploaded.

az postgres flexible-server long-term-retention start --backup-name
                                                      --name
                                                      --resource-group
                                                      --sas-url

Examples

Create a backup with name 'backup-name' of server 'server-name' in resource group 'resource-group-name', using container with SAS URL '<sas-url>'.

az postgres flexible-server long-term-retention start -g resource-group-name -b backup-name -n server-name -u <sas-url>

Required Parameters

--backup-name -b

The name of the new long-term-retention backup.

--name -n

Name of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--sas-url -u

Container SAS URL.

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.