Backup/Restore and migrate to new Server

Infos:

  • Used Zammad version: 5.2.3.-32
  • Used Zammad installation type: docker-compose
  • Operating system: Ubuntu 20.04.6 LTS
  • Browser + version: Chrome 131.0.6778.205

Expected behavior:

Connect to Postgres-Database via CLI to restore Dump-File.

Actual behavior:

After entering into the container an try to connect to Postgres

# psql -U postgres -p 5432 -h localhost
psql: error: connection to server at "localhost" (::1), port 5432 failed: FATAL:  role "postgres" does not exist

Steps to reproduce the behavior:

Connect to container via

docker exec -it <containername> sh

and start psql - error occurs.

Background

We would like to migrate our old Zammad 5.2 Docker-Compose to a new Docker-Compose Environment. I would like to use the dump file created by the Backup-Container and import this dump to the new installation. I am unable to get into the Postgres-Database to restore the old Database to the new location.

Why do you want to dump using Postgresql?
Why don’t you use the backup container from Zammad?
docker compose down
docker compose up -d
Wait until the backup is complete.

scp the backup.

The whole restore process is described here: Release v6.0.0 · zammad/zammad-docker-compose · GitHub

Just be careful. The postgress volume was marked as “external” by docker compose after that.