[KLUG Members] Postgresql + $HOME/.pgpass

Adam Tauno Williams adam at morrison-ind.com
Fri Oct 7 14:15:47 EDT 2005


>   I'm having problems getting pg_dumpall to work from a script. The idea 
> is to have a cron job run overnight to backup the database and vacuum 
> it. I'm using the following command line:
> /usr/bin/pg_dumpall -vc -U ke4rit > /work/postgres/postgresql.dump
> I have the $HOME/.pgpass file created as /root/.pgpass and the 
> permissions are 0600 per the one scrap of into I could find about it.
> The format of the .pgpass file is:
> localhost:5432:template1:ke4rit:<password removed> as suggested.
> I keep getting the following error as it's being run from root:
> dabatase:~# /usr/bin/pg_dumpall -vc -U ke4rit > 
> /work/postgres/postgresql.dump
> pg_dumpall: could not connect to database "template1": FATAL:  IDENT 
> authentication failed for user "ke4rit"

Right here is your answer: "IDENT authentication failed".  You want to
use password authentication.  Adjust pg_hba.conf accordingly - or if
ke4rit is your system account you can use pam authentication and you
don't have to set a password inside postgresql.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://www.kalamazoolinux.org/pipermail/members/attachments/20051007/2bfb0ec9/attachment.bin


More information about the Members mailing list