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. Migrate from Docker Compose to Packaged

Migrate from Docker Compose to Packaged

Added by Mircea Marin almost 4 years ago

Hi,

we are currently testing OpenProject (v. 11.2.3) internally and have it deployed through docker-compose. We are thinking about starting to use the tool productively but not as docker-compose. Instead we want to use the RPM version. We would also like to keep the data that is already available in the test instance. My question is, how would we be doing this the right way? Is it enough to dump the PostgreSQL DB from our test instance and restore it in the "live" one? Or should we take anything else into account? I could not find any guides for migrating from docker-compose to packaged installation.

Thanks!


Replies (3)

RE: Migrate from Docker Compose to Packaged - Added by Mircea Marin almost 4 years ago

Here's part of the answer (in case you don't have custom settings or attachments) - covers the migration of the database. I hope this works for you but if it doesn't, I probably can't help you!

  1. Backup your docker database as described here: Backing up your OpenProject installation | OpenProject Help & Documentation
  2. Copy the dump (openproject.sql) to the new server. Note down the location.
  3. On the new system, install OpenProject as described here: Install OpenProject with DEB/RPM packages | OpenProject Help & Documentation
  4. NOTE: we're using CentOS 8 and for some reason the OpenProject configuration wants to install PostgreSQL 9.4 which is not supported in this version anymore. As such, we had to install the PostgreSQL database separately. We used PostgreSQL 13. We used the official instructions from here: PostgreSQL: Linux downloads (Red Hat family)
  5. Setup your database:
[root@host] su - postgres
[postgres@host] createuser -P -d openproject
[postgres@host] createdb -O openproject openproject
  1. Run the configuration script as described here: Install OpenProject with DEB/RPM packages | OpenProject Help & Documentation
  2. For the step about configuring the database, select "Use an existing database" and enter the connection details of the DB you just set up
  3. Finish the setup and test that OpenProject works (for now with an empty database)
  4. Once everything works, we need to import the data you exported in the first step by doing these steps:
[root@host] service openproject stop
[root@host] su - postgres -c psql
postgres=# DROP DATABASE openproject;
postgres=# CREATE DATABASE openproject OWNER openproject;
postgres=# \c openproject
openproject=# \i /path/to/openproject.sql
# make sure all commands run without errors!
openproject=# \q

At this point you already imported the database (if all went well) but the problem is that the importing of the data in the previous step messed up with the permissions for the tables in the "openproject" database. For this I used a script that changes all permissions for the tables in the "openproject" database which I found here: Changes the owner on all tables, sequences, views, and functions in a PostgreSQL database with support for identifiers with whitespace and non-public schemas. ยท GitHub

[root@host] nano pg_change_schema_owner.sh
# paste the sctipt mentioned earlier and save the file
[root@host] chmod u+x pg_change_schema_owner.sh
[root@host] ./pg_change_schema_owner.sh -d openproject -o openproject
# make sure the script executes without errors
[root@host] reboot

If all went well you can now access OpenProject at the new location. If not, then try running sudo openproject configure to re-run the configuration steps. Lastly, if all else fails, check the logs sudo openproject logs

Hope this helps!

RE: Migrate from Docker Compose to Packaged - Added by Connor Moroney over 3 years ago

I ended up answering alot of these myself.
Did you end up needing the old Database password for the import? (NO)

Do you need to know the path to the current database location?(NO)

This was a huge help, thanks so much, i managed to migrate my install from docker to self sustainable in no time thanks to you and your work.

RE: RE: Migrate from Docker Compose to Packaged - Added by Brenden Reeves 11 months ago

This also helped me very much.

I also did not have to run the pg_change_schema_owner script on the current version (14.2) when migrating from docker-compose to rpm.

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