Skip to main content

Esta versão do GitHub Enterprise foi descontinuada em 2022-10-12. Nenhum lançamento de patch será feito, mesmo para questões críticas de segurança. Para obter melhor desempenho, segurança aprimorada e novos recursos, atualize para a última versão do GitHub Enterprise. Para obter ajuda com a atualização, entre em contato com o suporte do GitHub Enterprise.

Enabling and scheduling maintenance mode

Some standard maintenance procedures, such as upgrading your GitHub Enterprise Server instance or restoring backups, require the instance to be taken offline for normal use.

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.

End user banner about scheduled maintenance

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.

The maintenance mode splash screen

Enabling maintenance mode immediately or scheduling a maintenance window for a later time

  1. Em uma conta administrativa no GitHub Enterprise Server, no canto superior direito de qualquer página, clique em .

    Captura de tela do ícone de foguete para acesso � s configurações de administração do site

  2. Se você ainda não estiver na página "Administração do site", no canto superior esquerdo, clique em Administração do site.

    Captura de tela do link "Administração do site"

  3. Na barra lateral �  esquerda, clique em Console de Gerenciamento . Guia Console de Gerenciamento na barra lateral esquerda

  4. At the top of the Console de Gerenciamento, click Maintenance. Maintenance tab

  5. 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. Drop-down menu with the option to enable maintenance mode now selected
    • To schedule a maintenance window for a future time, use the drop-down menu and click a start time. Drop-down menu with the option to schedule a maintenance window in two hours selected
  6. Select Enable maintenance mode. Checkbox for enabling or scheduling maintenance mode

  7. Na barra lateral esquerda, clique em Salvar configurações.

    Captura de tela do botão Salvar configurações no Console de Gerenciamento

    Observação: se você salvar as configurações no Console de Gerenciamento, isso reiniciará os serviços do sistema, o que poderá resultar em tempo de inatividade visível pelo usuário.

  8. Aguarde a conclusão da execução de suas configurações.

    Configurar a instância

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