pg_dump.. auto backup

From: "Ganesan Kanavathy" <ganesh(at)magnusquest(dot)com>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: pg_dump.. auto backup
Date: 2003-10-16 01:36:29
Message-ID: 000001c39385$f0491280$1300a8c0@headquarters.mq.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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


Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Rudi Starcevic 2003-10-16 02:04:57 Re: pg_dump.. auto backup
Previous Message Ben Kim 2003-10-15 21:58:18 question re crosstab query