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. Restoring old OpenProject Docker

Restoring old OpenProject Docker

Added by Michael Ballard over 1 year ago

I may have already messed this up because I thought it was working and deleted my original...I believe I originally installed OpenProject around 2021.

My server died, and instead of replacing a mainboard, I figured I would migrate all my Docker containers to a new machine like I'd planned. I run OpenProject via Docker, with /var/openproject/assets and /var/openproject/pgdata mounted as volumes. I couldn't remember what version of OpenProject I had, so I guessed...11 works, but gives me errors when I try to actually do anything...I can log in, but viewing projects gives me "The data to display the graph could not be loaded. The necesary permissions may be lacking" (image) and an internal error when I try to view Work packages (image).

If I relaunch the container with 12, I get

DATABASE INCOMPATIBILITY ERROR

Database server version mismatch: Required version is 10.0.0, but current version is 9.6.24

If I relaunch with older versions less than 11 such as 10.5 or slightly newer like 11.0.1, I get

-----> Starting the all-in-one OpenProject setup at /app/docker/supervisord...
-----> Database cluster already exists, not modifying.
      waiting for server to start..... done
      server started
      Trying to contact PostgreSQL server instance or waiting for it to come online.
      Starting memcached: memcached.
/usr/local/bundle/gems/bundler-2.0.2/lib/bundler/rubygems_integration.rb:198: warning: constant Gem::ConfigMap is deprecated
rake aborted!
ActiveRecord::StatementInvalid: PG::UndefinedColumn: ERROR:  column "updated_on" does not exist
LINE 1: SELECT MAX(updated_on) FROM "settings"
                  ^
HINT:  Perhaps you meant to reference the column "settings.updated_at".

11.1 behaves the same as 11.

My Docker command is below and I run behind the same nginx reverse proxy that has worked for me for years:

docker run -d -v openproject-assets:/var/openproject/assets -v openproject-pgdata:/var/openproject/pgdata -p 8092:8080 -e OPENPROJECT_SECRET_KEY_BASE=somesecret --name OpenProject --replace=true openproject/community:11

Replies (1)

RE: Restoring old OpenProject Docker - Added by Michael Ballard about 1 year ago

Database fully recovered. Brief instructions for posterity.

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

In case that link ever gets abandoned, the steps I took are:

First, create a new volume: docker volume create openproject-pgdata-next or similar.

Then run it with the below command

docker run --rm -it \
-v openproject-pgdata:/var/openproject/pgdata \
-v openproject-pgdata-next:/var/openproject/pgdata-next \
openproject/community:13 root ./docker/prod/postgres-db-upgrade

I had some permissions issuesreported, resolved by re-running the above command as

docker run --rm -it \
-v openproject-pgdata:/var/openproject/pgdata \
-v openproject-pgdata-next:/var/openproject/pgdata-next \
openproject/community:13 root bash

From there I ran chmod 0700 /var/openprojects/pgdata  and chown postgres:postgres /var/openprojects/pgdata -R in the container.

I had another error, but was able to track it down via the error message provided (didn't keep that written down, but it was easy enough to follow). To run the update I could either execute /app/docker/prod/postgres-db-upgrade or simply exit the container and run the code above with the upgrade command. Once that was all sorted, and I got the "Upgrade Complete" message, I exited the container and launched with OpenProject version 13 and the new data directory populated from the upgrade, openproject-pgdata-next.

Version 13 and it kept crashing without error messages. Tried again with version 12, and after a few minutes everything was sorted and working:

docker run -d \
-v openproject-assets:/var/openproject/assets \
-v openproject-pgdata-next:/var/openproject/pgdata \
-p 8092:8080 \
-e OPENPROJECT_SECRET_KEY_BASE=SOME_SECRET \
--name OpenProject \
--replace=true \
openproject/community:12
  • (1 - 1/1)
Loading...