Re: trouble with pg_dumpall

From: "Tena Sakai" <tsakai(at)gallo(dot)ucsf(dot)edu>
To: "Tena Sakai" <tsakai(at)gallo(dot)ucsf(dot)edu>, "Phillip Smith" <phillip(dot)smith(at)weatherbeeta(dot)com(dot)au>, <pgsql-admin(at)postgresql(dot)org>
Subject: Re: trouble with pg_dumpall
Date: 2008-02-28 02:26:54
Message-ID: FE44E0D7EAD2ED4BB2165071DB8E328C0378F0D5@egcrc-ex01.egcrc.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi Everybody,

I have turned every stone over and I am
pretty close to convince myself that the
way I am doing doesn't work. I can't
believe I am the one to discover such a
bug. I would love to hear somebody prove
me wrong.

But in the meantime, maybe I will take a
bit different approach. Namely:

Is there anyway I can pass the password to
pg_dumpall via crontab?

Maybe via argv? Then I would be able to
say via crontab entry:

xx xx * * * bash /usr/local/pgsql/cronbase/moo.sh "password!"

Of course, what I am stating above doesn't work.
I am asking if you have any suggestion in a
similar fashion.

I am all ears.

Regards,

Tena Sakai
tsakai(at)gallo(dot)ucsf(dot)edu

-----Original Message-----
From: pgsql-admin-owner(at)postgresql(dot)org on behalf of Tena Sakai
Sent: Wed 2/27/2008 5:40 PM
To: Phillip Smith; pgsql-admin(at)postgresql(dot)org
Subject: Re: [ADMIN] trouble with pg_dumpall

Hi Phillip,

Thank you for your suggestion. So my script
file now looks like:

#! /bin/bash

PGUSER=postgres
PGDATABASE=canon
PGHOST=vixen
PGPASSFILE=winkwink
PGDATA=/usr/local/pgsql/data
LD_LIBRARY_PATH=/usr/local/pgsql/lib
export PGUSER PGDATABASE PGHOST PGPASSFILE PGDATA LD_LIBRARY_PATH
# echo +++++++++
# echo PGUSER: $PGUSER
# echo PGDATABASE: $PGDATABASE
# echo PGHOST: $PGHOST
# echo PGPASSFILE: $PGPASSFILE
# echo PGDATA: $PGDATA

filename=`date +%G%m%d.%w`.gz
/usr/local/pgsql/bin/pg_dumpall > $filename

and I still get the same output:

Password:
pg_dumpall: could not connect to database "template1": fe_sendauth: no password supplied

I just don't get it...

Tena Sakai
tsakai(at)gallo(dot)ucsf(dot)edu

-----Original Message-----
From: Phillip Smith [mailto:phillip(dot)smith(at)weatherbeeta(dot)com(dot)au]
Sent: Wed 2/27/2008 5:19 PM
To: Tena Sakai; pgsql-admin(at)postgresql(dot)org
Subject: RE: [ADMIN] trouble with pg_dumpall

Try explicitly setting those variables in your script:
$PGUSER
$PGDATABASE
$PGHOST
$PGPASSFILE
$PGDATA

THINK BEFORE YOU PRINT - Save paper if you don't really need to print this

*******************Confidentiality and Privilege Notice*******************

The material contained in this message is privileged and confidential to
the addressee. If you are not the addressee indicated in this message or
responsible for delivery of the message to such person, you may not copy
or deliver this message to anyone, and you should destroy it and kindly
notify the sender by reply email.

Information in this message that does not relate to the official business
of Weatherbeeta must be treated as neither given nor endorsed by Weatherbeeta.
Weatherbeeta, its employees, contractors or associates shall not be liable
for direct, indirect or consequential loss arising from transmission of this
message or any attachments
e-mail.

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Jeff Frost 2008-02-28 02:31:33 Re: trouble with pg_dumpall
Previous Message Tena Sakai 2008-02-28 01:40:47 Re: trouble with pg_dumpall