About maintenance mode
Some types of operations require that you take your GitHub Enterprise Server instance offline and put it into maintenance mode:
- Upgrading to a new version of GitHub Enterprise Server
- 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 Server Backup Utilities snapshot
- Troubleshooting certain types of critical application issues
We recommend that you schedule a maintenance window for at least 30 minutes in the future 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. Git fetch, clone, and push operations are also rejected with an error message indicating that the site is temporarily unavailable. In high availability configurations, Git replication will be paused. GitHub Actions jobs will not be executed. Visiting the site in a browser results in a maintenance page.
Enabling maintenance mode immediately or scheduling a maintenance window for a later time
-
GitHub Enterprise Server の管理アカウントから、任意のページの右上隅の をクリックします。
-
[サイト管理者] ページにま� 表示されていない� �合は、左上隅の [サイト管理者] をクリックします。
-
左側のサイドバーで、 [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.
-
左側のサイドバーで、 [設定の保存] をクリックします。
注: [Management Console] に設定を保存すると、システ� サービスが再起動され、ユーザーに表示されるダウンタイ� が発生する可能性があります。
-
設定の実行が完了するのを待ってく� さい。
Scheduling maintenance mode with the GitHub Enterprise Server APIs
You can schedule maintenance for different times or dates with the GitHub Enterprise Server APIs. For more information, see "Management Console."
Enabling or disabling maintenance mode for all nodes in a cluster
With the 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