Upgrade Gitlab 11.11. * to the latest

Hello all,

Has anyone upgraded git lab recently from 11.11.* to the latest version on ubuntu ? Looking for suggestions.

I would like to upgrade and it seems we have to upgrade according to the below paths

Please suggest



11.11.8 -> 12.0.12 -> 12.1.17 -> 12.10.14 -> 13.0.14 -> 13.1.11 -> latest 13.12.Z -> latest 14.0.Z

you don’t need to go to 13.2.10 as in your post, you just need to go from 13.1.11 to the last 13.12.x release - I think 13.12.15 currently and then to 14.0.x.

You will need to reference the upgrade documentation and after each upgrade, make sure you check that background migrations have finished before starting the next upgrade. All background migrations must finish, and the command must return a 0.

No you have to jump through every version in the upgrade path. Otherwise you will most likely break your install when certain migrations are missed.

So your first upgrade is 11.11.8, then 12.0.12, and so on as per my previous post. Make sure you refer to the upgrade docs and make sure after each upgrade that you check that background migrations have finished before starting the next upgrade. Everything is in the docs. If you follow it, you cannot go wrong.

And make sure you have a backup of your server to restore if something does go wrong. Reading the docs and instructions is important to minimise the amount of problems later.

Got it.So earlier i was also using apt-get install gitlab-ce=version.

Now I have to use apt upgrade gitlab-ce=12.0.12-ce.0 and so i have to do in 5 steps to achieve 13.12

If to 14,x then 8 steps as per the upgrade path. To 13.12.x then 7 steps. From 12.0.12 then yes 5.

how can we check background migrations are success from gitlab-rails console ?

Info here in Gitlab upgrade docs, I selected the section exactly to make it easier to find: Upgrading GitLab | GitLab

yes if i want to test now if background migrations are ok for the current version is it possible ? I tried but get an error

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

Yes of course, it can be run anytime. I ran mine now, works fine, reports zero. I don’t get any errors. If you are getting errors, it would really help to post the error message, since the above post doesn’t have anything to help diagnose the problem running that command.

If running that command as a normal user, try running sudo gitlab-rails instead.

I ran as sudo user

sudo gitlab-rails runner -e production ‘puts Gitlab::BackgroundMigration.remaining’
Traceback (most recent call last):
SyntaxError ((irb):1: syntax error, unexpected tIDENTIFIER, expecting keyword_do or ‘{’ or ‘(’)
sudo gitlab-rails runner -e production 'puts Gitlab::…
(irb):1: syntax error, unexpected tIDENTIFIER, expecting keyword_do or ‘{’ or ‘(’
…tlab-rails runner -e production 'puts Gitlab::BackgroundMigr…
… ^~~~~~~~~~

Maybe try:

sudo su

to get to root user, and then do:

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

and see if it still happens as root. I normally run on my system without sudo, but as root user.

If the CE or EE makes any difference ?

Nope, I use CE works fine. There’s obviously something wrong with your install somewhere, but I have no idea what.