I need to do the equivalent of the code below but with PostgreSQL. I haven't been able to find documentation on the pg_dump command that allows you to use a login. This is a script for a Cron Job by the way, on a web host.
What I have with pgsql is this:
I get permission denied. Which I'm assuming is because I don't have a password there.
KizMar
------------
Code:
mysqldump --user='username' --password='password' --extended-insert bd_name > /path/to/file/backup.sql
What I have with pgsql is this:
Code:
pg_dump -u --superuser='username' db_name > /home/macker/backup/db/macker2002.sql
I get permission denied. Which I'm assuming is because I don't have a password there.
KizMar
------------