Can't run Back-Up Script

Infos:

  • Used Zammad version: 5.0.x
  • Used Zammad installation type: package
  • Operating system: CentOS 8.5.2111
  • Browser + version: Microsoft Edge 98.0.1108.62

Expected behavior:

I’ve already run the back-up helper script. When I run “zammad_backup.sh” as root I get the following error message:

pg_dump: [archiver (db)] connection to database “zammad” failed: FATAL: Ident authentication failed for user “zammad”

Error(1) - Database credentials are wrong or database server configuration is invalid
→ BACKUP WAS NOT SUCCESFUL

When I run “zammad_backup.sh” as zammad-User I get the following error:

Error(1) - Creation of backup files was not possible. Double check permissions.
→ BACKUP WAS NOT SUCCESSFUL

When I try to run the command with “sudo zammad_backup.sh” I am asked for authentication-password, which wasn’t set.

Also trying to get root as zammad-user fails, beacuse a password is needed.

Actual behavior:

  • As described above

Steps to reproduce the behavior:

1 Like

Hello
I have the same issue

What exact permission must have : /var/tmp/zammad_backup/ folder ?

I have the same problem. Were you able to solve it?

No. I’ve tried to give permission in the pg_hba.conf at /var/lib/pgsq/data/pg_hba.conf and restarted the db, as it is suggested in the zammad-backUp-documentary and the postgresql-documentary, but I still get the same error.

I am having the same problem as well…

At first it said that I had an empty password so I ran the helper script… Now it is telling me this:

pg_dump: /usr/pgsql-14/lib/libpq.so.5: no version information available (required by pg_dump)
pg_dump: error: connection to database “zammad” failed: connection to server at “localhost” (::1), port 5432 failed: FATAL: Ident authentication failed for user “zammad”

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

Also I just upgraded to 5.1 after having issues with the backup, hoping that it was going to fix them. Unfortunately it didn’t help.

Any help would be appreciated…

It seems that the password in the file {$ZAMMAD_DIR}/config/database.yml is actually invalid. At least, I can’t log in to the postgres server locally using that password.

My backup has been offline since Jan apparently - this isn’t my primary backup method so I didn’t notice until recently.

OK - re-ran the helper script and it’s all working OK now. Worth a try for anyone else having this problem.
https://docs.zammad.org/en/latest/appendix/backup-and-restore/little-helpers.html#reset-db-password

How did you run the “Back-Up-Script” after the successful re-run of the “Helper-Script”?
Tried it with “su - zammad” and “sudo” but nothing worked, after several re-runs.

Could you look up, if there is a password in your file “/opt/zammad/config/database/database.yml” under #### postgresql config ##### ?
The password-field is empty and out-commented in my file and the back-up-Script onyl sets a Password in the “/opt/zammad/config/database.yml”-file for me.

Thank you!

Kindly read the documentation. It literately holds your hand:
https://docs.zammad.org/en/latest/appendix/backup-and-restore/index.html

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