You can always restore your Git repository data using rsync or the ghe-import-repositories command-line utility. If your repository data is stored on a separate block device, you can also use that block device.

Using rsync

On version 11.10.340 or later of GitHub Enterprise:

rsync --progress -a --delete --rsync-path="sudo -u git rsync" backups/repositories admin@hostname:/data/

Using ghe-import-repositories

Run ghe-import-repositories:

ssh admin@hostname -- 'ghe-import-repositories' < ghe-repositories-backup.tar

Using a separate block device

  1. Attach the block device with your repository data to the hardware on which you have provisioned GitHub Enterprise.

  2. Boot the appliance.

  3. Access the Management Console.

  4. At the top of the page, click the Settings tab. Settings tab

  5. On the left side of the page, click Repository storage. Repository storage tab

  6. Verify that the Block device option appears with the label "recommended." If the option appears with the label "no device detected," you will need to add the new block device (see our instructions for VMware or VirtualBox). Select block device

  7. Select the Block device option and choose your block device from the dropdown menu that appears. Block device list

  8. At the bottom of the page, click Save settings. Save settings

  9. Wait for the configuration run to complete. Saving configuration

Further reading