> I don't really understand this. How to put password in ~/.pgpass. What
> changes do I need to do on the script? How do I access to the password
> to authenticate?
Follow the below steps to automate your backup process.
bash$ echo your_host:5432:your_user:your_db:your_pass > ~/.pgpass
bash$ chmo
Ganesan Kanavathy wrote:
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 schedu
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