Share via


az postgres flexible-server backup

The --backup-name/-b argument has been deprecated and will be removed in next breaking change release(2.86.0) scheduled for May 2026. The --name/-n argument will be repurposed to specify the backup name. The --server-name/-s argument will be introduced to specify the server name in next breaking change release(2.86.0) scheduled for May 2026.

Manage flexible server backups.

Commands

Name Description Type Status
az postgres flexible-server backup create

Create a new backup for a flexible server.

Core GA
az postgres flexible-server backup delete

Delete a specific backup.

Core GA
az postgres flexible-server backup list

List all the backups for a given server.

Core GA
az postgres flexible-server backup show

Show the details of a specific backup for a given server.

Core GA

az postgres flexible-server backup create

Breaking change

The --backup-name/-b argument has been deprecated and will be removed in next breaking change release(2.86.0) scheduled for May 2026. The argument for backup name will no longer be required in next breaking change release(2.86.0) scheduled for May 2026. The --name/-n argument will be repurposed to specify the backup name. The --server-name/-s argument will be introduced to specify the server name in next breaking change release(2.86.0) scheduled for May 2026.

Create a new backup for a flexible server.

az postgres flexible-server backup create --backup-name
                                          --name
                                          --resource-group

Examples

Create a backup.

az postgres flexible-server backup create -g testgroup -n testsvr --backup-name testbackup

Required Parameters

--backup-name -b

The name of the 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.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False

az postgres flexible-server backup delete

Breaking change

The --backup-name/-b argument has been deprecated and will be removed in next breaking change release(2.86.0) scheduled for May 2026. The --name/-n argument will be repurposed to specify the backup name. The --server-name/-s argument will be introduced to specify the server name in next breaking change release(2.86.0) scheduled for May 2026.

Delete a specific backup.

az postgres flexible-server backup delete [--backup-name]
                                          [--ids]
                                          [--name]
                                          [--resource-group]
                                          [--subscription]
                                          [--yes]

Examples

Delete a backup.

az postgres flexible-server backup delete -g testgroup -n testsvr --backup-name testbackup

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--backup-name -b

The name of the backup.

Property Value
Parameter group: Resource Id Arguments
--ids

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.

Property Value
Parameter group: Resource Id Arguments
--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.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
--yes -y

Do not prompt for confirmation.

Property Value
Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az postgres flexible-server backup list

Breaking change

The --backup-name/-b argument has been deprecated and will be removed in next breaking change release(2.86.0) scheduled for May 2026. The --name/-n argument will be repurposed to specify the backup name. The --server-name/-s argument will be introduced to specify the server name in next breaking change release(2.86.0) scheduled for May 2026.

List all the backups for a given server.

az postgres flexible-server backup list [--ids]
                                        [--name]
                                        [--resource-group]
                                        [--subscription]

Examples

List all backups for 'testsvr'.

az postgres flexible-server backup list -g testgroup -n testsvr

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--ids

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.

Property Value
Parameter group: Resource Id Arguments
--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.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az postgres flexible-server backup show

Breaking change

The --backup-name/-b argument has been deprecated and will be removed in next breaking change release(2.86.0) scheduled for May 2026. The --name/-n argument will be repurposed to specify the backup name. The --server-name/-s argument will be introduced to specify the server name in next breaking change release(2.86.0) scheduled for May 2026.

Show the details of a specific backup for a given server.

az postgres flexible-server backup show [--backup-name]
                                        [--ids]
                                        [--name]
                                        [--resource-group]
                                        [--subscription]

Examples

Show the details of backup 'testbackup' for 'testsvr'.

az postgres flexible-server backup show -g testgroup -n testsvr --backup-name testbackup

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--backup-name -b

The name of the backup.

Property Value
Parameter group: Resource Id Arguments
--ids

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.

Property Value
Parameter group: Resource Id Arguments
--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.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False