What's the best way to upgrade Gitlab to the latest release and change OS?


As a Linux administrator first and foremost, and knowing little about the Git/Gitlab environment, I need to migrate our Gitlab installation to a new Linux platform, in this case from CentOS to Debian…
The current server hasn’t benefited from regular OS upgrades, and even less from regular upgrades for its Gitlab part…
I’m not sure what’s the best way to proceed!

current Linux version: CentOS Linux release 7.3.1611 (Core)
current Gitlab version: GitLab Community Edition 11.0.1

desired versions after migration
Linux version: Debian 12
Gitlab version: latest available

1st option considered:

  1. yum update on the current linux version.
    yum update returns the following available version: gitlab-ce x86_64 16.11.2-ce.0.el7 gitlab_official

Which would suit me perfectly!

That said, given the obsolescence of the server and the Gitlab version currently in use, the yum command returns a substantial number and size of packages to be updated:

Transaction Summary
=============================================================================Install 12 Packages (+52 Dependent packages)
Upgrade 409 Packages
Remove 1 Package

Total download size: 1.3 G

Having read a lot of documentation about failed Gitlab upgrades, do you think I can jump from Gitlab version 11.0.1 to version 16.11 without problems ?
The Gitlab documentation in any case recommends a gradual upgrade, but not a jump from several versions in a single upgrade!
What’s more, given that the Linux distribution currently in use (CentOS) is obsolete and being discontinued by its vendor, a package upgrade seems rather risky to me… (there are errors during the “yum update” attempt…)

2nd option considered:
full backup (using the tools provided by Gitlab) of the current configuration, according to available documentation, for example:

  1. installation of the new Debian server version 12
  2. installation of the Gitlab version identical to the one installed on the old server (GitLab Community Edition 11.0.1)
  3. restore the Gitlab backup previously performed on the CentOS server
  4. then progressive upgrade from Gitlab 11.x to 16.x

Potential problems:

  1. there will most likely be compatibility problems installing Gitlab version 11 on a Debian 12 server
  2. Will the Gitlab backup performed on CentOS be fully compatible with a Gitlab installation on a Debian server ?

Are the 2 steps proposed above coherent and potentially feasible?

thank you in advance for your patience in reading this far… :slight_smile: and I wish you an excellent day !


There is no package for Gitlab 11 on Debian 12. So you will not be able to do that. The earliest Debian 12 package is Gitlab 16.1.

You will have to upgrade Gitlab on your EL7 box until you can get to the latest possible version - you mention 16.11.2. Once you are at 16.11.2 on EL7, then install Gitlab 16.11.2 on Debian 12. Copy /etc/gitlab/gitlab.rb and /etc/gitlab/gitlab-secrets.json from the EL7 server to the Debian 12 server. Run gitlab-ctl reconfigure to get an empty installation of Gitlab running. Now you can do the backup/restore as the Gitlab documentation.

Hello iwalker,

my current installation is 11.0.1, I didn’t find this release in the upgrade tool, the closest being 11.06

Google search “download gitlab-ce 11 package for centos 7” returns the following pages:


Then I’ll be able to take advantage of the tool: Upgrade Path
and all its documentation.

Many thanks for your help!


You can use the old documentation to find the upgrade path: Upgrading GitLab | GitLab

as you can see here, you are on a version between 10.8.7 and 11.11.8. Therefore from your current version, your next upgrade is 11.11.8. I suggest taking a backup or making a VM snapshot of your server before doing the upgrade just in case problems are encountered.

1 Like

Oh, I hadn’t seen that…

indeed, it will save the number of upgrades needed…
And of course, yes, a good snapshot before each subsequent upgrade…

thanks again!


Just for information, I’ll give you feedback in 3 weeks… in the meantime I’m going on vacation…


Hello, I leave you the update sequence to reach the gitlab-ce-16.11.2-ce.0.el7 version
You can see the list of available versions with the command yum --showduplicates list gitlab-ce

yum upgrade gitlab-ce-8.6.2-ce.0.el7 -y && sleep 300

yum upgrade gitlab-ce-8.7.0-ce.0.el7 -y && sleep 300

yum upgrade gitlab-ce-8.8.0-ce.0.el7 -y && sleep 300

yum upgrade gitlab-ce-8.9.0-ce.0.el7 -y && sleep 300

yum upgrade gitlab-ce-8.10.0-ce.1.el7 -y && sleep 300

yum upgrade gitlab-ce-8.11.0-ce.0.el7 -y && sleep 300

yum upgrade gitlab-ce-8.12.0-ce.0.el7 -y && sleep 300

yum upgrade gitlab-ce-8.17.8-ce.0.el7 -y && sleep 300

yum upgrade gitlab-ce-9.0.0-ce.0.el7 -y && sleep 300

yum upgrade gitlab-ce-9.5.10-ce.0.el7 -y && sleep 300

yum upgrade gitlab-ce-10.0.0-ce.0.el7 -y && sleep 300

yum upgrade gitlab-ce-10.8.7-ce.0.el7 -y && sleep 300

yum upgrade gitlab-ce-11.0.0-ce.0.el7 -y && sleep 300

yum upgrade gitlab-ce-11.11.8-ce.0.el7 -y && sleep 300

yum upgrade gitlab-ce-12.0.0-ce.0.el7 -y && sleep 300

yum upgrade gitlab-ce-12.10.14-ce.0.el7 -y && sleep 300

yum upgrade gitlab-ce-13.0.0-ce.0.el7 -y && sleep 300

yum upgrade gitlab-ce-13.12.15-ce.0.el7 -y && sleep 300

yum upgrade gitlab-ce-14.0.0-ce.0.el7 -y && sleep 300

yum upgrade gitlab-ce-14.0.12 -y && sleep 300

yum upgrade gitlab-ce-14.1.1-ce.0.el7 -y && sleep 300

yum upgrade gitlab-ce-14.1.8-ce.0.el7 -y && sleep 300

yum upgrade gitlab-ce-14.2.1-ce.0.el7 -y && sleep 300

yum upgrade gitlab-ce-14.2.7-ce.0.el7 -y && sleep 300

yum upgrade gitlab-ce-14.3.0-ce.0.el7 -y && sleep 300

yum upgrade gitlab-ce-14.3.6 -y && sleep 300

yum upgrade gitlab-ce-14.9.5 -y && sleep 300

yum upgrade gitlab-ce-14.10.5 -y && sleep 300

yum upgrade gitlab-ce-15.0.5 -y && sleep 300

yum upgrade gitlab-ce-15.4.6 -y && sleep 300

yum upgrade gitlab-ce-15.11.13 -y && sleep 300

yum upgrade gitlab-ce-16.1.6 -y && sleep 300

yum upgrade gitlab-ce-16.3.7 -y && sleep 300

yum upgrade gitlab-ce-16.7.7 -y && sleep 300

yum upgrade gitlab-ce-16.10.0 -y && sleep 300

yum upgrade gitlab-ce-16.11.1-ce.0.el7 -y && sleep 300

yum upgrade gitlab-ce-16.11.2-ce.0.el7 -y

Using sleep is a very bad idea. Some database migrations take a lot longer than this. By using that method you have the potential of breaking your installation before the migrations have finished. In fact, people who have ran the next upgrade before migrations finished broke their install. Then you will be looking at restoring your system from a backup.