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

Using rsync

On version 11.10.340 or later of GitHub Enterprise:

  1. Enable maintenance mode on your appliance and wait for all of the active processes to complete. It is particularly important to wait for all Git operations to complete because they could cause your repositories to be backed up in an inconsistent state.

  2. Run rsync.

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

Using ghe-export-repositories

On version 11.10.260 or later of GitHub Enterprise:

  1. Enable maintenance mode on your appliance and wait for all of the active processes to complete. It is particularly important to wait for all Git operations to complete because they could cause your repositories to be backed up in an inconsistent state.

  2. Run ghe-export-repositories.

    ssh admin@hostname -- 'ghe-export-repositories' > ghe-repositories-backup.tar
    

Using a separate block device

  1. Enable maintenance mode on your appliance and wait for all of the active processes to complete. It is particularly important to wait for all Git operations to complete because they could cause your repositories to be backed up in an inconsistent state.

  2. Back up or take a snapshot of your block device in accordance with your company's standard procedures for doing so.

Further reading