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)
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
Copy backup.config-example to a new file named backup.config.
cp backup.config-example backup.config
Open backup.config in your text editor of choice.
GHE_HOSTNAMEequal to the GitHub Enterprise hostname to back up.
GHE_DATA_DIRequal to the backup directory ("data" by default).
Close backup.config in your text editor.
Add your backup server's public SSH key to your GitHub Enterprise appliance.
bin/ghe-host-checkon your backup server to confirm that it can connect to your GitHub Enterprise appliance.
bin/ghe-backupto 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.
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.