For scheduling a daily back up on a postgres database we execute the following command:
0 2 * * * /usr/local/pgsql/bin/pg_dump -Fp -b -U database_name \
> $HOME/db_backups/database_name-`date +\%Y\%m\%d`.sql \
2>> $HOME/db_backups/cron.log
After the code executes, the log says invalid password"invalid password". Is there a way to specify a password or avoid the requirement of password when creating a dump?
Also we would like to retrieve the dump and pop it on separate Windows server using pgadmin3. When restoring using pgadmin dbase -> database restore
the 'OK' button is disabled and we are unable to restore the database.