Migrating from Omnibus-GitLab package based installation
Prerequisites
-
Deployment using omnibus-gitlab package needs to be running. Run
gitlab-ctl status
and confirm no services report adown
state. -
/etc/gitlab/gitlab-secrets.json
file from package based installation. -
A Helm charts based deployment running the same GitLab version as the omnibus-gitlab package based installation.
-
Object storage service which the Helm chart based deployment is configured to use. For production use, we recommend you use an external object storage and have the login credentials to access it ready. If you are using the built-in Minio service, read the docs on how to grab the login credentials from it.
Migration Steps
- Migrate existing files (uploads, artifacts, lfs objects) from package based
installation to object storage.
-
Modify
/etc/gitlab/gitlab.rb
file and configure object storage for uploads, artifacts and LFS.Note:
This must be the same object storage service that the Helm charts based deployment is connected to. -
Run reconfigure to apply the changes
$ sudo gitlab-ctl reconfigure
-
Migrate existing artifacts to object storage
$ sudo gitlab-rake gitlab:artifacts:migrate $ sudo gitlab-rake gitlab:traces:migrate
-
Migrate existing LFS objects to object storage
$ sudo gitlab-rake gitlab:lfs:migrate
-
Migrate existing uploads to object storage
$ sudo gitlab-rake gitlab:uploads:migrate:all
Docs: https://docs.gitlab.com/ee/administration/raketasks/uploads/migrate.html#migrate-to-object-storage -
Visit the omnibus-gitlab package based GitLab instance and make sure the uploads are available. For example check if user, group and project avatars are rendered fine, image and other files added to issues load correctly, etc.
- Delete or move the uploaded files from their current location so that
they won’t end up in the tarball. The default locations are
- uploads:
/var/opt/gitlab/gitlab-rails/uploads/
- lfs:
/var/opt/gitlab/gitlab-rails/shared/lfs-objects
- artifacts:
/var/opt/gitlab/gitlab-rails/shared/artifacts
$ sudo mv /var/opt/gitlab/gitlab-rails/uploads{,.bak} $ sudo mv /var/opt/gitlab/gitlab-rails/shared/lfs-objects{,.bak} $ sudo mv /var/opt/gitlab/gitlab-rails/shared/artifacts{,.bak}
- uploads:
- Run reconfigure to recreate empty directories in place, so backup task
won’t fail.
$ sudo gitlab-ctl reconfigure
-
-
Create backup tarball
$ sudo gitlab-rake gitlab:backup:create
The backup file will be stored in/var/opt/gitlab/backups
directory, unless explicitly changed ingitlab.rb
. -
Follow official documentation on how to restore the secrets from package based installation.
-
Restart all pods to make sure changes are applied
kubectl delete pods -lrelease=<helm release name>
- Visit the Helm based deployment and confirm projects, groups, users, issues etc. that existed in omnibus-gitlab package based installation are restored. Also verify if the uploaded files (avatars, files uploaded to issues, etc.) are loaded fine.
Help and feedback
If there's something you don't like about this feature
To propose functionality that GitLab does not yet offer
To further help GitLab in shaping new features
If you didn't find what you were looking for
If you want help with something very specific to your use case, and can use some community support
POST ON GITLAB FORUM
If you have problems setting up or using this feature (depending on your GitLab subscription)
REQUEST SUPPORT
To view all GitLab tiers and features or to upgrade
If you want to try all features available in GitLab.com
If you want to try all features available in GitLab self-managed
If you spot an error or a need for improvement and would like to fix it yourself in a merge request
EDIT THIS PAGE
If you would like to suggest an improvement to this doc