Lists: | pgsql-hackers |
---|
From: | "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au> |
---|---|
To: | "Hackers" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | pg_dump |
Date: | 2003-05-20 04:24:40 |
Message-ID: | 070601c31e87$e7d65ef0$6500a8c0@fhp.internal |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Hi Guys,
I'm working on trying to get phpPgAdmin to stream the output of pg_dump to
the user.
However, it's impossible to set the password!
I believe it doesn't respect the PGPASS variable anymore, so what do I do?
The problem is that the script itself will be running as the 'www' user, so
it's also not possible to use a .pgpass file.
What on earth can I do?
Chris
From: | "Shridhar Daithankar" <shridhar_daithankar(at)persistent(dot)co(dot)in> |
---|---|
To: | "Hackers" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_dump |
Date: | 2003-05-20 10:08:53 |
Message-ID: | 3ECA4C0D.13833.86E8DD@localhost |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On 20 May 2003 at 12:24, Christopher Kings-Lynne wrote:
> I believe it doesn't respect the PGPASS variable anymore, so what do I do?
>
> The problem is that the script itself will be running as the 'www' user, so
> it's also not possible to use a .pgpass file.
Will ident authentication and a read-all access for a www database user would
help?
HTH
Bye
Shridhar
--
Worst Month of 1981 for Downhill Skiing: August. The lift lines are the
shortest, though. -- Steve Rubenstein
From: | Georgi Chorbadzhiyski <gf(at)unixsol(dot)org> |
---|---|
To: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> |
Cc: | Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_dump |
Date: | 2003-05-20 12:43:18 |
Message-ID: | 3ECA22E6.4010307@unixsol.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Christopher Kings-Lynne wrote:
> I'm working on trying to get phpPgAdmin to stream the output of pg_dump to
> the user.
>
> However, it's impossible to set the password!
>
> I believe it doesn't respect the PGPASS variable anymore, so what do I do?
I think the variable is called PGPASSWORD. Example backup script bellow:
#!/bin/sh
umask 0177
PATH="/bin:/sbin:/usr/bin:/usr/sbin"
TODAY=$(date +%a)
DUMPDIR="/backup/"
echo "DB backup start: `date`"
# Do not suck all CPU time...
renice 20 $$
DATA="pgsql"
PGSQL="/usr/local/pgsql/bin/psql"
PGDUMP="/usr/local/pgsql/bin/pg_dump"
PGUSER="pgsql"
PGPASSWORD="blahblah"
export PGUSER PGPASSWORD
DBTYPE="postgres"
OUT="${DUMPDIR}/${TODAY}/${DBTYPE}"
[ -d ${OUT} ] || mkdir -p ${OUT}
DBS=$($PGSQL -tq -d template1 -c "select datname from pg_database" | \
grep -v template)
for DB in $DBS
do
echo "Dumping postgres db: $DB"
$PGDUMP -D $DB -Z 5 -f $OUT/${DB}.sql.gz
done
--
Georgi Chorbadzhiyski
http://georgi.unixsol.org/