Why a MySQL-based Zammad must move to PostgreSQL before Zammad 7
Starting with Zammad 7, PostgreSQL is the only supported database server, and an upgrade to Zammad 7 is not possible on a MySQL installation. If your Zammad stores its data in MySQL or MariaDB, the database move is a prerequisite for any move to the 7.x line, not an optional clean-up step. Zammad's documented migration commands require Zammad 5.3 or higher, so a MySQL-based instance that is older than that must first be brought forward to a version that includes them. Confirm your current version and database engine before planning anything else.
Zammad 7.2 was released on 23 September 2026 as a minor release, followed by security releases 7.2.1 on 6 October 2026 and 7.2.2 on 8 October 2026. Zammad also shipped security release 6.5.5 on 15 October 2026, so security fixes were published for both the 6.5 and 7.x lines in parallel. If you run 6.5 today, that release addresses your current line while you plan the move, but it does not remove the requirement to change databases before reaching 7.x. Treat the 6.5.5 fix as a reason to act now rather than a reason to wait.
Plan the database move as its own workstream with a named owner, a rehearsal on a copy of production, and a go or no-go decision before the 7.x upgrade is scheduled. Ask your Zammad partner or internal team to confirm the exact version path from your current release, the PostgreSQL version you will target, and the Redis, Elasticsearch and reverse proxy changes that the 7.x line requires alongside the database move. Confirm these against the Zammad software requirements before you commit to a window.
What changes in the database layer for Zammad 7
This table compares how the database layer works on a MySQL or MariaDB installation today with what Zammad 7 requires. Read each row as a decision point: the impact column shows what breaks or changes, and the action column shows what to do before the upgrade.
| Area | Impact for a MySQL-based Zammad | Action needed |
|---|---|---|
| PostgreSQL as the only database server | From Zammad 7, PostgreSQL is the only supported database server, so a MySQL or MariaDB installation cannot be upgraded to 7 in place. | Plan the database move to PostgreSQL as a step before the Zammad 7 upgrade, not during it. |
| MySQL upgrade block | An upgrade to Zammad 7 is not possible on a MySQL installation, so the upgrade path is blocked until the data is on PostgreSQL. | Confirm your current Zammad version supports the migration commands (Zammad 5.3 or higher) before you start. |
| Schema renamed from zammad to public | The pgloader command file renames the zammad schema to public as part of the conversion, so schema names differ from the source database. | Test the command file on a copy and check that the application connects to the expected schema. |
| Array columns for S/MIME certificates, PGP keys, public links and checklists | These columns are converted to PostgreSQL array types by the documented command file, so they need explicit handling during load. | Verify these four data areas after the copy, using the checks in your test plan. |
| PostgreSQL 15 or newer | Zammad stores its content in PostgreSQL 15 or newer, so the target server must meet this minimum. | Confirm the target PostgreSQL version is supported by Zammad and still receives vendor updates. |
| Redis 7 requirement (unchanged) | Redis 7 or newer is still required for realtime websocket communication, so the database move does not change this requirement. | Check the existing Redis version before the upgrade and keep it on the supported line. |
Preparing the MySQL to PostgreSQL move
Preparation decides whether the move is a routine rehearsal or an outage. The cards below cover the restorable backup, the inventory of what must survive the move, the PostgreSQL target, the rehearsal copy and the version check that gates the whole migration path for Migrating Zammad from MySQL or MariaDB to PostgreSQL.
Take a restorable full backup
Take a full database backup and a copy of the file storage before any change, then test that it restores onto a separate host. The backup must restore to a clean server, not just exist as a dump file. Record the Zammad version and database version alongside it, because a backup taken on one version may not restore onto another. Keep this copy until the new PostgreSQL system has run in production for an agreed period.
Inventory custom settings and integrations
List every setting, integration, channel and external connection the current Zammad depends on, including email accounts, LDAP or SSO configuration, webhooks, API tokens and any custom code. Check which settings live in the database and which live in files or environment variables, because the database move will not carry file-based configuration. Confirm each item still works on the target version before cutover.
Choose a supported PostgreSQL target
Zammad 7 requires PostgreSQL 15 or newer, so choose a version that is still supported over the planned life of the system. Supported major versions currently run from 14 through 18, with end dates in November 2026 for 14, November 2027 for 15, November 2028 for 16, November 2029 for 17 and November 2030 for 18. A version that ends soon will need its own upgrade, so plan for the newest version that your Zammad release supports.
PostgreSQL versioning policyRehearse on a staging copy
Build a staging Zammad on the target version and PostgreSQL server, load a copy of the production data, and run the full pgloader migration. Measure how long the import takes, then check ticket counts, attachments, S/MIME and PGP settings, and login flows. The rehearsal results set the real maintenance window, so run it more than once if the first attempt surfaces problems.
Confirm Zammad is version 5.3 or higher
The migration commands in Zammad's documented path need Zammad 5.3 or higher, so confirm the running version before any other step. Installations on an older release must first upgrade stepwise to 5.3 or later, because skipping major versions is not supported. Check the installed version in the admin interface and in the release notes, and record it in the change plan.
How the pgloader command file moves the schema
Zammad's documented path uses pgloader, a data migration tool, to read a command file that copies the data from MySQL or MariaDB into PostgreSQL in one pass. The file does three jobs that you need to understand before you run it: it connects the source and target databases, it renames the zammad schema to public so that Zammad finds its tables where the PostgreSQL version of the application expects them, and it converts several columns from the MySQL representation into PostgreSQL array types. Treat the file as a change you review, not a script you copy. Read the source and target connection settings, confirm the schema rename applies to the database you intend to move, and check which tables the file includes or excludes. Work from the copy of the file that matches the Zammad documentation for your release, and keep a record of the version of pgloader you used.
The array conversions need the closest check because they are the part of the move most likely to fail silently. The file targets columns that hold S/MIME certificates, PGP keys, public links and checklists. In MySQL these values are stored in a form that pgloader must reshape into PostgreSQL arrays, and a mistake can leave the row count correct while the content is wrong or unreadable. After the load, pick a sample of records from each affected table, open them in the Zammad interface or query them directly, and confirm that certificates and keys still parse, that public links still resolve, and that checklist items keep their order and text. Ask your DeployOpen or internal team to record these checks in the test plan so that the same evidence exists for the production run.
Before you rely on the output, confirm two things with the Zammad documentation for your target release rather than from memory: which tables the command file covers, and whether any column added since your current release needs handling. Keep the pgloader log with the migration record, because it lists rejected rows and type warnings that you will need to explain if an auditor or a security reviewer asks how data was moved.
Updating database credentials and configuration after the move
On a package install, the database connection lives in the Zammad configuration directory, where a database configuration file tells the application which PostgreSQL server, database and role to use. Confirm the exact file path and keys for your installed version in the Zammad documentation before editing, because the layout has changed between releases. The password is the sensitive part, so the file should be readable only by the service account that runs Zammad.
- Connection block: Set the adapter to PostgreSQL and enter the host, port, database name, username and password created for the new server.
- Password handling: Keep the password out of shell history, tickets and version control, and restrict the file permissions to the service account.
- Restart order: Stop the Zammad services, apply the change, then start the application and background services so every process reads the same configuration.
- Leftover MySQL settings: Remove old MySQL entries from configuration management and scripts so no process reconnects to the previous server.
- Application check: Sign in, open a ticket with attachments, and review the application log for database connection errors.
Check that the log shows connections only to the PostgreSQL host and that no service still references the MySQL server.
In the Docker Compose stack, database settings are usually passed as environment variables from an .env file in the checkout, and the compose file maps those variables into the application and worker containers. Compare the variable names with the template shipped in the repository for your version, since names and the services that read them are version specific. The database service may still be defined in the compose file, so decide whether you keep it as a container or point the stack at an external PostgreSQL server.
- Environment file: Set the PostgreSQL host, database, user and password variables in
.env, using the names from the shipped template. - Every service: Confirm that the application, scheduler and websocket containers all receive the same values, since one service with old settings will keep failing quietly.
- Secrets in files: Keep
.envout of git, restrict its permissions, and store a copy in your secrets management system. - Container recreation: Recreate the containers after changing environment values so the new settings load.
- Old volume: Keep the old MySQL container and its data volume until the migrated data is confirmed, because that volume is your rollback point.
Run docker compose config and confirm that the resolved configuration shows PostgreSQL values for every service that touches the database.
On Kubernetes, database credentials usually come from Helm values or a Kubernetes Secret referenced by the chart, and the database initialization job reads the same settings. Zammad support covers only the Zammad application, not Kubernetes-specific database issues such as operator behavior, storage classes, network policies or managed database services. Confirm the chart's documented keys in the Zammad Kubernetes installation guide and plan the cluster-side work with your platform team.
- Chart values: Find the database keys for your chart version and set the host, database, user and password to the new PostgreSQL endpoint.
- Secret references: If passwords come from a Secret, update it and confirm that every workload referencing it has restarted with the new value.
- Initialization job: Confirm the job runs with the new configuration and review its logs before the application pods start.
- Network path: Test that pods can reach the PostgreSQL service through your network policies, and confirm any gaps with your platform team.
- Change record: Record every cluster-side change you make, since application support does not cover cluster or database faults.
Check that the rollout finished on all pods and that the application logs show PostgreSQL connections after the restart.
Migration sequence with checks and rollback points
This sequence moves a MySQL or MariaDB Zammad database to PostgreSQL in a controlled order, with a checkpoint and a rollback point after each step so the original database stays available until the migrated system passes verification.
Back up the MySQL source and attachments
The administrator takes a full backup of the MySQL or MariaDB database, the attachment storage, and the Zammad configuration files, then confirms the backup can be restored onto a separate host. This is the first rollback point: if anything later fails, the original system can be rebuilt from these copies. The checkpoint is a restore test that completes and returns the expected ticket count. Keep the source database read-only from this point until verification passes, and do not delete or alter it during the migration.
Rehearse the migration on a copy
The team restores the backup to a non-production host with the same Zammad version and runs the full pgloader command file against a new PostgreSQL 15 or newer database. Record every error, warning and manual fix, including changes needed for the array columns for S/MIME certificates, PGP keys, public links and checklists. The checkpoint is a clean rehearsal that you can repeat from the same backup. Production stays untouched, so a failed rehearsal costs only the time spent on the copy.
Freeze writes and take a final backup
Before the production cutover, the operator announces a maintenance window, stops agents and channel intake, and disables scheduled jobs that write to the database. A final MySQL backup is taken after writes stop, so the migrated data matches the last ticket. The checkpoint is confirmed by comparing ticket and article counts against the rehearsal and checking that the email and channel queues are empty. Until this step completes, the original system remains the live system of record.
Run pgloader against production data
The operator runs pgloader with the reviewed command file against the frozen MySQL source, renames the zammad schema to public as documented, and converts the array columns. The run must finish without errors that were not seen in the rehearsal. The checkpoint is the pgloader summary report, with row counts matching the source for each table. The MySQL database is still intact, so the rollback point is simply to restart Zammad against the original database if the load fails.
Update the database configuration and start Zammad
The operator changes the database settings in the Zammad configuration to point at PostgreSQL, keeping credentials in the database configuration rather than in the code, and starts the application services in order. Confirm that the application connects, that the migration log shows no errors, and that the login page loads. The checkpoint is a healthy application against PostgreSQL. The rollback point is the saved copy of the previous configuration, which restores the MySQL connection if the start fails.
Verify tickets, attachments and integrations
The team checks a defined set of tickets, articles, attachments, customer and organization records, and encrypted or signed mail, comparing each against the MySQL source. It also tests inbound and outbound email, web forms, third-party logins, API calls and any connected systems, and rebuilds or confirms the search index. The checkpoint is a written sign-off listing each check and its result. Only when this sign-off is complete does the MySQL source stop being the fallback, so keep it intact until then.
Reopen service and retain the fallback
After verification passes, the operator re-enables scheduled jobs and channel intake, announces the return to service, and watches logs and queues closely. The MySQL source and final backup are kept for an agreed retention period set by the organization's own policy. The checkpoint is normal ticket flow with no unexplained errors. Ask your team to confirm how long the fallback stays available, because that decision belongs to the owner of the data, not to the migration crew.
How data and configuration move from MySQL to PostgreSQL
The flow starts with the running MySQL-based Zammad and a full backup taken before any change. The pgloader command file then copies the data into PostgreSQL, renaming the zammad schema to public and converting the array columns for S/MIME certificates, PGP keys, public links and checklists. Before cutover, check the array conversions and row counts on a copy, then point the database settings in Zammad at PostgreSQL. If the copy fails validation, the MySQL backup remains the rollback path.
Data and configuration path from MySQL backup to PostgreSQL, with rollback to the backup.
Testing on a copy and planning the downtime window
A rehearsal on a copy of production data is the main control in this migration, because it is the only place where you can measure how long the move takes and find the failures that matter before users are affected. Restore a recent backup into a separate environment with the same Zammad version, the same PostgreSQL target and the same zammad schema layout, then run the pgloader command file against it exactly as you plan to run it in production. Do not reuse a command file that was tested on a smaller or older dataset. Record every error and warning, and keep the output so the production run can be compared line by line.
Test the data that the MySQL-to-PostgreSQL conversion touches most directly: ticket history, articles and attachments, S/MIME certificates, PGP keys, public links and checklists. Confirm that the array columns for S/MIME, PGP, public links and checklists convert correctly by opening real records, not only by counting rows. Check that attachments open and that their sizes and file counts match the source. Then verify that users can sign in with the credentials stored in the database configuration, that the application starts against PostgreSQL, and that the search index is either still valid or must be rebuilt. Confirm the Elasticsearch needs for your target version with the Zammad release notes, and plan the reindex as a separate step. Also test each email channel and webhook against a non-production mailbox so that no real customer messages are sent or fetched from the copy.
Downtime depends on three things: the size of the database and attachment store, how long the write freeze lasts, and how many steps run after the data copy finishes. Stop all writes to Zammad (agents, customer channels and scheduled jobs) before the final load, so that the copy you migrate is complete. The longer the freeze, the more email and chat messages queue up for later processing, so decide in advance how you will handle that backlog. Measure each stage on the copy, including the load, the schema checks, the restart and the smoke tests, and use those measured numbers to set the maintenance window. Do not treat the copy timing as final, because production hardware, I/O and concurrent load will differ.
Plan the rollback path before the window opens. Keep the MySQL server and its last backup intact until the PostgreSQL system has passed acceptance checks, and write down the decision point after which rollback is no longer simple. Ask your Zammad and PostgreSQL administrators to confirm the target PostgreSQL version against the supported list in the PostgreSQL versioning policy, since that policy determines how long the new database will receive fixes. Agree who signs off each acceptance check, and communicate the window to agents and customers with a clear time for when channels will be unavailable.
What makes the database move longer or riskier
How does the amount of data change the length of the database move?
The volume of stored data is one of the main drivers of how long the load step and the verification take. A larger database means a longer pgloader run, a longer window in which the source must stay frozen or the final sync must happen, and more time to compare row counts and spot-check tickets afterward. Ask for a current table size report and the number of ticket articles and attachments before planning the window. Large attachment histories also raise the amount of data that must be backed up and restored if a rehearsal fails and has to be repeated.
Why do array columns in the database make the migration harder?
Array columns are where the documented Zammad path needs explicit fixes, so the number of them in use affects how much testing is needed. The documented command file converts array columns for S/MIME certificates, PGP keys, public links and checklists. If your installation uses these features heavily, or has custom data in similar structures, expect more rows to check after the load. Confirm which features are enabled in your instance before scoping the work, because an unused feature usually means less verification.
Does using S/MIME or PGP certificates add work to the move?
Yes. Keys and certificates stored for S/MIME or PGP need to survive the conversion intact, and a failed conversion can break encrypted email handling without an obvious error on the surface. Plan a specific test: send and receive encrypted and signed messages on the copy, confirm that stored certificates and keys still validate, and confirm that the keys remain available to agents who depend on them. Ask your security team whether key material must be re-verified or re-issued after the move.
How do custom scripts and direct database queries affect the move?
Custom code that reads or writes the database directly was written against MySQL behavior, so it may need changes for PostgreSQL. Queries that depend on MySQL-specific syntax, collation, case handling or data types can fail or return different results. Inventory every script, report, reporting tool and external job that connects to the database, and test each one against the PostgreSQL copy. Scripts that only use the Zammad API are usually less exposed than scripts that connect to the database itself.
How many integrations does Zammad have to keep working after the move?
Each connected system adds a test case and a possible point of failure. Directory sync, email connectors, telephony, monitoring, issue trackers and any automation that calls Zammad can all depend on database behavior or on credentials stored in the configuration. Make a list of every integration, note whether it reads the database directly, and confirm that its credentials and endpoints still work on the copy. Integrations that are reconfigured during a cutover window usually add more time than the data load itself.
Will the Elasticsearch index need rebuilding after the database move?
The database move and the search index are separate steps, but they are often scheduled together, and the search index can lengthen the cutover. Search results, reporting and attachment content search depend on the index being in step with the restored data. Confirm with the Zammad documentation how the index should be handled for your version and environment, then plan time for a rebuild, and tell users that search may be slower or incomplete while it runs. Elasticsearch version changes in the 7.x line add their own work and should be scoped together.
What skills does the team need to run pgloader and PostgreSQL?
The move needs people who can run pgloader with a reviewed command file, read its output, and recognize a partial or silently wrong load. They also need working knowledge of PostgreSQL roles, schemas, permissions, backups and the Zammad database configuration. If that experience is not in-house, the cost of a partner is mostly the time those skills take to acquire and the risk of a rehearsal failing on the first attempt. Ask any provider, including DeployOpen, to name who will run the rehearsal and the cutover, and what they will check.
Choosing a PostgreSQL version and operating it afterwards
Choose the PostgreSQL major version before the migration starts, because that choice sets how long the database stays supported. Per the PostgreSQL versioning policy, PostgreSQL 18 is supported until November 14, 2030, 17 until November 8, 2029, 16 until November 9, 2028, and 15 until November 11, 2027. PostgreSQL 14 reaches end of support on November 12, 2026, so avoid it for a new Zammad database. Zammad needs PostgreSQL 15 or newer, so confirm the version your Zammad release requires on the Zammad software requirements page and select the newest supported release that your operating system packages offer.
Minor PostgreSQL releases do not change the internal storage format, so applying them means replacing executables and restarting the server. Major upgrades are a separate project. The PostgreSQL upgrading documentation describes pg_dumpall with restore, pg_upgrade, and logical replication, and logical replication works between major versions with only several seconds of downtime. Ask your DBA which method your team will rehearse, and confirm that the Zammad release you run supports the target PostgreSQL major version before you commit to it.
PostgreSQL does not include software that detects a failed primary and promotes a standby, so automatic failover needs an external tool that you select, deploy and test. Hot standbys can serve read-only queries, and you must decide between synchronous and asynchronous replication, since synchronous commits wait for standbys. Before cutover, restore a base backup and replay archived WAL to a point in time on a separate host, and confirm that Zammad starts against the restored database. PostgreSQL is released under the PostgreSQL License, a permissive license similar to the BSD and MIT licenses, so the database software itself carries no license fee, but your backup, monitoring and failover tooling may carry its own terms.
How DeployOpen scopes and delivers the database move
DeployOpen plans and carries out the move of a self-hosted Zammad database from MySQL or MariaDB to PostgreSQL inside infrastructure you control. The work starts with a written scope, is rehearsed on a copy of your production data, and ends with documented cutover steps and a handover to your team.
How we scope
- Confirm your current Zammad version, database server and whether it is at Zammad 5.3 or higher before any move is planned.
- Inventory S/MIME certificates, PGP keys, public links and checklists, since these columns need conversion during the move.
- Agree in writing the downtime window, rollback point, cutover date and who from your side approves each step.
How we build
- Prepare the pgloader command file and the PostgreSQL 15 or newer target, sized and configured for your environment.
- Adjust the database configuration so credentials are stored and handled as your security policy requires.
- Rehearse the full migration on a copy of production, then verify ticket, attachment and search behavior before cutover.
How we hand over
- Deliver the tested runbook with each command, expected output, check and rollback step recorded in writing.
- Document the final database layout, credential locations and the backup routine that now covers PostgreSQL.
- Walk your administrators through the cutover results and record open items with owners and dates.
How we support
- Fixed-scope engagements mean the deliverables and timelines are agreed before work starts, so changes go through written scope.
- Ongoing support, upgrades and continuous testing are available as a retainer once Zammad runs on PostgreSQL.
- Plan the Zammad 7 upgrade as a separate written scope, since it depends on this move being completed first.

