Logo

Command Palette

Search for a command to run...

databases promote-replica

Promotes the specified replica database server to a standalone master. The replica will be reconfigured as the new standalone DB. Providing the database type is optional and is only necessary for shared servers where we can't automatically determine the target database type.

The existing master and other replicas will need to be removed after this process as after this the new configuration will have only a single database. You will be able to configure replication again by scaling up new servers.

In the case of any servers not being accessible during this time, those servers will remain unchanged. It is therefore important to stop/shut down those servers in this case (or to manually stop the DB service on those servers) as having multiple masters in a cluster could cause problems throughout the cluster.

$ cx databases promote-replica --stack <stack name> [--dbtype <database type>] <replica server name>

Options

ArgumentRequired?DefaultDescription
--stack, -s <stack name>yesName of your application
--dbtype <database type>noThe database type (mysql,postgresql,redis)
<replica server name>yesName of replica server to promote to master

Examples

$ cx databases promote-replica -s My_Awesome_App my_redis_replication_replica
$ cx databases promote-replica --stack My_Awesome_App --dbtype=mysql my_replica_server_name