Hi Jeff,
> I bet the $HOME environment variable isn't
> being set by your cron implementation.
> Try putting an echo $HOME in your script and
> see if it's defined.
I did. Here's the result:
+++++++++
PGUSER: postgres
PGDATABASE: canon
PGHOST: localhost
PGPASSFILE: /usr/local/pgsql/.pgpass
PGDATA: /usr/local/pgsql/data
+++++++++
HOME: /usr/local/pgsql
Password:
pg_dumpall: could not connect to database "template1": fe_sendauth: no password supplied
> Is this gentoo perhaps?
It is Redhat Advanced Server 4 on Dell hardware.
Regards,
Tena
-----Original Message-----
From: Jeff Frost [mailto:jeff@frostconsultingllc.com]
Sent: Wed 2/27/2008 6:59 PM
To: Tena Sakai
Cc: pgsql-admin@postgresql.org
Subject: RE: [ADMIN] trouble with pg_dumpall
On Wed, 27 Feb 2008, Tena Sakai wrote:
> Hi Jeff,
>
> Thanks for your reply, but I think you might
> have missed an earlier thread. I am afraid
> I have tried what you suggest. Below's my
> previous post.
>
>
> filename=`date +%G%m%d.%w`.gz
> /usr/local/pgsql/bin/pg_dumpall > $filename
>
> Here's what I get back as output is:
>
> Password:
> pg_dumpall: could not connect to database "template1": fe_sendauth: no password supplied
>
> This is not what happened on 8.2.4. I read 8.3.0 man
> page on pg_dumpall. Here's what it told me:
>
> The file .pgpass in a user's home directory or the file referenced
> by PGPASSFILE can contain passwords to be used if the connection
> requires a password (and no password has been specified otherwise).
>
> I have .pgpass in /usr/local/pgsql and when I type
> psql dbname
> It lets me in without asking the password. So I don't
> understand why I get what I get: fe_sendauth: no password supplied
>
Please reply-all and don't top-post. :-)
I bet the $HOME environment variable isn't being set by your cron
implementation. Is this gentoo perhaps? Try putting an echo $HOME in your
script and see if it's defined.
--
Jeff Frost, Owner <jeff@frostconsultingllc.com>
Frost Consulting, LLC http://www.frostconsultingllc.com/
Phone: 650-780-7908 FAX: 650-649-1954