Migrating an old OpenProject MySQL database to PostgreSQL: why it matters now
If your OpenProject installation still runs on MySQL, the database move is no longer a someday task. The OpenProject upgrade notes for the 8.x to 9.x step state that MySQL is deprecated and that installations should plan a move to PostgreSQL. Current OpenProject releases go further: they officially support PostgreSQL 16 or later (supported since OpenProject 16.0.0) and require the pg_trgm, btree_gist and unaccent extensions. Any target database you build must have those extensions available before you start, so confirm that with your database administrators early.
The timing matters for a second reason. PostgreSQL 14 support ends on November 12, 2026, so a new PostgreSQL target should be at a version still in its support window, and the current OpenProject release notes and system requirements should be checked for the exact version pairing you plan to run. Treat the target database version as a decision to record, not a default you inherit from the old install. Ask your team which PostgreSQL major versions your backup tooling, monitoring and patching process already cover, because a database you cannot patch becomes the next legacy system.
The supported path is a documented conversion of the MySQL data into a PostgreSQL-compatible dump, followed by a restore into a PostgreSQL installation, either on the existing server after an upgrade of the package or on a new server with configuration and attachments carried over. Each route has different downtime, rollback and file-handling consequences, and the choice depends on how your installation is deployed today. The steps and their order are covered in the sections below, so the practical question for now is whether you have a current backup, a named owner for the cutover, and a window in which users can be locked out. Confirm the exact upgrade sequence against the official OpenProject documentation for your starting version before scheduling anything.
What changes when OpenProject leaves MySQL for PostgreSQL
This table compares what changes on the database side when a legacy OpenProject install moves from MySQL to PostgreSQL. Read each row as a decision point: the impact column says what the change affects, and the action column says what to confirm before the migration starts. The main takeaway is that the database move is only one part of the work, and the PostgreSQL version and extensions must be ready before restore.
| Change | Impact | Action needed |
|---|---|---|
| Database engine switch | OpenProject moves from MySQL to PostgreSQL, so the MySQL dump is converted and restored into a new database engine rather than upgraded in place. | Confirm which restore path you will use: in place on the existing package or on a new server. |
| PostgreSQL version floor | OpenProject officially supports PostgreSQL 16 or later since version 16.0.0, so older PostgreSQL releases are not a valid target. | Check the target PostgreSQL version against the OpenProject system requirements before installing. |
| Required extensions | The pg_trgm, btree_gist and unaccent extensions must be available in the PostgreSQL instance used by OpenProject. | Verify that the server packages or database image include these extensions and that the database user can create them. |
| MySQL deprecation in 8.x to 9.x notes | The upgrading documentation says MySQL is deprecated and that installations should plan a move to PostgreSQL. | Treat the move as a planned change on the upgrade roadmap, not an optional tweak. |
| PostgreSQL 14 support window | Support for PostgreSQL 14 ends November 12, 2026, according to the PostgreSQL versioning policy, so a new install on 14 would reach end of support soon after going live. | Avoid PostgreSQL 14 for a new target and confirm the version you plan to run. |
| PostgreSQL 17 and 18 support windows | PostgreSQL 17 is supported to November 8, 2029 and PostgreSQL 18 to November 14, 2030, per the PostgreSQL versioning policy. | Pick a supported major version and schedule future minor updates and major upgrades. |
| Configuration and attachments | The restore paths handle configuration and attachments separately from the database dump, so the database alone does not restore a working installation. | Back up configuration files and attachment storage, and confirm they are restored with the database. |
How the MySQL dump becomes a PostgreSQL database
The flow starts with an existing MySQL dump from the legacy installation. The migrate-from-pre-8.sh script runs in Docker on any host with Docker and is given the Docker host IP, then produces either a pg_dump file or a plain SQL file. Before restoring, confirm the output file is complete and keep a copy of the original dump and attachments. The restore then branches: an in-place upgrade of the existing package followed by openproject reconfigure to install PostgreSQL, or a fresh install on a new server with configuration and attachments restored.
Migration path from a MySQL dump to a PostgreSQL restore, with backup and check points.
Choosing between an in-place restore and a new server
The in-place path keeps the existing host and its OpenProject package. You upgrade the package, then run openproject reconfigure so the installer sets up PostgreSQL on the same machine and loads the migrated database. Configuration, attachments and DNS stay where they are, which keeps the number of moving parts low.
- Package upgrade first: bring the existing package to a version that can run the migrated data before you reconfigure the database backend.
- Reconfigure step:
openproject reconfigureis where the PostgreSQL install and database selection happen, so confirm the prompts match your plan before you accept them. - Downtime ownership: the team that runs the host owns the window, because the service is offline while the package is changed and the data is loaded.
- Rollback point: take a full backup of the MySQL data, configuration and attachments before you start, since the host itself is the only copy of the working system.
- Shared host risk: if other services run on the same machine, PostgreSQL and its resource use need to fit alongside them.
Before you choose this path, confirm the rollback steps and the maintenance window with the people who own the host and the users who depend on it.
The new server path installs OpenProject fresh on a separate host, then restores your configuration and attachments and loads the migrated database. The old host keeps running until the new one is verified, so the cutover can be planned and reversed. This path gives you a clean operating system and package state, at the cost of more steps.
- Fresh install: reinstall OpenProject on the new host with PostgreSQL, using the same major version you intend to run.
- Configuration and attachments: copy the configuration and the attachment files across, then check file ownership and paths on the new host.
- Database load: restore the migrated database into the new PostgreSQL instance and verify row counts and a sample of work packages.
- DNS or proxy cutover: change the DNS record or reverse proxy target at a planned moment, and keep the old host available for a rollback window.
- Email and integrations: confirm outbound email, SSO and any file storage links point to the new host before users arrive.
Before you choose this path, confirm who controls DNS and the reverse proxy, and how long the old host must stay online for rollback.
The migration script produces either a pg_dump file or a plain SQL file. The format decides how the data is loaded and how easily a person can read it. Both formats carry the same migrated data, so the choice is about your review and restore workflow rather than the result.
- pg_dump file: suits a restore with PostgreSQL's own tooling, where you want a compact archive that the restore utility loads directly.
- Plain SQL file: easier to inspect, search and diff, which helps reviewers check table content or find a problematic statement before loading.
- Review burden: a plain SQL file can be very large, so plan how a reviewer will read it, often by searching for specific tables.
- Restore tooling: confirm which format your chosen restore path expects before the script runs, so you do not convert files under time pressure.
- Storage and retention: keep the chosen file with the backups of the MySQL data, since it is the record of what was migrated.
Before you run the script, confirm which format your restore path expects and who will review the output.
Preparing the MySQL dump, host and backups
Migration risk sits mostly in preparation. A verified dump, a Docker host with the right network path, complete backups, a rehearsal on a copy and a rollback path each protect the cutover from a different failure. Work through these cards in order before anyone touches the production instance.
Take a verified MySQL dump
Stop user activity or schedule a quiet window, then take a dump of the OpenProject MySQL database. The dump must be complete and readable before you start the script, because the script converts whatever it receives. Confirm the file opens, check table and row counts against the running instance, and store a checksum next to the file so you can prove later which dump was migrated.
MySQL migration docsPrepare a Docker host with target access
The migrate-from-pre-8.sh script runs on any host with Docker, but it needs the MySQL dump and the Docker host IP that the target PostgreSQL can reach. Confirm that the target database port is open from the host, that the host has enough disk space for the dump and output file, and that you know the exact IP to pass to the script. A host on a separate network path often causes the failure that appears only at restore time.
Back up attachments and configuration
A database dump does not hold everything. Copy the attachments directory, the configuration files and any environment settings, including the secret key base that the instance uses. Without the secret key and attachments, restored records can exist but files and some encrypted settings will not work. Test one restore of the backup set to confirm it is usable.
Rehearse on a staging copy
Build a staging instance on the same OpenProject version, load a copy of the dump and run the full migration there first. Record each command, the output format you chose, how long the restore took and any errors. Use the rehearsal to set the cutover window and to check that users, projects and attachments look right before production is touched.
Review plugins and custom settings
Make a list of installed plugins, custom fields, branding, email settings, proxy rules and any direct database changes made by your team. Some of these may not carry over cleanly to a new database or may need reinstallation on the PostgreSQL side. Ask your vendor or the plugin maintainer which items need a manual step, and add each one to the cutover checklist.
Keep the MySQL rollback copy
Keep the original MySQL server, its data directory and the verified dump until the cutover has been accepted by the business owners. Do not decommission MySQL or overwrite its files during the migration. If the PostgreSQL instance fails in production, this copy is the path back to a known state, so record where it lives and who can restore it.
Running the migration script and restoring into PostgreSQL
This sequence moves a legacy OpenProject installation from a MySQL database to PostgreSQL while keeping the original MySQL instance intact until the migrated system is accepted. Each step ends with a check and a rollback point.
Freeze changes and notify users
Agree a maintenance window with the project owners and stop users from editing work packages, projects and attachments. Put the instance in read-only or maintenance mode if your proxy or setup allows it, and confirm with a test login that no new edits are being written. Record the OpenProject version, the MySQL version and the exact host names, so the cutover can be checked against them later. Rollback point: nothing has changed yet, so the team can cancel the window at no cost.
Take and verify the MySQL dump
Create a full dump of the OpenProject MySQL database and copy the attachments and configuration directories alongside it. Store the dump on a host separate from the production database, and check that the file is not empty and that its checksum matches after copying. Load the dump into a scratch MySQL instance and confirm that the table count and a few sample work package counts match the source. Rollback point: the untouched MySQL instance remains the system of record, and you can restart it at any time.
Run migrate-from-pre-8.sh with the dump
On any host with Docker, run the migrate-from-pre-8.sh script, passing the MySQL dump and the Docker host IP as the documentation describes. The script runs the conversion inside containers and writes its output to the working directory. Keep the console output, because it shows which conversion steps completed and any errors that need to be resolved before continuing. Check: the script exits without error and produces the output file you expect. Rollback point: the source dump is unchanged, so the run can be repeated with the same input.
Check the chosen output file
Inspect the file the script produced. A pg_dump file is restored with pg_restore, while a plain SQL file is loaded with psql, so confirm which format you received before choosing the restore command. Check the file size against the source data and search it for the expected project and user names. Record the file checksum. Rollback point: if the file is incomplete or the format is unexpected, rerun the script from the untouched dump rather than editing the output by hand.
Restore into PostgreSQL on the chosen target
For an in-place path, upgrade the existing OpenProject package and run openproject reconfigure so that PostgreSQL is installed, then restore the migrated database into it. For a new server, install OpenProject on that host, prepare PostgreSQL with the required extensions (pg_trgm, btree_gist and unaccent), restore the database, and then restore the configuration and attachments. Confirm that the restore finishes without errors and that the application starts against the new database. Rollback point: on the in-place path, keep a copy of the original configuration and package state, and on the new server path, the old host remains live.
Restore attachments and configuration
Copy the attachments directory and the configuration files from the MySQL-era installation to the target, keeping ownership and permissions consistent with the service user. Reconcile any settings that refer to the old database host or the Docker host IP, and confirm that the file paths used in the database still resolve. Check that the attachment count and sample file sizes match the source. Rollback point: the source attachments and configuration are untouched, so the copy can be repeated.
Verify logins, projects, work packages and attachments
Test the migrated instance with several accounts that have different roles, and open a representative set of projects, work packages, comments and attachments. Compare counts and a sample of records against the source system, and confirm that the permissions still match the intended roles. Note any gaps, including those tied to the known permission workaround described in the documentation, and resolve them before accepting the migration. Acceptance is recorded in writing by the project owner. Rollback point: until acceptance, the MySQL instance stays intact and can be returned to service.
Cut over and keep the MySQL instance
Point users to the migrated instance, lift the maintenance mode, and watch logs and login activity during the first working period. Keep the original MySQL instance, dump and attachments in read-only storage until the written acceptance is complete and your retention policy allows removal. Rollback point: if a critical issue appears after cutover, return traffic to the original instance and resolve the issue on the migrated copy before a second attempt.
Handling the known permission workaround during restore
The known permission workaround applies when the migrated data is loaded into PostgreSQL, and the exact steps depend on how the database roles are set up on your target. The category of problem is database role privileges during restore: the account that runs the restore may lack the rights needed to create objects, extensions or schema elements that the dump expects, so the import fails partway or leaves the database incomplete. Before you plan around it, confirm the exact steps, the affected roles and the OpenProject versions the workaround covers in the current OpenProject migration documentation. Do not rely on an older forum post or a copy of this page for the commands.
Reproduce the restore in a staging environment before you touch production. Use a copy of the production MySQL dump, the same PostgreSQL major version you plan to run, and the same role names and ownership model your production database will use. Record which role performs the restore, which objects it creates, and whether the workaround changes ownership or grants that you will need to reverse or keep. Then confirm that the OpenProject instance starts, that the expected projects, work packages and attachments are present, and that a second login with a normal application role still works. A staging run also shows you whether the workaround needs to run once or again after a later reconfigure.
Confirm the remaining points with your own environment and your vendor's current guidance. Ask who owns the PostgreSQL cluster, whether your security team allows a temporary elevated role, and how that role will be removed and logged afterwards. Check that your database policy permits the grants the workaround requires, and document each change so an auditor can trace it. If the documentation is unclear for your installed version, raise it with OpenProject before the cutover window rather than improvising in production.
What makes the MySQL to PostgreSQL move take longer
This table lists the factors that stretch a MySQL to PostgreSQL move for an old OpenProject installation and how each one changes the work. Read each row as a question to answer before planning: the more a driver applies to your installation, the more time and verification the move needs.
| Driver | Effect on effort | What to check first |
|---|---|---|
| Database size and attachment volume | Longer dump, conversion, restore and file copy steps, and more time to verify the result | Row counts for the largest tables and the total size of the attachments directory |
| Number of users and projects | More records to spot-check for access, membership and project hierarchy after the move | Active users, archived projects and any users whose logins changed since the MySQL era |
| Custom fields and plugins | Extra checks that migrated values, types and plugin data still display and behave correctly | List of custom fields, enabled plugins and any customizations to the installation |
| In-place restore or new server | In-place reuses the existing host and config, while a new server adds build, configuration and cutover steps | Host availability, OS support status, and whether configuration and attachments can be copied cleanly |
| Staging rehearsal | Each rehearsal adds a full restore cycle, but skipping it moves failures into production | Whether a non-production copy of the data and hosts can be created for repeated runs |
| PostgreSQL extensions and roles | Extra setup for pg_trgm, btree_gist, unaccent and the database role before restore can succeed | Confirm the required extensions and the role and privileges OpenProject expects in your PostgreSQL version |
| Network and DNS cutover | Planning for a read-only window, DNS or proxy changes and rollback if users reach the old address | Who controls DNS and proxies, TTL values, and how users are told about the outage window |
| Number of environments | Each extra environment such as test, staging and production repeats restore, checks and sign-off | How many environments exist today and whether they match production in version and data |
What buyers ask before moving off MySQL
What does a MySQL to PostgreSQL migration cost, and what drives it?
The cost is the labor to plan, rehearse, run and verify the move, plus the time your team spends on the cutover. An internal team pays for this in staff hours. A partner quotes against a written scope. The main drivers are the number of OpenProject versions between your installation and the release you run afterward, the size of the database dump and attachment store, whether you restore in place or onto a new server, how many plugins and custom fields need checking, and how many people must sign off. The one-time work is the migration itself and the rehearsal. Once cutover is complete, the ongoing cost of running PostgreSQL is a separate operations question. Ask for a quote that itemizes planning, dump preparation, rehearsal runs, cutover, verification, rollback preparation and any post-cutover checks.
How long does the migration take?
The duration depends on drivers rather than a fixed figure, so ask for a timeline that is tied to them. The biggest factors are the size of the MySQL dump and how long the conversion takes on the Docker host, how far your installation sits behind the current release, the volume of attachments to copy and verify, and the number of rehearsal runs before production. Your change window must cover the final dump, the conversion, the restore and the checks, so the window length follows from the rehearsal timings. If your installation is an older release, the stepwise upgrade path adds its own work, described in the OpenProject upgrading documentation. Ask the provider to show which of these drivers its estimate assumes.
What must our team provide for the migration?
Your team provides access, a host and people. Typical inputs include:
- A MySQL dump taken from the current OpenProject installation, plus a way to move it to the conversion host.
- A Docker-capable host that can reach the OpenProject server, because the conversion script takes the Docker host IP as input.
- A target PostgreSQL installation on version 16 or later, with the pg_trgm, btree_gist and unaccent extensions available.
- Administrator access to the current server, its file storage and its configuration.
- Staff who know the projects, work packages and permissions well enough to verify results after the restore.
- An approved change window with a named owner who can decide on rollback.
Confirm each item with the provider before the rehearsal begins, since missing access is one of the most common causes of delay.
Can our in-house team run the migration without a partner?
Yes, if the team has Linux administration, Docker, PostgreSQL and OpenProject administration skills and enough time to rehearse. The official documentation covers the conversion script and both restore paths, so a capable team can follow it. The harder parts are the known permission workaround, which you should confirm in the documentation before cutover, verification of restored data against real users and projects, attachment handling, and a rollback path that has been tested. A partner is most useful when the team lacks time to rehearse, when the production cutover needs an independent record of checks, or when the installation includes plugins or custom configuration that nobody on staff knows well. Your team should decide based on those gaps, not on the script alone.
Can we rehearse the migration on a copy before production?
Yes, and a rehearsal is the most useful step before cutover. Take a dump from the current installation, convert it on a separate Docker host, and restore it into a non-production PostgreSQL installation. Then run the reconfiguration step, sign in with several accounts that hold different roles, and check projects, work packages, attachments, notifications and permissions. Record how long each step takes. The rehearsal results set the production change window, and any error you find in a copy is one you avoid during cutover. Repeat the rehearsal until a run completes without manual fixes, and keep the rehearsal notes so the production runbook matches what you actually executed.
How does rollback work if the PostgreSQL cutover fails?
Rollback works only if the MySQL-based installation and the original dump remain untouched until verification passes. On the in-place path, the package upgrade and reconfiguration change the existing installation, so take a full backup of the host and the MySQL database before you start. On the new-server path, the original server can stay in service during testing, and rollback means pointing users back to it. In both cases, stop writes to the old system during the final dump, because changes made after the dump will not appear in the new installation. Write the rollback steps into the runbook, name who decides to roll back, and confirm the exact commands with the official documentation before the change window.
Are attachments and configuration moved with the database?
The database dump carries the data in the database, not every file on disk, so attachments and configuration need their own check. The official documentation describes restoring configuration and attachments when you reinstall on a new server, and the in-place path keeps the existing package and file locations. Plan to confirm where attachments are stored, copy them with the right ownership and permissions, carry over configuration and environment settings, and verify that a sample of files opens from work packages after the restore. Also check email settings and any integrations that depend on stored secrets, because those are often missed. Ask the provider to show a checklist that covers each of these items for your installation.
What does the migration not cover?
The conversion from MySQL to PostgreSQL is one piece of work, and several related tasks sit outside it unless the written scope includes them. These are typically excluded:
- Upgrading to a newer OpenProject release on its own, which has separate steps and sibling topics.
- Importing data from other tools, such as Jira.
- Configuring single sign-on, email delivery or new integrations.
- Tuning PostgreSQL, sizing the server or planning backups for the new database.
- High availability on PostgreSQL. PostgreSQL does not provide automatic failover software, so that needs external tools and its own design.
- Retesting custom plugins or bespoke workflows beyond the checks in the scope.
Ask for these exclusions to be listed explicitly in the written scope, so nobody assumes they are included.
How DeployOpen works on this
DeployOpen scopes the move from MySQL to PostgreSQL as a fixed-scope engagement inside your own infrastructure, starting with a written inventory of your installation, dump and attachments. We then build and test the migration on a copy before anything touches production, and hand over a documented result your team can run.
How we scope
- Written scope names the OpenProject version, install type and the MySQL dump being migrated
- Scope records whether the restore happens in place or on a new server with configuration and attachments
- Scope lists the Docker host, network access and the PostgreSQL version your team wants to run
How we build
- We run the migrate-from-pre-8.sh script against a copy of your dump and review its output format
- We restore into a PostgreSQL install, apply the required extensions and check the result before cutover
- We document the known permission workaround and test attachments, users and projects after restore
How we hand over
- You receive a runbook covering backup, cutover steps, rollback and post-migration checks
- Handover includes the exact commands, configuration keys and file paths used in your environment
- Your team walks through a restore test so the procedure is confirmed before the old database is retired
How we support
- Ongoing support, upgrades and continuous testing are available as retainers after handover
- Support can cover later OpenProject upgrades and PostgreSQL minor version updates on your schedule
- Quotes follow from the written scope, so ask us to list which support items sit outside it

