Gitlab upgrade notes

Updated for Omnibus 7.6.2 package - 20150128

Note that for an omnibus installation, Gitlab files are under /var/opt/gitlab and /opt/gitlab/embedded/service.

Before any action, stop services that may change database:

gitlab-ctl stop unicorn
gitlab-ctl stop sidekiq
gitlab-ctl stop nginx

Create a backup (will result in a tar ball under /var/opt/gitlab/backups/):

gitlab-rake gitlab:backup:create
cp /etc/gitlab/gitlab.rb /etc/gitlab/gitlab.rb.bak

Install new version, which automatically remove the previous version:

dpkg -i ${NEW_VERSION}.deb

Remove previous configs in case you have some customized settings.

gitlab-rake gitlab:backup:restore
# BACKUP=timestamp_of_backup is optional

Restore configs:

mv /etc/gitlab/gitlab.rb.bak /etc/gitlab/gitlab.rb

Start the upgrade process (including database migrations):

gitlab-ctl reconfigure

(Maybe) If reconfiguration throws some exception about postgresql:

gitlab-ctl start postgresql

(Maybe) Restore hacked files, e.g., logo_white.png, favicon.ico, etc.

cp /path/to/customized/logo-white.png /opt/gitlab/embedded/service/gitlab-rails/public/assets/logo-white-xxxxxxx.png
gitlab-rake cache:clear RAILS_ENV=production

Restart Gitlab instance and check if it works:

gitlab-ctl restart


Hacker / Tenniser / Photographer / Diver / Entrepreneur

Kaohsiung, Taiwan

看文章如果不回應, 跟條鹹魚有什麼分別?