Docker-compose: Restore backup


I’m testing Zammad in my local docker-compose environment. I cloned the repo from the link above and did a docker-compose up -d right away. The system is working fine.

I am able to do a full backup with

docker-compose exec zammad-backup /usr/local/bin/ zammad-backup-once

as mentioned in this thread: How to Restore Zammad Backup in Docker-Compose Install

For restoring in a docker-compose environment, I followed the instructions at which were linked in the thread mentioned previously.

When I try to drop the database with the command

docker-compose exec zammad-postgresql su -c 'dropdb zammad_production' - postgres

I get an error…

Expected behavior:

  • Database should be dropped

Actual behavior:

  • The Error dropdb: could not connect to database template1: FATAL: role "postgres" does not exist is reported.

Steps to reproduce the behavior:

  • Clone the docker-compose github repo
  • Start the instances with docker-compose up -d
  • Create a backup with the command mentioned above
  • Follow the restore guide (see link above)

As postgresql requires some love in never versions ( see ) it’s possible that the user / role in your enviroment is not postgres.
That being said, as this is dependent on your enviroment nobody here will be able to help you.

Try zammad instead of postgres which is my try to dig in the dark.

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