PostgreSQL backup script

Started by Søren Neigaardalmost 23 years ago2 messagesgeneral
Jump to latest
#1Søren Neigaard
s.neigaard@mobilethink.dk

I want to make a backupscript that uses pg_dump, but if do a:

pg_dump test > test.dmp

It gives me:

Connection to database 'test' failed.
fe_sendauth: no password supplied

What am I missing here, I need this to work without passwords, so it can
work automatic in my script?

Med venlig hilsen/Best regards
Søren Neigaard
System Architect
................................
Mobilethink A/S
Arosgaarden
Åboulevarden 23, 4.sal
DK - 8000 Århus C
Telefon: +45 86207800
Direct: +45 86207810
Fax: +45 86207801
Email: s.neigaard@mobilethink.dk
Web: www.mobilethink.dk
................................

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Søren Neigaard (#1)
Re: PostgreSQL backup script

=?iso-8859-1?Q?S=F8ren_Neigaard?= <s.neigaard@mobilethink.dk> writes:

I need this to work without passwords

Then don't use a password-based authentication mechanism.
If you are on an OS that supports IDENT over Unix-socket connections,
that's often a pretty good alternative for verifying local connections.

If you are on PG 7.3 you could also consider keeping passwords in
~/.pgpass.

regards, tom lane