Re: trouble with pg_dumpall - Mailing list pgsql-admin

From Jeff Frost
Subject Re: trouble with pg_dumpall
Date
Msg-id Pine.LNX.4.64.0802271856370.14059@discord.home.frostconsultingllc.com
Whole thread Raw
In response to Re: trouble with pg_dumpall  ("Phillip Smith" <phillip.smith@weatherbeeta.com.au>)
List pgsql-admin
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

pgsql-admin by date:

Previous
From: "Tena Sakai"
Date:
Subject: Re: trouble with pg_dumpall
Next
From: Jeff Frost
Date:
Subject: Re: trouble with pg_dumpall