Answer the question
In order to leave comments, you need to log in
Unable to dump pg_dump. How to deal with roles in Postgres?
I've been fighting for an hour now, I don't understand why such a bunch of commands have been made, which the devil knows how they work.
The task is simple: dump the base. Is there a way to find out what roles and what privileges apply to a database? Who has the ability to dump? Right now I only get this:
$ sudo -u postgres psql
\connect mydb;
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO backup;
GRANT
$ psql -d mydb
psql (12.1 (Ubuntu 12.1-1.pgdg18.04+1), сервер 10.10 (Ubuntu 10.10-0ubuntu0.18.04.1))
Введите "help", чтобы получить справку.
trading=> GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO backup;
WARNING: no privileges were granted for "sent_messages"
GRANT
$ pg_dump -U backup mydb > 1.bak
pg_dump: [archiver (db)] connection to database "mydb" failed: FATAL: Peer authentication failed for user "backup"
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question