Upgrading an existing Linux v3.X.Y installation to v3.1.1.3


This guide assumes you have at least a basic level of familiarity with Linux and the command line.

This guide will walk you through upgrading your existing v3.X.Y installation to v3.1.1.3. If you currently have a 0.3.x version of QATrack+, you first need to follow the instructions to upgrade to 3.1, before carrying out these instructions.

Take a snapshot

If your QATrack+ server exists on a virtual machine, now would be a great time to take a snapshot of your VM in case you need to restore it later! Consult with your IT department on how to do this.

Backup your database

It is important you back up your database before attempting to upgrade. Generate a backup file for your database

# postgres
sudo -u postgres pg_dump -d qatrackplus > backup-3.1.0-$(date -I).sql

# or for MySQL
mysqldump --user qatrack --password=qatrackpass qatrackplus > backup-3.1.0-$(date -I).sql

Make sure your existing packages are up to date

sudo apt update
sudo apt upgrade

Check out version

We can now grab the latest version of QATrack+. To checkout the code enter the following commands:

cd ~/web/qatrackplus
git fetch origin
git checkout v3.1.1.3

Updating our Python environment

Activate your virtual environment:

source ~/venvs/qatrack31/bin/activate

Your command prompt should now be prefixed with (qatrack31).

It’s also a good idea to upgrade pip the Python package installer:

pip install --upgrade pip

We will now install all the libraries required for QATrack+ with PostgresSQL (be patient, this can take a few minutes!):

cd ~/web/qatrackplus
pip install -r requirements/postgres.txt

or for MySQL:

cd ~/web/qatrackplus
pip install -r requirements/mysql.txt

Performing the migration

We can now migrate the tables in our database:

python manage.py migrate

and then we need to collect all our static media files:

python manage.py collectstatic

Restart QATrack+

Finally we need to restart QATrack+

sudo service apache2 restart
sudo supervisorctl reread
sudo supervisorctl update

You should now be able to log into your server at http://yourserver/!