We recommend that you back up your appliance by installing and running the GitHub Enterprise Backup Utilities on a dedicated server.

You can still manually run backup scripts if you prefer, but this is no longer recommended.


Your backup server must

  • run Linux or another modern Unix operating system
  • be able to connect to your GitHub appliance over SSH (port 22)
  • have rsync version 2.6.4 or newer installed (for incremental backup support in GitHub Enterprise versions 11.10.341 and greater)
  • have sufficient storage (we recommend at least five times the amount of storage allocated to the primary GitHub appliance)

Initial backup

  1. On your backup server, clone the GitHub Enterprise Backup Utilities repository into the directory where you would like to install it.

    git clone -b stable https://github.com/github/backup-utils.git
  2. Copy backup.config-example to a new file named backup.config.

    cp backup.config-example backup.config
  3. Open backup.config in your text editor of choice.

  4. Set GHE_HOSTNAME equal to the GitHub Enterprise hostname to back up.

  5. Optionally set GHE_DATA_DIR equal to the backup directory ("data" by default).

  6. Close backup.config in your text editor.

  7. Add your backup server's public SSH key to your GitHub Enterprise appliance.

  8. Run bin/ghe-host-check on your backup server to confirm that it can connect to your GitHub Enterprise appliance.

  9. Run bin/ghe-backup to generate your initial backup.

Note that GitHub Enterprise versions prior to 11.10.341 do not support online backups. The ghe-backup command will enable maintenance mode for the duration of the backup run when a pre 11.10.341 appliance version is detected.

Scheduled backups

Use cron or a similar service on the backup host to schedule regular runs of ghe-backup. We generally recommend that you schedule hourly backups for GitHub Enterprise versions 11.10.341 or greater and nightly backups for versions prior to 11.10.341, but this may not be feasible for larger installations (with close to or more than 1,000 license seats). When in doubt, please contact our Enterprise support team for advice.

For more information and sample configurations, see "Scheduling backups" in the GitHub Enterprise Backup Utilities' README.

Further reading