Dick Davies wrote:
* Norman Uittenbogaart <[EMAIL PROTECTED]> [1010 16:10]:I chose to go with the pg_dump solution command from root's crontab. Cron runs a script once a night with the following commands:
I'm trying to write a backup script for postgres and us a crontab on it.
In the manual it says for pg_dumpall make $HOME/.pgpass so it won't ask for a password.
Now I made the .pgpass in root's homedir (i wanted to use root's crontab) paste the password in it, chmod 400 it ...
Can't you just pgdump from the local socket? And not bother with the password thing at all?
DATE=`/bin/date +%Y%m%d`
/usr/local/bin/vacuumdb -a -F -v -U pgsql > /var/backups/"$DATE"_pg.vac
/usr/local/bin/pg_dump -Fc -U pgsql db_name > /var/backups/"$DATE"_db.bu
-Randy _______________________________________________ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
