This version of GitHub Enterprise will be discontinued on This version of GitHub Enterprise was discontinued on 2020-05-23. No patch releases will be made, even for critical security issues. For better performance, improved security, and new features, upgrade to the latest version of GitHub Enterprise. For help with the upgrade, contact GitHub Enterprise support.

Article version: Enterprise Server 2.17

Initiating a failover to your replica appliance

You can failover to a GitHub Enterprise Server replica appliance using the command line for maintenance and testing, or if the primary appliance fails.

The time required to failover depends on how long it takes to manually promote the replica and redirect traffic. The average time ranges between 2-10 minutes.

Promoting a replica does not automatically set up replication for existing appliances. After promoting a replica, if desired, you can set up replication from the new primary to existing appliances and the previous primary.

  1. To allow replication to finish before you switch appliances, put the primary appliance into maintenance mode:
  2. When the number of active Git operations reaches zero, wait 30 seconds.
  3. To verify all replication channels report OK, use the ghe-repl-status -vv command.
    $ ghe-repl-status -vv
  4. To stop replication and promote the replica appliance to primary status, use the ghe-repl-promote command. This will also automatically put the primary node in maintenance node if it’s reachable.
    $ ghe-repl-promote
  5. Update the DNS record to point to the IP address of the replica. Traffic is directed to the replica after the TTL period elapses. If you are using a load balancer, ensure it is configured to send traffic to the replica.
  6. Notify users that they can resume normal operations.
  7. If desired, set up replication from the new primary to existing appliances and the previous primary. For more information, see "About high availability configuration."

Further reading

Ask a human

Can't find what you're looking for?

Contact us