postgres backup questions #581
Labels
No Label
bug
data loss
design finalized
good first issue
new feature area
question / support
security
waiting for response
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: borgmatic-collective/borgmatic#581
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What I'm trying to do and why
Backup a postres database cluster (pg_dumpall) because having backups is livesaver. Different server, completely different system and service, than discussed in #580
Normal file backups are working since days, "native" dumps, created by a cron, included. So I'm safe.
Now I want to add postgres dump functionality by borgmagic, but I struggle with password / superuser - not sure how to do it.
Steps to reproduce (if a bug)
postgres
added in config:
password is provided in .env and docker-compose.yml - even have it directly in config does not work.
Actual behavior (if a bug)
Output:
some v2-Details:
Expected behavior (if a bug)
successful dump
Other notes / implementation ideas
not sure, what to do different, to have the dump run as superuser
postgres
For creating manual dump I run
sudo -u postgres pg_dumpall...
Environment
borgmatic version: 1.7.1
borgmatic installation method: Docker b3vis/borgmatic
Borg version: borg 1.2.2
Python version: Python 3.10.6
Database version (if applicable): psql (PostgreSQL) 10.21 (Ubuntu 10.21-0ubuntu0.18.04.1)
operating system and version: see above
Postgres has multiple ways of authenticating connections, and I'm not sure which ones you have enabled. Can I get a peek at your Postgres
pg_hba.conf
file where that's configured?My guess based on the behavior you're seeing is that Postgres is configured to accept
postgres
superuser connections only from processes running as thepostgres
Unix user. But the borgmatic container you're using isn't running as that user (which is fine and expected). Instead (or in addition), Postgres needs to be configured to accept connections over TCP. This is controlled by themethod
inpg_hba.conf
.got it.
was a tiny almost invisible mistake in hostname config.
Sorry about that an thx for your help.
Glad to hear that did it!