Thierry,
I think you meant to say "ps -e e" (at least that is what it is on my
RedHat Linux servers). I also realise the security issue with this.
However, if you really HAVE to use password authentication and you really
HAVE to dump your data then you are already painted into a corner so to
speak. I apologies for not mentioning the security issue in my post.
The reason the "export" is needed for pg_dumpall is because it is not
very password friendly and calls a combination of psql and pg_dump to do
it's job. I recall when looking at the pg_dumpall script that it doesn't
actually pass a username/password to psql, or if you do specify the -U
then you get an "unknown option" error when it tries to run pg_dump.
Tim Frank
>>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<
On 20/03/01, 3:33:52 AM, Thierry Besancon <Thierry.Besancon@prism.uvsq.fr>
wrote regarding Re: [ADMIN] Backing up postgresql databases:
> Dixit Tim Frank <tfrank@registrar.uoguelph.ca> (le Tue, 20 Mar 2001
00:14:11 GMT) :
> » Have your shell script do
> »
> » export PGUSER=username
> » export PGPASSWORD=password
> »
> » before you run pg_dumpall in the same script. The user/pass would most
> » likely have to be a superuser to have access to all databases (this is
> » also not guaranteed depending on your pg_hba.conf). Make the script
> » read/execute by root but not by anyone else and it will help a tiny bit
> » with security.
> Using something like "ps -e" shows the environment variables so it is
> as unsecure as giving the password on the commande line.
> Thierry