Re: pg_dump.. auto backup

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Rudi Starcevic <rudi(at)oasis(dot)net(dot)au>
Cc: Ganesan Kanavathy <ganesh(at)magnusquest(dot)com>, pgsql-admin(at)postgresql(dot)org
Subject: Re: pg_dump.. auto backup
Date: 2003-10-16 03:36:35
Message-ID: 15877.1066275395@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Rudi Starcevic <rudi(at)oasis(dot)net(dot)au> writes:
> Ganesan Kanavathy wrote:
>> The problem I am facing is the when running the cronjob it is asking
>> for password.

> Just add:
> export PGPASSWORD=mypassword
> to your script.

A much better solution (assuming you are using a reasonably recent PG
release) is to put the needed password in ~/.pgpass, which can be set to
0600 permissions. PGPASSWORD is insecure on many platforms because
other people can see your environment variables.

regards, tom lane

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Ganesan Kanavathy 2003-10-16 04:08:11 Re: pg_dump.. auto backup
Previous Message Ganesan Kanavathy 2003-10-16 03:21:14 Re: pg_dump.. auto backup