Backing up GitLab
Backing up GitLab
Use Case: Backing up an Omnibus (single node) GitLab server.
Benefit: A simple rake task takes care of the whole backup process for you. There is a different routine depending on whether you deployed with Omnibus or the Helm chart.
Get Started:
- Read about backing up Omnibus or Helm variations
- The whole instance will be backed up, but will not backup the configuration files. Ensure those are backed up separately.
- Keep your configuration files and backup archives in a separate location to ensure the encryption keys are not kept with the encrypted data.
Restoring a backup
Use Case: Know how to quickly restore a GitLab backup, and ensure your backup archives have been verified.
Benefits: Restoring a GitLab server is easy and reliable. Have confidence in your archives and the process.
Get Started:
- You can only restore a backup to **exactly the same version and type **(Community Edition/Enterprise Edition) of GitLab on which it was created.
- Omnibus backup & restore documentation is located at https://docs.gitlab.com/omnibus/settings/backups.
- Helm Chart backup & restore documentation is located at https://docs.gitlab.com/charts/backup-restore.
Your backups checklist
-
Decide on a backup strategy. -
Consider writing a cron job to make daily backups. -
Separately backup the configuration files. -
Decide what should be left out of the backup. -
Decide where the backups will be uploaded to. -
Limit backup lifetime. -
Run a test backup & restore. -
Setup a way to periodically verify the backups.