How To Upgrade OpenProject

OpenProject is an open source project management solution that offers features such as issue tracking, document management, time and cost reporting, and code management. To install OpenProject, click here:

This upgrade was completed on Ubuntu 16.04 and also applies to Ubuntu 18.04.

As of 2019.01.06 – OpenProject 8.2.0

1. Backup OpenProject

$ sudo openproject run backup

This will store the current database dump, attachments and config to ‘/var/db/openproject/backup'. To Restore, see the info at the bottom of this page.

2. Upgrade the package source

If you have currently installed the stable 7.x release of OpenProject by using the stable/7 package source, you will need to adjust that package source:

$ sudo nano /etc/apt/sources.list.d/openproject-ce.list

Update the reference to stable/7 in /etc/yum.repos.d/openproject.repo to stable/8 so it looks like this:

deb https://dl.packager.io/srv/deb/opf/openproject-ce/stable/8/ubuntu 16.04 main

Ctrl+x then ‘y' to save and exit.

3. Upgrade

$ sudo apt-get update
$ sudo apt-get install --only-upgrade openproject
$ sudo openproject configure

If you want to perform changes to your configuration or are unsure what steps are available, you can safely run ‘sudo openproject reconfigure' to walk through the entire configuration process again.

Done

How to restore a backup

The backup created with the tool consists of four parts which are all compressed using gzip. Except the database dump these parts can be restored by decompressing the *.tar.gz files and copying the contents to the proper location(located in /var/db/openproject/…). The command to untar and unzip the *.tar.gz files looks like this (using sample file names from above):

$ cd /var/db/openproject/backup
$ tar vxfz attachments-20180928092303.tar.gz -C /target/directory
$ tar vxfz conf-20180928092303.tar.gz -C /target/directory
$ tar vxfz svn-repositories-20180928092303.tar.gz -C /target/directory

Restoring the Database

The ‘dbuser', ‘dbhost' and ‘dbname' variables have to be replaced with the values that are contained in the DATABASE_URL setting of your installation. This setting can be seen by running:

$ sudo openproject config:get DATABASE_URL

output will something in this format:

mysql2://dbuser:dbpassword@dbhost:dbport/dbname

example (from a local development install with random dbpassword):

mysql2://openproject:[email protected]:3306/openproject

Using MariaDB (or MySQL) the dump has to be extracted (unzipped) and then restored. The command used should look very similar to this:

$ zcat mysql-dump-20150408095521.sql.gz | mysql -u <dbuser> -h <dbhost> -p <dbname>

using the example from the DATABASE_URL settings we generated above, it would look like this:

$ zcat mysql-dump-20180928092303.sql.gz | mysql -u openproject -h 127.0.0.1 -p openproject

REFERENCES

https://www.openproject.org/operations/upgrading/upgrade-guide-packaged-installation/
https://www.openproject.org/operations/backup/backup-guide-packaged-installation/

How To Install OpenProject On Ubuntu 16.04 With LEMP Stack

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.