We recommend that you install the GitHub Enterprise Backup Utilities on a dedicated server to back up and restore your appliance, but you can still use the existing command-line utilities if you prefer.
For more information, see "Restoring GitHub Enterprise."
Tip: We recommend that you restore Enterprise data on a fresh installation.
Add an SSH key for shell access to your installation.
-
Run ghe-import-pages to restore generated GitHub Pages sites.
ssh admin@hostname -- 'ghe-import-pages' < ghe-pages-backup.tar
-
Run ghe-import-mysql to restore MySQL data. This includes users, commit comments, pull requests, and issues.
gzip -dc ghe-mysql-backup.sql.gz | ssh admin@hostname -- 'ghe-import-mysql'
-
Run ghe-import-redis to restore Redis data. This includes a variety of cached data counts and other settings required by the application.
ssh admin@hostname -- 'ghe-import-redis' < ghe-redis-backup.rdb
-
Run ghe-import-authorized-keys to restore installed SSH authorized keys for the admin SSH user so that you can continue to SSH into the new appliance with the same keys.
ssh admin@hostname -- 'ghe-import-authorized-keys' < ghe-authorized-keys-backup.json
-
Run ghe-import-ssh-host-keys to restore the SSH host keys so that you can prevent SSH fingerprint mismatch warnings.
ssh admin@hostname -- 'ghe-import-ssh-host-keys' < ghe-ssh-host-keys-backup.tar
-
Optionally run ghe-import-es-indices to restore ElasticSearch indexes for repositories, code, users, and audit log data.
ssh admin@hostname -- 'ghe-import-es-indices' < ghe-es-indices-backup.tar
-
Start a configuration process to run database migrations. Use the MD5 hash of your license file as an authentication token.
curl -i -X POST 'http(s)://hostname/setup/api/configure?license_md5=md5-checksum-of-license&complete=true'
-
Open the following URL in your browser and wait for the configuration process to complete.
http(s)://hostname/setup/complete