coolify icon indicating copy to clipboard operation
coolify copied to clipboard

[Bug]: Supabase PostgreSQL Backup Failure: Peer authentication failed for user

Open that0n3guy opened this issue 10 months ago • 1 comments

Error Message and Logs

Running a backup for a single database fails. Running it for all databases says success, but actually fails (notice its only 20B):

Image

Steps to Reproduce

  1. click into postgres project -> environtment (production) -> resource (postgres)
  2. click on Backups tab
  3. click on a scheduled backup
  4. Click "backup now"
  5. Failed backup will follow after a couple seconds.

Example Repository URL

No response

Coolify Version

v4.0.0-beta.397

Are you using Coolify Cloud?

No (self-hosted)

Operating System and Version (self-hosted)

Ubuntu 24.04

Additional Information

Trying a pg_dump command in the container terminal results in same error.

Manually, if I use the -h flag, it will give me a dump and not error. Example of it failing, and working just by adding -h localhost (from postgres container terminal)

Image

that0n3guy avatar Mar 11 '25 21:03 that0n3guy

In my testing, adding -h localhost to this line: https://github.com/coollabsio/coolify/blob/f28eefe603fab5becabd8821746304fa622b5802/app/Jobs/DatabaseBackupJob.php#L396 and this: https://github.com/coollabsio/coolify/blob/f28eefe603fab5becabd8821746304fa622b5802/app/Jobs/DatabaseBackupJob.php#L398

Seems to solve my backup issues.

that0n3guy avatar Mar 19 '25 00:03 that0n3guy