az postgres server replica
Manage read replicas.
Commands
Name | Description | Type | Status |
---|---|---|---|
az postgres server replica create |
Create a read replica for a server. |
Core | GA |
az postgres server replica list |
List all read replicas for a given server. |
Core | GA |
az postgres server replica stop |
Stop replication to a read replica and make it a read/write server. |
Core | GA |
az postgres server replica create
Create a read replica for a server.
az postgres server replica create --name
--resource-group
--source-server
[--location]
[--no-wait]
[--sku-name]
Examples
Create a read replica 'testreplsvr' for 'testsvr'.
az postgres server replica create -n testreplsvr -g testgroup -s testsvr
Create a read replica 'testreplsvr' for 'testsvr2', where 'testreplsvr' is in a different resource group.
az postgres server replica create -n testreplsvr -g testgroup \
-s "/subscriptions/${SubID}/resourceGroups/${ResourceGroup}/providers/Microsoft.DBforPostgreSQL/servers/testsvr2"
Required Parameters
Name of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
The name or resource ID of the master server to the create replica for.
Optional Parameters
Location. Values from: az account list-locations
. If not provided, the create replica will be in the same location as the master server.
Do not wait for the long-running operation to finish.
The name of the sku. Follows the convention {pricing tier}{compute generation}{vCores} in shorthand. Examples: B_Gen5_1, GP_Gen5_4, MO_Gen5_16.
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 postgres server replica list
List all read replicas for a given server.
az postgres server replica list [--ids]
[--resource-group]
[--server-name]
[--subscription]
Examples
List all read replicas for master server 'testsvr'.
az postgres server replica list -g testgroup -s testsvr
Optional Parameters
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.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name of the master server.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
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 postgres server replica stop
Stop replication to a read replica and make it a read/write server.
az postgres server replica stop [--ids]
[--name]
[--resource-group]
[--subscription]
[--yes]
Examples
Stop replication to 'testreplsvr' and make it a read/write server.
az postgres server replica stop -g testgroup -n testreplsvr
Optional Parameters
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.
Name of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
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.