You can use the former primary appliance as the new replica appliance if the failover was planned or was not related to the health of the appliance. If the failover was related to an issue with the primary appliance, you may prefer to create a new replica appliance. For more information, see "Creating a high availability replica."
Warning: You must enable maintenance mode before configuring a former primary appliance as a new replica. If you do not enable maintenance mode, you will cause a production outage.
Connect to the former primary appliance's IP address using SSH.
ssh -p 122 admin@ FORMER_PRIMARY_IP
Enable maintenance mode on the former primary appliance. For more information, see "Enabling and scheduling maintenance mode."
On the former primary appliance, run
ghe-repl-setupwith the IP address of the former replica.
To add the public key to the list of authorized keys on the primary appliance, browse to
https://PRIMARY-HOSTNAME/setup/settingsand add the key you copied from the replica to the list.
To verify the connection to the new primary and enable replica mode for the new replica, run
To start replication of the datastores, use the
ghe-repl-startcauses a brief outage on the primary server, during which users may see internal server errors. To provide a friendlier message, run
ghe-maintenance -son the primary node before running
ghe-repl-starton the replica node to put the appliance in maintenance mode. Once replication starts, disable maintenance mode with
ghe-maintenance -u. Git replication will not progress while the primary node is in maintenance mode.