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.
$ 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.
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:
example (from a local development install with random dbpassword):
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