pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pg_dump still requires password
3+ messages / 3 participants
[nested] [flat]

* pg_dump still requires password
@ 2003-11-12 12:43 Ganesan Kanavathy <ganesh@magnusquest.com>
  2003-11-12 14:04 ` Re: pg_dump still requires password Daniel Rubio <drubior@tinet.org>
  2003-11-13 04:42 ` Re: pg_dump still requires password A.Bhuvaneswaran <bhuvan@symonds.net>
  0 siblings, 2 replies; 3+ messages in thread

From: Ganesan Kanavathy @ 2003-11-12 12:43 UTC (permalink / raw)
  To: pgsql-admin; pgsql-admin-owner@postgresql.org

I want to do auto backup for pg with cronjob. The problem is it
equesting for password.
 
I have tried with pgpass but still it does not work. I created the
pgpass as per below:
 
echo your_host:5432:your_user:your_db:your_pass > ~/.pgpass bash$ chmod
600 ~/.pgpass
 
My cronjob entry is as below:
 
/usr/local/pgsql/bin/pg_dump --no-owner  -d helpdesk -U ganesh >
/www/htdocs/sg/backup/helpdesk.dump
 
When I issue the command it is asking for passwd which I cannot used for
cronjob to run at midnight.  
 
Please help. How I do solve this problem. 
 
I have posted this earlier the suggestion was to use pgpass but that
does not help. What other way can I achive this.
 
Regards,
Ganesan
 

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: pg_dump still requires password
  2003-11-12 12:43 pg_dump still requires password Ganesan Kanavathy <ganesh@magnusquest.com>
@ 2003-11-12 14:04 ` Daniel Rubio <drubior@tinet.org>
  1 sibling, 0 replies; 3+ messages in thread

From: Daniel Rubio @ 2003-11-12 14:04 UTC (permalink / raw)
  To: ; +Cc: pgsql-admin


> When I issue the command it is asking for passwd which I cannot used for 
> cronjob to run at midnight.  

Execute the task as user postgres (crontab for postgres, not root) and 
modify pg_hba.conf to permit access in trust mode (without asking for 
password)

e.g :  local   all     postgres        trust

You can subtitute postgres for the user you need and the database too 
(if the dump is not pg_dumpall)

> 
>  
> 
> Please help. How I do solve this problem.
> 
>  
> 
> I have posted this earlier the suggestion was to use pgpass but that 
> does not help. What other way can I achive this.
> 
>  
> 
> Regards,
> 
> Ganesan
> 
>  
> 


-- 
********************************************************
Daniel Rubio Rodríguez
OASI (Organisme Autònom Per la Societat de la Informació)
c/ Assalt, 12
43003 - Tarragona
Tef.: 977.244.007 - Fax: 977.224.517
e-mail: drubio@oasi.org
********************************************************




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: pg_dump still requires password
  2003-11-12 12:43 pg_dump still requires password Ganesan Kanavathy <ganesh@magnusquest.com>
@ 2003-11-13 04:42 ` A.Bhuvaneswaran <bhuvan@symonds.net>
  1 sibling, 0 replies; 3+ messages in thread

From: A.Bhuvaneswaran @ 2003-11-13 04:42 UTC (permalink / raw)
  To: Ganesan Kanavathy <ganesh@magnusquest.com>; +Cc: pgsql-admin; pgsql-admin-owner@postgresql.org


> I have tried with pgpass but still it do
> es not work. I created the pgpass as per below:
> 

Version? ~/.pgpass is supported since 7.3. Two more solutions are:
1) Set PGPASSWORD variable to avoid pg_dump asking for password
2) Set connection as trust in pg_hba.conf

regards,
bhuvaneswaran
regards, bhuvaneswaran

Attachments:

  signature.asc (application/pgp-signature, 231B) download

^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2003-11-13 04:42 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-11-12 12:43 pg_dump still requires password Ganesan Kanavathy <ganesh@magnusquest.com>
2003-11-12 14:04 ` Daniel Rubio <drubior@tinet.org>
2003-11-13 04:42 ` A.Bhuvaneswaran <bhuvan@symonds.net>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox