Linux

Where Does GitLab Store Backups and Config?

GitLab Omnibus backup tarball files and main config paths on Linux for self-managed instance restores.

Last updated

GitLab Omnibus splits config and data cleanly. Settings live in /etc/gitlab/gitlab.rb with URL, mail, and backup paths. Repositories and uploads live under /var/opt/gitlab with Postgres beside them.

Backups are dated tarballs in /var/opt/gitlab/backups from gitlab-backup. Each tarball bundles repos, database, and uploads per settings. Back up gitlab.rb with tarballs. Secrets in gitlab-secrets.json must travel too. Registry images ride along when enabled. Mattermost data needs its own backup alongside.

Where GitLab stores this, by platform

Linux
/etc/gitlab/gitlab.rb

Main Omnibus settings with external URL and backup paths. Reconfigure applies it to services. Keep with secrets file and backup tarballs.

Linux
/var/opt/gitlab/backups

Dated tarballs with repos, database, and uploads. Created by gitlab-backup. Copy off server since local disks fail too.

Frequently asked questions

what do i back up for a GitLab move

Copy /etc/gitlab with backup tarballs in /var/opt/gitlab/backups. The config holds external URL and secrets. Tarballs bundle repos and database. Both restore the instance.

where do GitLab backup tarballs save

Run gitlab-backup create to write a dated tarball in /var/opt/gitlab/backups. Uploads and artifacts ride along by settings. Copy tarballs off the server for safety.

Notice an outdated path? Let us know.