Upgrading Gitlab

Gitlab follows semantiv versioning. It even does not allow you to upgrade from a non-latest minor version to a new major version. Meaning: 10.1 -> 11.4 is now allowed if there is a 10.8 version.

Thus you need to upgrade in steps: 10.1 -> 10.8 -> 11.4 (for example).

Procedure:

# Create a backup (Don't rely ONLY on the default backup done during setup)
# The default backup during setup will only backup the database
# Make sure to do a full backup with everything in it!
$ sudo gitlab-rake gitlab:backup:create STRATEGY=copy

# Start upgrade
$ sudo apt-get upgrade
Vorbereitung zum Entpacken von .../gitlab-ce_....deb ...
gitlab preinstall: It seems you are upgrading from x-n.x version series
gitlab preinstall: to x.x series. It is recommended to upgrade
gitlab preinstall: to the last minor version in a major version series first before
gitlab preinstall: jumping to the next major version.
gitlab preinstall: Please follow the upgrade documentation at https://docs.gitlab.com/ee/policy/maintenance.html#upgrade-recommendations
gitlab preinstall: and upgrade to x.x first.

# Check the full version string of the latest x.x release
$ apt-cache madison gitlab-ce
[...]
 gitlab-ce | 10.8.6-ce.0 | https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ trusty/main amd64 Packages
 gitlab-ce | 10.8.5-ce.0 | https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ trusty/main amd64 Packages
 gitlab-ce | 10.8.4-ce.0 | https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ trusty/main amd64 Packages
 gitlab-ce | 10.8.3-ce.0 | https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ trusty/main amd64 Packages
 gitlab-ce | 10.8.2-ce.0 | https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ trusty/main amd64 Packages
 gitlab-ce | 10.8.1-ce.0 | https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ trusty/main amd64 Packages
 gitlab-ce | 10.8.0-ce.0 | https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ trusty/main amd64 Packages
 gitlab-ce | 10.7.7-ce.0 | https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ trusty/main amd64 Packages
 gitlab-ce | 10.7.6-ce.0 | https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ trusty/main amd64 Packages
 gitlab-ce | 10.7.5-ce.0 | https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ trusty/main amd64 Packages
 gitlab-ce | 10.7.4-ce.0 | https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ trusty/main amd64 Packages
 gitlab-ce | 10.7.3-ce.0 | https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ trusty/main amd64 Packages
 gitlab-ce | 10.7.2-ce.0 | https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ trusty/main amd64 Packages
 gitlab-ce | 10.7.1-ce.0 | https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ trusty/main amd64 Packages
 gitlab-ce | 10.7.0-ce.0 | https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ trusty/main amd64 Packages
 gitlab-ce | 10.6.6-ce.0 | https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ trusty/main amd64 Packages
 gitlab-ce | 10.6.5-ce.0 | https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ trusty/main amd64 Packages
 gitlab-ce | 10.6.4-ce.0 | https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ trusty/main amd64 Packages
 gitlab-ce | 10.6.3-ce.0 | https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ trusty/main amd64 Packages
[...]

# Install the relevant upgrade step
$ sudo apt-get install gitlab-ce=xx.xx.xx-ce.0

# Install the new major version
# Use the above method to do more steps if necessary
# If you're at the lastest minor version before the most current major version, simply run
$ sudo apt-get install gitlab-ce