pg_dump.. auto backup - Mailing list pgsql-admin

From Ganesan Kanavathy
Subject pg_dump.. auto backup
Date
Msg-id 000001c39385$f0491280$1300a8c0@headquarters.mq.com
Whole thread Raw
Responses Re: pg_dump.. auto backup  (Rudi Starcevic <rudi@oasis.net.au>)
List pgsql-admin

I am doing a cronjob to dump pg database everyday.

 

Below is my script for cronjob.

 

#!/bin/sh

 

/usr/local/pgsql/bin/pg_dump -U ganesh --no-owner -d mq > /backupdb/mq.dump

 

cd /

cd /backupdb/

 

tar  -czf /backupdb/mq-`date '+%d-%m-%Y'`.tar.gz -R *

 

This cronjob is schedule to run everyday at 3.30am.

 

The problem I am facing is the when running the cronjob it is asking for password. If I remove –U ganesh, it is still prompting for password but this time root password.

 

How do I solve this, when running the pg_dump I don’t want it to prompt for password.

 

Regards,

ganesh

 

 

pgsql-admin by date:

Previous
From: Ryan Chambers
Date:
Subject: understanding postgres stats
Next
From: Rudi Starcevic
Date:
Subject: Re: pg_dump.. auto backup