Roll back to earlier GitLab versions
DETAILS: Tier: Free, Premium, Ultimate Offering: GitLab Self-Managed
You can roll back to earlier versions of GitLab instances that were installed by using the Linux package.
Prerequisites
Because you must revert the database schema changes (migrations) that were made when the instance was upgraded, you must have:
- At least a database backup created under the exact same version and edition you are rolling back to.
- Ideally, a full backup archive of that exact same version and edition you are rolling back to.
When rolling back to an earlier major versions, you must take into account version-specific changes that occurred when you previously upgraded. For more information, see:
Roll back a Linux package instance to an earlier GitLab version
To roll back to an earlier GitLab version:
-
Stop GitLab and remove the current package:
# If running Puma sudo gitlab-ctl stop puma # Stop sidekiq sudo gitlab-ctl stop sidekiq # If on Ubuntu: remove the current package sudo dpkg -r gitlab-ee # If on Centos: remove the current package sudo yum remove gitlab-ee
-
Identify the GitLab version you want to roll back to:
# (Replace with gitlab-ce if you have GitLab FOSS installed) # Ubuntu sudo apt-cache madison gitlab-ee # CentOS: sudo yum --showduplicates list gitlab-ee
-
Roll back GitLab to the desired version (for example, to GitLab 15.0.5):
# (Replace with gitlab-ce if you have GitLab FOSS installed) # Ubuntu sudo apt install gitlab-ee=15.0.5-ee.0 # CentOS: sudo yum install gitlab-ee-15.0.5-ee.0.el8
-
Reconfigure GitLab:
sudo gitlab-ctl reconfigure
-
Restore GitLab to complete the roll back.