CmdID

CmdID / az / az postgres / az postgres flexible-server / az postgres flexible-server replica

az postgres flexible-server replica promote

Stop replication of a read replica and promote it to an independent server or as a primary server. Azure CLI reference

3 examples Its page in the Azure CLI reference

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from the Azure CLI, each command read by CmdID

Stop replication to 'testreplica' and promote it a standalone read/write server.

az postgres flexible-server replica promote -g testgroup -n testreplicaIdentify
-gName of resource group.

Stop replication to 'testreplica' and promote it a standalone read/write server with forced data sync.

az postgres flexible-server replica promote -g testgroup -n testreplica --promote-mode standalone --promote-option forcedIdentify
-gName of resource group.

Stop replication to 'testreplica' and promote it to primary server with planned data sync. The replica you are promoting must have the reader virtual endpoint assigned, or you will receive an error on promotion.

az postgres flexible-server replica promote -g testgroup -n testreplica --promote-mode switchover --promote-option plannedIdentify
-gName of resource group.