@ -6,7 +6,6 @@ OpenProject version 12+ will default to PostgreSQL 13. If you have an existing O
<divclass="alert alert-info"role="alert">
Please follow this section only if you have installed OpenProject using [this procedure][package-based-installation].
Before attempting the upgrade, please ensure you have performed a backup of your installation by following the [backup guide](../../operation/backing-up/).
</div>
@ -23,13 +22,30 @@ And verify that it outputs: postgres/autoinstall **install**.
If that is not the case, you are likely using a self-provisioned database or a remote database. In this case, please follow the instructions from your provider or use generic PostgreSQL upgrade guides. A guide we can recommend for Debian/Ubuntu based servers is this one: https://gorails.com/guides/upgrading-postgresql-version-on-ubuntu-server Please adapt that guide or the following steps to your distribution.
In the following, we assume that you initially let OpenProject setup your PostgreSQL installation, using a local database.
NOTE: RedHat and CentOS are slightly different, depending on which PostgreSQL pacakge/repository will be used.
For the documentation parts titled RedHat/CentOS RedHat Enterprise Linux 8 was used.
1. First, connect to your server and make sure your local version is PostgreSQL v10:
6. Check your OpenProject installation. A version higher than `13` should be displayed for `PostgreSQL version` in the "Administration > Information" section.
For RedHat/CentOS:
```bash
sudo su - postgres -c "mkdir -p /var/lib/pgsql/13/data/conf.d"
sudo su - postgres -c "vi /var/lib/pgsql/13/data/postgresql.conf"
# at the section CONFIG FILE INCLUDES, please add the include directory conf.d
include_dir = 'conf.d'
sudo su - postgres -c "cp -p /var/lib/pgsql/10/data/conf.d/custom.conf /var/lib/pgsql/13/data/conf.d/custom.conf"
sudo su - postgres -c "sed -i 's|45432|45433|' /var/lib/pgsql/10/data/conf.d/custom.conf"
# Alter the password for user openproject in pgsql13
[root@openproject ~]# su - postgres
[postgres@openproject ~]$ psql --port 45432
psql (13.6)
Type "help" for help.
postgres=# ALTER USER openproject WITH PASSWORD '[CRYPTICAL-PASSWORD-STRING]';
ALTER ROLE
postgres=# \q
[postgres@openproject ~]$ logout
```
6. Check your OpenProject installation on the GUI. A version higher than `13.0` should be displayed for `PostgreSQL version` in the "Administration > Information" section.
7. If everything is fine, you can then remove your older PostgreSQL installation:
For Debian/Ubuntu:
```bash
sudo rm -rf /var/lib/postgresql/10/main
# you can optionally go further and purge postgresql-10 from your system if you wish