Skip to main content

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.

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. Is there a way to specify or avoid 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.

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". Is there a way to specify a password or avoid the requirement 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.

Postgres Schedule PostgreSQL Scheduled Database Backup

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.

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.Is Is there a way to specify or avoidavoid requirement of password when creating a dump.?

Also we would like to retrieve the dump and pop it on separate Windows seerverserver using pgadmin 3pgadmin3. When retsoringrestoring using pgadmin dbase -> database restoredbase -> database restore the 'OK' button is disabled and we are unable to restore the database. thanks.

Postgres Schedule Database Backup

For scheduling a daily back up on 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.Is there a way to specify or avoid requirement of password when creating a dump.

Also we would like to retrieve the dump and pop it on separate Windows seerver using pgadmin 3. When retsoring using pgadmin dbase -> database restore the 'OK' button is disabled and we are unable to restore the database. thanks.

PostgreSQL Scheduled Database Backup

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. Is there a way to specify or avoid 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.

Post Migrated Here from stackoverflow.com (revisions)
Source Link
AKV
  • 41
  • 1
  • 2

Postgres Schedule Database Backup

For scheduling a daily back up on 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.Is there a way to specify or avoid requirement of password when creating a dump.

Also we would like to retrieve the dump and pop it on separate Windows seerver using pgadmin 3. When retsoring using pgadmin dbase -> database restore the 'OK' button is disabled and we are unable to restore the database. thanks.