Solved: I added .pgpass in the home.
I have the line:
host all all 127.0.0.1/32 md5
in /etc/postgresql/9.4/main/pg_hba.conf but when I run:
I get:
pg_dump: [archiver (db)] connection to database "dbase" failed:
FATAL: Peer authentication failed for user "postgres"
The Problem you have is, that if u dont define the Host, your system will decide.
explicit add "-h localhost", this will fix it
If adding -h localhost doesn’t work you can try adding -h 127.0.0.1
pg_dump -h 127.0.0.1 -U <username> -d <database_name> -W > bk_name.sql
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With