Zammad - Database Migration


  • Used Zammad version: 5.4.1

  • Used Zammad installation type: source

  • Operating system: Ubuntu 20.04.6 LTS

  • Browser + version: Edge 114.0.1823.55

  • MySQL Version: 8.0.33

  • Postgres Version: 12.15

Expected behavior:

Actual behavior:

  • Attempt to follow guide (labeled as proof of concept I know), fails to migrate tables.
    Stops and reverting back to MySQL breaks Zammad (error 500) on web gui.

Steps to reproduce the behavior:

  • Follow all steps in link to migrating, fails to migrate tables with Error 76.

Not an expert in MySQL or Postgres. Know enough to mess things up lol.
Much help or discussion is appreciated. Can give more details as needed. Working off memory as I reverted from backup after breaking last night.

Can you please elaborate what was the last command that you’ve run to get error 76? And more details on the error message itself?

Thank you!

Sorry. When I run the actual pgloader script to convert the database from MySQL to Postgres.

Dry run works fine as all it’s doing to my knowledge is tests the connection between the two databases.
Running the command with verbose flag presents a bunch of Error 76’s followed by “What am I doing here?”

My thought was that the script is finding tables that can’t convert properly due to being a table type in MySQL and not supported in Postgres?

Would also be interesting to have the mysql and postgres database versions.

Sorry about that, thought I included it! I have added it to original post and down below
Running mysql -V and SELECT version(); in postgres:

MySQL - 8.0.33
Postgres - 12.15

Smells like this issue:

Users seemed to solve this by building pgloader from source. Might be worth a try.

1 Like

I will definitely give this a shot. Will come back later today with results!

1 Like

Okay so building pgloader from source seemed to resolve those errors. After migrating and spinning back up the web UI, I am presented with this:

Thank you all so far for your help.

Following up: here are the last few lines of my production.log file. This is repeated, from as far as I can see, the past couple hundred lines.

I, [2023-06-22T22:53:28.874964#367611-5380]  INFO -- : Cleanup of left over locked delayed jobs 2023-06-22 22:53:28 UTC started.
I, [2023-06-22T22:53:28.876173#367611-110300]  INFO -- : ProcessScheduledJobs running...
I, [2023-06-22T22:53:31.570179#367703-5380]  INFO -- : Using Zammad's file store as Rails cache store.
I, [2023-06-22T22:53:31.570360#367703-5380]  INFO -- : Using the File back end for Zammad's web socket session store.
I, [2023-06-22T22:53:33.607120#367703-5380]  INFO -- : Cleanup of left over locked delayed jobs 2023-06-22 22:53:33 UTC started.
I, [2023-06-22T22:53:33.608484#367703-110300]  INFO -- : ProcessScheduledJobs running...

Nevermind I fixed it! I had to edit my database config to use the default database.
In /opt/zammad/config/database.yml change:

  <<: *default
  database: zammad_prod


  <<: *default
  database: zammad

Must’ve been too quick to post here before troubleshooting further…


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.