Some standard maintenance procedures, such as upgrading your GitHub Enterprise instance or restoring backups, require that the GitHub Enterprise instance be taken offline for normal use.
In this guide:
- About maintenance mode
- Enabling maintenance mode immediately or scheduling a maintenance window for a later time
- Scheduling maintenance mode with the GitHub Enterprise API
- Enabling or disabling maintenance mode for all nodes in a cluster
About maintenance mode
Some types of operations require that you take your GitHub Enterprise instance offline and put it into maintenance mode:
- Upgrading to a new version of GitHub Enterprise
- Increasing CPU, memory, or storage resources allocated to the virtual machine
- Migrating data from one virtual machine to another
- Restoring data from a GitHub Enterprise Backup Utilities snapshot
- Troubleshooting certain types of critical application issues
While you can choose to put an instance into maintenance mode immediately, we recommend you schedule a maintenance window for 30 minutes, one, or two hours in the future in order to give users time to prepare.
When a maintenance window is scheduled, all users will see a banner when accessing the site.
When the instance is in maintenance mode, all normal HTTP and Git access is refused. Visiting the site in a browser results in a maintenance page.
Git fetch, clone, and push operations are also rejected with an error message indicating that the site is temporarily unavailable.
Enabling maintenance mode immediately or scheduling a maintenance window for a later time
In the upper-right corner of any page, click .
In the left sidebar, click Management Console.
At the top of the Management Console, click Maintenance.
- Under "Enable and schedule", decide whether to enable maintenance mode immediately or to schedule a maintenance window for a future time.
- To enable maintenance mode immediately, use the drop-down menu and click now.
- To schedule a maintenance window for a future time, use the drop-down menu and click a start time.
- Select Enable maintenance mode.
Scheduling maintenance mode with the GitHub Enterprise API
You can schedule maintenance for different times or dates with the GitHub Enterprise API. For more information, see "Management Console" in the GitHub Developer documentation.
Enabling or disabling maintenance mode for all nodes in a cluster
ghe-cluster-maintenance utility, you can set or unset maintenance mode for every node in a cluster.
ghe-cluster-maintenance -h # Shows options ghe-cluster-maintenance -q # Queries the current mode ghe-cluster-maintenance -s # Sets maintenance mode ghe-cluster-maintenance -u # Unsets maintenance mode