Backup don´t work with zammad_backup.sh

Infos:

  • Used Zammad version: 5.1.x
  • Used Zammad installation type: (source, package, docker-compose, …) source
  • Operating system: CentOS Linux release 7.9.2009 (Core)
  • Browser + version:

I try to migrate to a new host. At first I got the empty DB password message so i try the zammad_db_user_helper.sh. The empty password message is gone and I got a new error with the postgresql backup. Can anyone help me out.

Expected behavior:

Try to backup the instance with the backup scripts in /opt/zammad/contrib/backup

Actual behavior:

Zammad backup started - Di 10. Mai 15:22:06 CEST 2022!

creating file backup…
… as full dump
creating postgresql backup…
pg_dump: unknown option »–dbname«
try »pg_dump --help« for Information.

ERROR(1) - Database credentials are wrong or database server configuration is invalid.

#-> BACKUP WAS NOT SUCCESSFUL

Steps to reproduce the behavior:

start the backup script again

Well that’s odd because it is:

You may want to let us know about your pgsql version. Nobody can help you with that information.

–dbname != -dbname

Maybe the - character got copied wrong from a website?

Thanks for the fast reply this is the pgsql version
psql (9.2.24, Server 11.15)

You do read release notes and documentation before updating, right?
https://docs.zammad.org/en/latest/prerequisites/software.html#database-server

thanks for thinking along.
This solved my problem.

  1. Check the installed version(s) of pg_dump:
find / -name pg_dump -type f 2>/dev/null
  1. My output was:
/usr/pgsql-9.3/bin/pg_dump
/usr/bin/pg_dump
  1. There are two versions installed. To update pg_dump with the newer version:
sudo ln -s /usr/pgsql-9.3/bin/pg_dump /usr/bin/pg_dump --force

This will create the symlink to the newer version.

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