I have created a .pgpass file in my home directory which looks like this
.pgpass
localhost:5432:somedb:someuser:somepass
I am using a shell script which creates a directory and puts a pg_dump of somedb there :
somedb
mkdir directory pg_dump somedb > directory/somefile.dump
It still prompts for the password.
Where is the mistake here ?
Did you try specifying the host, user, & db?
pg_dump -U someuser -h localhost somedb > directory/somefile.dump
2.1m questions
2.1m answers
60 comments
57.0k users