Open link in a new tab

Content

Expand project menu

Upgrading PostgreSQL from 9.6 to 13

Hello @all,

having here OpenProject 11.3.5 with PostgreSQL 9.6.19 on Debian 10 running. I want to upgrade to PostgreSQL 13 via this Link:

https://www.openproject.org/docs/installation-and-operations/misc/migration-to-postgresql13/

I changed the "10" strings to "9.6" and the script (inkl. the data migration) seem to be functional. 

But the  both follwing commands:

    sudo su - postgres -c "cp /etc/postgresql/{10,13}/main/conf.d/custom.conf"

    sudo su - postgres -c "sed -i 's|45432|45433|' /etc/postgresql/10/main/conf.d/custom.conf"

did not work. Seems that the custom.conf is no file from PostgreSQL 9.6.

How can i upgrade my PostgreSQL Data from 9.6 to 13? 

Greetings

Marco

Message actions

Hi Marco,

as mentioned in the header of the guide, this is only applicable if OpenProject installed the PostgreSQL database for you.  It will create the custom.conf https://github.com/pkgr/addon-postgres/blob/master/bin/preinstall#L187

I assume that this is not the case in your installation. Double-check by running sudo cat /etc/openproject/installer.dat | grep postgres/autoinstall. It should output install.

If it does not, you installed PostgreSQL on your own and can follow a generic guide to upgrade PostgreSQL with pg_upgradecluster which is very straightforward. Here's an exemplary guide that provides step-by-step instructions: https://gorails.com/guides/upgrading-postgresql-version-on-ubuntu-server

Best

Oliver

Message actions

Hi Oliver,

thanks for the hints and the links... Upgrade runs smooth with pg_upgradecluster. OpenProject runs and shows PostgreSQL 13.4 as database. :-)

Greetings
Marco

Message actions

Hi Marco,

excellent, thanks for the response! I'll update our docs to make this bit more present

Cheers

Oliver

Message actions

Cool, that tutorial worked as a charm. Upgrading from 9.5 to 13 here.