Re: trouble with pg_dumpall

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 27 Feb 2008, Tena Sakai wrote:

 +++++++++
 PGUSER: postgres
 PGDATABASE: canon
 PGHOST: localhost
 PGPASSFILE: /usr/local/pgsql/.pgpass
 PGDATA: /usr/local/pgsql/data
 HOME: /usr/local/pgsql
 PATH: /usr/local/pgsql/bin:/bin:/usr/kerberos/bin:/usr/local/java/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/ant/bin:.
Password:
pg_dumpall: could not connect to database "template1": fe_sendauth: no password supplied

Hey Tena,

What user is this script running as when running under cron?

Might be time to break out strace and run it like this:

strace -fe trace=file /usr/local/pgsql/bin/pg_dumpall > $filename 2> strace.out


As you can see, I am afraid my point still holds.

Regards,

Tena Sakai
tsakai@xxxxxxxxxxxxxx


-----Original Message-----
From: pgsql-admin-owner@xxxxxxxxxxxxxx on behalf of Steve Holdoway
Sent: Wed 2/27/2008 7:33 PM
To: pgsql-admin@xxxxxxxxxxxxxx
Subject: Re:  trouble with pg_dumpall

On Wed, 27 Feb 2008 17:12:40 -0800
"Tena Sakai" <tsakai@xxxxxxxxxxxxxx> wrote:

Here's your problem.
  . .bashrc

You have an extremely minimal environment when running from cron, and you certainly *aren't* running from the home directory of the relevant user. You need to set up your PATH and HOME manually, and cd to your home directory before sourcing .bashrc for this to work.

. ~/.bashrc *might* work, but it's better to be specific (:

hth,

Steve



--
Jeff Frost, Owner 	<jeff@xxxxxxxxxxxxxxxxxxxxxx>
Frost Consulting, LLC 	http://www.frostconsultingllc.com/
Phone: 650-780-7908	FAX: 650-649-1954

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux