Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEFAULT_AUTH override is not respected #378

Open
jwillmer opened this issue Oct 16, 2024 · 0 comments
Open

DEFAULT_AUTH override is not respected #378

jwillmer opened this issue Oct 16, 2024 · 0 comments
Labels

Comments

@jwillmer
Copy link
Contributor

jwillmer commented Oct 16, 2024

Summary

I want to backup multiple databases so I don't want to modify the DEFAULT_AUTH variable. However the DB0X-AUTH variable is not respected.

Steps to reproduce

I reduced my backup config to only one database for testing. This is a working configuration:

        environment:
          - ...
          - DEFAULT_AUTH=local         
          - DB01-AUTH=local
          - DB01_TYPE=pgsql
          - DB01_HOST=postgres
          - DB01_USER=${POSTGRESUSER}
          - DB01_PASS=${POSTGRESPW}
          - DB01_NAME=ALL
          - DB01_SPLIT_DB=TRUE

With message:

2024-10-16.12:05:42 [INFO] ** [db-backup01] Starting Manual Backup for db-backup01
2024-10-16.12:05:45 [NOTICE] ** [01-postgres__ALL] Dumping PostgresSQL database: 'postgres' and compressing with 'gzip'
2024-10-16.12:05:45 [INFO] ** [01-postgres__ALL] DB Backup of 'pgsql_postgres_postgres_20241016-120544.sql.gz' completed successfully
2024-10-16.12:05:45 [NOTICE] ** [01-postgres__ALL] Generating MD5 sum for 'pgsql_postgres_postgres_20241016-120544.sql.gz'
2024-10-16.12:05:45 [NOTICE] ** [01-postgres__ALL] Backup of 'pgsql_postgres_postgres_20241016-120544.sql.gz' created with the size of 95302 bytes
2024-10-16.12:05:46 [NOTICE] ** [01-postgres__ALL] DB Backup for 'postgres' time taken: Hours: 0 Minutes: 00 Seconds: 02
2024-10-16.12:05:46 [INFO] ** [01-postgres__ALL] Cleaning up old backups on filesystem
2024-10-16.12:05:46 [NOTICE] ** [01-postgres__ALL] Dumping PostgresSQL database: 'local' and compressing with 'gzip'
2024-10-16.12:05:46 [INFO] ** [01-postgres__ALL] DB Backup of 'pgsql_local_postgres_20241016-120546.sql.gz' completed successfully
2024-10-16.12:05:46 [NOTICE] ** [01-postgres__ALL] Generating MD5 sum for 'pgsql_local_postgres_20241016-120546.sql.gz'
2024-10-16.12:05:47 [NOTICE] ** [01-postgres__ALL] Backup of 'pgsql_local_postgres_20241016-120546.sql.gz' created with the size of 446 bytes
2024-10-16.12:05:47 [NOTICE] ** [01-postgres__ALL] DB Backup for 'local' time taken: Hours: 0 Minutes: 00 Seconds: 01
2024-10-16.12:05:47 [INFO] ** [01-postgres__ALL] Cleaning up old backups on filesystem
2024-10-16.12:05:47 [INFO] ** [01-postgres__ALL] Backup 01 routines finish time: 2024-10-16 12:05:47 CEST with exit code 0
2024-10-16.12:05:47 [NOTICE] ** [01-postgres__ALL] Backup 01 routines time taken: Hours: 0 Minutes: 00 Seconds: 03

Broken configuration:

        environment:
          - ...
          # - DEFAULT_AUTH=local         
          - DB01-AUTH=local
          - DB01_TYPE=pgsql
          - DB01_HOST=postgres
          - DB01_USER=${POSTGRESUSER}
          - DB01_PASS=${POSTGRESPW}
          - DB01_NAME=ALL
          - DB01_SPLIT_DB=TRUE

With error message:

2024-10-16.12:07:31 [INFO] ** [db-backup01] Starting Manual Backup for db-backup01
psql: error: connection to server at "postgres" (172.20.0.4), port 5432 failed: FATAL:  database "admin" does not exist
2024-10-16.12:07:33 [INFO] ** [01-postgres__ALL] Backup 01 routines finish time: 2024-10-16 12:07:33 CEST with exit code 0
2024-10-16.12:07:33 [NOTICE] ** [01-postgres__ALL] Backup 01 routines time taken: Hours: 0 Minutes: 00 Seconds: 01

What is the expected correct behavior?

Relevant logs and/or screenshots

Environment

I use version/tag 4.1.4 but I could also reproduce it with the develop version.

@jwillmer jwillmer added the bug label Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant