How to upgrade 13.7.4 to 13.12.10

Hi there,

I recently got the task to upgrade the Gitlab server from 13.7.4 to 13.12.10. Sadly I am not sure which upgrade path I have to use/ follow. I even don´t really understand how the upgrade has to be done. Is it possible, that somebody could write down the steps I have to make to upgrade the running instance to the 13.12.10 version? I did not install the server in former times. I´ve read something about “Omnibus version”, how do I find out, whether I am using this version?

The server is a Ubuntu 18.04.5 LTS with KDE desktop.
Gitlab version 13.7.4 Community Edition

Greetings,
Nils

The above link will help.

As for what you have you can check with:

dpkg -l | grep gitlab

If it comes back with a result it means you have an omnibus version installed. Could be ce or ee

Hi iwalker,

it says "gitlab-ce 13.7.4-ce.0, amd64, Gitlab Community Edition (including NGINX, Postgres, Redis).

So my upgrade path would be 13.7.4 to 13.8.8 and then 13.12.10?

Should I upgrade it with using “official repositories” or should i use a “manually-dwnloaded” package?

Update GitLab installed with the Omnibus GitLab package | GitLab

Greetings,
Nils

As per the upgrade path in my link, you are on a version between 13.1.x and 13.12.10. So you would upgrade from 13.7.4 to 13.12.10. If you wanted to go further, than you need to go to latest 14.0.x, then latest 14.1.x and then latest 14.2.x. It just depends how far you want to upgrade.

You can do it if you installed using the repos quite easily. For example:

apt install gitlab-ce=13.12.10-ce.0

that will go to a particular version, and then you repeat for any other upgrade versions after this. Once you get to latest 14.1.x you can then do a normal apt upgrade to get to the latest.

Hi Ian,

okay. Then I understood it wrong. I thought I have to go onto the 13.8.8 first.

So I make sure, that no user is working actively with Gitlab, then I just put the apt install gitlab-ce=13.12.10-ce.0 and it will automatically understand, that it is an “upgrade”?

Which other steps do I have to follow. Is it possible, that you might write down step by step what I have to do? I don´t want to do anything wrong.

Thanks,
Nils

Literally, all you need to do is:

apt install gitlab-ce=13.12.10-ce.0

providing you have an /etc/apt/sources.list.d/gitlab_gitlab-ce.list file then this means the repo is configured and the above command will work. Once that upgrade has finished, then do this:

gitlab-rails runner -e production 'puts Gitlab::BackgroundMigration.remaining'

you can do that as root user, or if you are doing as a normal user, add sudo at the beginning, so:

sudo gitlab-rails runner -e production 'puts Gitlab::BackgroundMigration.remaining'

when that reports zero, that means all background migrations have finished. At this point you can decide if you want to upgrade to the latest 14.0.x version or not, or stay at 13.12.10.

Do not stop gitlab services before upgrade, it will stop them itself, since it will need postgres running for background migrations to complete.

The apt install command will download that version of gitlab, install it and do everything in relation to the upgrade such as db migrations etc. When it finishes it will start all the services again. Then you wait a couple of mins, and it will be accessible via your browser like normal.

1 Like

Hi Ian,

I checked it. The sources.list.d is available and I got 2 entries in it (deb and deb-src): https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu bionic main

Means the steps should work yes? So if I run the commands you provided, it will keep all my configuration and data on the Gitlab server, and automatically upgrades to 13.12.10?

Greetings,
Nils

Yep, it will upgrade your install keeping it’s config/data.

Hi Ian,

do the developers have to check in their data, or can I just proceed the update without having them to check in their projects?

Greetings,
Nils

Doesn’t matter. They can check in before or after the upgrade. Just make sure if they do check in, to have a backup and then do the upgrade.

Hi Ian,

just wanted to respond, that the upgrade worked without any errors. Thank you very much.

Greetings,
Nils

1 Like

Hi Nils,

Great glad to hear it :slight_smile: have a great day!