Book Image

Gitlab Cookbook

By : Jeroen van Baarsen
Book Image

Gitlab Cookbook

By: Jeroen van Baarsen

Overview of this book

Table of Contents (16 chapters)
GitLab Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Updating GitLab from a source installation


Updating used to be a lot of work; you had to open the update document to find out that you need to perform about 15 steps to upgrade your GitLab installation.

To tackle this issue, the GitLab team has created a semiautomatic upgrader. When you run the upgrader, it will check whether there is a new minor version. If there is, it will start the upgrade process for you. It will perform database migrations and update config files for you.

How to do it…

Upgrade your source installation with the following steps:

  1. Log in to your server using SSH.

  2. We start with creating a backup just in case something goes wrong.

  3. Go to the folder of your GitLab instance:

    $ cd /home/git/gitlab
    
  4. Create the backup; this might take a little while depending on the amount of repositories and the size of each individual repository:

    $ sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production
    
  5. Stop the server:

    $ sudo service gitlab stop
    
  6. Run the upgrader:

    $ if [ -f bin/upgrade...