Top Menu

Jump to content
Home
    Modules
      • Projects
      • Activity
      • Work packages
      • Gantt charts
      • Calendars
      • Team planners
      • Boards
      • News
    • Getting started
    • Introduction video
      Welcome to OpenProject Community
      Get a quick overview of project management and team collaboration with OpenProject. You can restart this video from the help menu.

    • Help and support
    • Upgrade to Enterprise edition
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Enterprise support

    • Additional resources
    • Data privacy and security policy
    • Digital accessibility (DE)
    • OpenProject website
    • Security alerts / Newsletter
    • OpenProject blog
    • Release notes
    • Report a bug
    • Development roadmap
    • Add and edit translations
    • API documentation
  • Sign in
      Forgot your password?

      or sign in with your existing account

      Google

Side Menu

  • Overview
  • Activity
    Activity
  • Roadmap
  • Work packages
    Work packages
  • Gantt charts
    Gantt charts
  • Calendars
    Calendars
  • Team planners
    Team planners
  • Boards
    Boards
  • News
  • Forums

Content

Support Installation & Updates
  1. OpenProject
  2. Forums
  3. Support Installation & Updates
  4. Migrating your OpenProject installation to PostgreSQL 13 (All-in-one docker installation)

Migrating your OpenProject installation to PostgreSQL 13 (All-in-one docker installation)

Added by Raimondas Zubavicius almost 2 years ago

Hello,

Current: OpenProject 11.4.1 (All-in-one docker installation on Synology NAS, over UI)
Upgrade to: OpenProject 12.5.7

After this command (using Task Scheduler, or even SSH):

sudo docker run --rm -v /volume1/docker/openproject12/pgdata:/var/openproject/pgdata   -v /volume1/docker/openproject12/pgdata-next:/var/openproject/pgdata-next   openproject/community:12.5.7 root ./docker/prod/postgres-db-upgrade

I get this error:

Standard output/error:
-----> Existing PostgreSQL cluster found in /var/openproject/pgdata.
-----> Setting PGVERSION=9.6 PGBIN=/usr/lib/postgresql/9.6/bin PGCONF_FILE=/etc/postgresql/9.6/main/postgresql.conf
Empty cluster found in /var/openproject/pgdata-next. Generating cluster...
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale "C.UTF-8".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /var/openproject/pgdata-next ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... Etc/UTC
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok

Success. You can now start the database server using:

/usr/lib/postgresql/13/bin/pg_ctl -D /var/openproject/pgdata-next -l logfile start


There seems to be a postmaster servicing the old cluster.
Please shutdown that postmaster and try again.
Failure, exiting

On this directory /volume1/docker/openproject12/pgdata I have current OpenProject data.

What I missed? How I can solve this failure?

Any help would be very useful!

The command is from this link:
https://www.openproject.org/docs/installation-and-operations/misc/migration-to-postgresql13/#all-in-one-docker-installation

Thank You!


Replies (1)

RE: Migrating your OpenProject installation to PostgreSQL 13 (All-in-one docker installation) - Added by S Yuen almost 2 years ago

Hi I am also upgrading from OP11 to OP12 and ran into the same issue.   It seems the Postgre migration tool in Synology install of OP12 is broken. However I was successful in migrating pgdata to Postgres version 13 by installing OP12 using the commands below in SSH with "openproject/community:12".  Unfortunately I have deleted the new pgdata by accident, so I need to migrate again using my backup pgdata.  After another successful pgdata migration, I'll probably have to use composer to install OP12 with the new pgdata.  However I will be busy for a few days before I can try it.  One thing I noticed is after trying to install OP12 with SSH, Postgres wont start when going back to Synology OP11 install.

I used these instructions to get OP12 with working Postgres migration tool...

#First, pull the latest version of the image:

docker pull openproject/community:VERSION
# e.g. docker pull openproject/community:10

#Then stop and remove your existing container (we assume that you are running with the recommended production setup here):

docker stop openproject
docker rm openproject

#Finally, re-launch the container in the same way you launched it previously. This time, it will use the new image:

docker run -d ... openproject/community:VERSION

link to page here https://www.openproject.org/docs/installation-and-operations/operation/upgrading/#all-in-one-container

  • (1 - 1/1)
Loading...