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

General discussion
  1. OpenProject
  2. Forums
  3. General discussion
  4. Guide: How to Upgrade Postgre from version 10 to 13 (and OpenProject from version 12.5.8 to 13.0.0)

Guide: How to Upgrade Postgre from version 10 to 13 (and OpenProject from version 12.5.8 to 13.0.0)

Added by Randy R about 1 year ago

Here is an alternate method to upgrade both:

  • Postgre from version 10 to 13.
  • OpenProject from version 12.5.8 to 13.0.0.

The official guide is here.  However, as a Docker newbie, I couldn't quite follow the guide.  Also, I don't think the official guide works with Portainer since Portainer can only run Docker Compose scripts but cannot run Docker Compose commands.

This relates to Docker running on Windows.

Steps:

  1. Run Docker Compose Down.
  2. Backup all data volumes.
    1. If using Docker Desktop, open this location in Windows file explorer: [\\wsl$\docker-desktop-data\data\docker\volumes](file:///docker-desktop-data/data/docker/volumes)
    2. If using Rancher Desktop, open this location in Windows file explorer: [\\wsl.localhost\rancher-desktop-data\mnt\wsl\rancher-desktop\run\data\var\lib\docker\volumes](file:///rancher-desktop-data/mnt/wsl/rancher-desktop/run/data/var/lib/docker/volumes)
    3. Fyi: Don't backup the two files "backingFsBlockDev" and "metadata.db".  Will see them at the same folder level as the volume folders.  For whatever reason backing-up these two files consumes unlimited amounts of data.
  3. Install the PGAdmin app.  We will use this later to connect directly to Postgre.
  4. In the docker compose file->Postgre section, expose port 5434.
    1. Fyi: 5432 is the default port for Postgre.
  5. Fire up the older OpenProject 12.5.8 (which uses Postgre ver 10).
  6. In the PGAdmin app, backup the database.
    1. Make sure to select the option to include data in the backup.
  7. Shut down the docker stack.  Then delete all containers and volumes.  We will start with a fresh installation of Postgre version 13 in steps below.
  8. In Docker Compose, keep OpenProject at version 12.5.8.  However, change the Postgre database to version 13.  This is the key step!  Run Docker Compose to fire up the stack.
  9. Using pgAdmin, delete the OpenProject database.  We will restore this from our backup in a later step below.
    1. Fyi:
      1. May need to turn-off all other containers besides the container that runs Postgre.
      2. If PGAdmin still complains about open connections then stop/restart the container for Postgre.
  10. Using pgAdmin, create a new bare bones database called "openproject".
  11. Using PgAdmin, restore the backup database for "openproject".  
    1. Fyi: I noticed some immaterial errors when running the first half of the restore.  However, the second half of the restore (mainly to insert data) worked OK.
  12. Note: At this point, we have:  1. OpenProject version 12.5.8 2. Postgre version 13.
  13. Run Docker Compose Down to shut down the docker stack.
  14. Edit the Docker Compose script to change OpenProject to version 13.0.0 (could maybe go higher but I wanted to take it one step at a time).
  15. Run Docker Compose Up to upgrade OpenProject to 13.0.0.
  16. (optional) Repeat steps #12, #13, #14 to upgrade to higher versions of OpenProject (greater than 13.0.0).

Done!


Loading...