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:
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.
-
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:
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.
-
ssh admin@hostname -- 'ghe-export-repositories' > ghe-repositories-backup.tar
Using a separate block device
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.
Back up or take a snapshot of your block device in accordance with your company's standard procedures for doing so.