Docker compose restore

Infos:

  • Used Zammad version: 6.0
  • Used Zammad installation type: docker compose
  • Operating system:
  • Browser + version:

does anybody know, how to “restore” a backup in docker? i only found quiet old ways, but they are not working anymore :frowning:

If you have all attachments in the database, stopping all containers except for the database one and then restoring your database dump against standard in to the container should do the trick.

Something like this might work:
cat backup.sql | docker compose exec -T zammad-postgresql psql --username zammad --dbname zammad_production

You may also have to drop and re-create the database in question.
Note that I have not verified above command. Proceed with care and snapshots.

Is there any futher development on this question?

I want to move my Zammad installation from package install to docker, but I have my files in the filesystem need to restore them, too. There is an old thread in this forum linking to this GitHub comment: How to restore the zammad backup? · Issue #68 · zammad/zammad-docker-compose · GitHub

But this is no longer working with the new docker compose layout. I do understand that running Zammad in docker is not officially supported, but someone should have found a way to restore an existing backup.

Yeah move your attachments to the database so you don’t have to restore attachments into the file system.