Help migrating from 3.0.x (docker) to 4.x (deb)


  • Used Zammad version: 3.x
  • Used Zammad installation source: docker
  • Operating system: ubuntu 20

I installed Zammad some time ago with Docker, and I’d now like to move my installation to an officially supported deployment. I installed a new Ubuntu 20.04 server and I’m attempting a double jump, for both version and arch.

I installed a clear zammad on the new server, then restored the last Docker backup, restored database.yaml and restarted Zammad (manually), after apt install --reinstall. While it appears to run all the database migrations after a couple of minutes I see no big issue in logs but rails service isn’t started. I see no error in the logs but port 3000 isn’t open…

Rails process is running in ps:

zammad   1350574  128  0.2 145376 90532 ?        Rs   08:25   0:01 script/rails server -b -p 3000

I thought this could be the best method but it’s not working. Any suggestion on how to make the move?

After several trial and errors I managed to make the migration.

First of all I apt purge zammad, but this wasn’t enough I as probably messed up something, so I had to manually delete /etc/systemd/system/zammad* and other non empty dirs not removed by the purge.

After that I installed the latest 3.5, as it was the closest version to the 3.x I had in Docker, tested it was working as a clean install.

I didn’t investigate but from what I could see all the stuff is in the database, so instead of running a full restore which would certainly break the installation I decided to restore postgres only. I tweaked the restore script to skip file restore and skip Zammad restart.

Now I had a 3.0 db with 3.5 code. Assuming best practices I meant to start Zammad and have it execute all the db migrations. As extra precaution, and as I didn’t want to dig into the update procedure, I ran a package reinstall, to ensure all the update steps were run as expected.

So I ran apt install --reinstall zammad=3.5.0-1605097372.e4949483.focal.

This deployed the package once again, ran the upgrade steps and the started Zammad, executing the necessary database update.

The only thing left to do was Elastic reconfiguration:

zammad run rails r "Setting.set('es_url', 'http://localhost:9200')"
zammad run rake searchindex:rebuild

Everything is running fine. The only thing I’ve spotted as not migrated was the email signature. I don’t understand why.

Oh, last thing: branding. I had to copy over /opt/zammad/public/assets/images/*.png.

If there’s anything I’ve missed…

1 Like

Attention to those that found this thread:
apt purge zammad is a dangerous operation and possibly removes productive data from /opt/zammad/.

This operation can’t be undone and only doesn’t matter if you’re restoring to the affected system.
We strongly encourage to follow the tested and suggested way from our documentation:

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