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. Migration OP 11 with PG 9.6 to OP 12 with PG 13 failed

Migration OP 11 with PG 9.6 to OP 12 with PG 13 failed

Added by Frank Hintsch over 2 years ago

I have a working docker installation of OP11 using this compose file:

  openproject:
    image: openproject/community:11
    restart: always
    environment:
      SECRET_KEY_BASE: secret
      DATABASE_URL: postgres://openproject:****@dbpg/openproject
    ports:
      - "9040:80"
    volumes:
      - "./openproject/logs:/var/log/supervisor"
      - "./openproject/static:/var/openproject/assets"

  dbpg:
    image: postgres:9.6-alpine
    restart: always
    volumes:
      - "./dbpg/pgdata:/var/lib/postgresql/data"
    ports:
      - "9011:5432"

I try to migrate to OP 12, following https://www.openproject.org/docs/installation-and-operations/misc/migration-to-postgresql13/#all-in-one-docker-installation. It does not work.

Steps I have done:

docker run --rm -it \
 -v /home/frankhintsch/docker/v11/dbpg/pgdata:/var/openproject/pgdata \
 -v /home/frankhintsch/docker/v11/openproject/pgdata-next:/var/openproject/pgdata-next \
 openproject/community:12 root ./docker/prod/postgres-db-upgrade

This was successful.

But when I started the DB-content (without pointer to external database container)

  openproject:
    image: openproject/community:12
      #    restart: always
    environment:
      SECRET_KEY_BASE: secret
      OPENPROJECT_HTTPS: "false"
      OPENPROJECT_HSTS: "false"
    ports:
      - "9042:8080"
    volumes:
      - "./openproject/pgdata-next:/var/openproject/pgdata"

I faced several pitfalls.

  1. psql: error: connection to server at "127.0.0.1", port 5432 failed: FATAL:  role "openproject" does not exist:
    I created User + Role "openproject" with psql
  2. psql: error: connection to server at "127.0.0.1", port 5432 failed: FATAL:  database "openproject" does not exist
    I looked at the list of databases and it looks like nothing has been migrated
postgres=# \l
                             List of databases
   Name    |  Owner   | Encoding | Collate |  Ctype  |   Access privileges   
-----------+----------+----------+---------+---------+-----------------------
 postgres  | postgres | UTF8     | C.UTF-8 | C.UTF-8 | 
 template0 | postgres | UTF8     | C.UTF-8 | C.UTF-8 | =c/postgres          +
           |          |          |         |         | postgres=CTc/postgres
 template1 | postgres | UTF8     | C.UTF-8 | C.UTF-8 | =c/postgres          +
           |          |          |         |         | postgres=CTc/postgres

Can anyone help me?

Thanks in advance

Frank


Loading...