/ Published in: DOS Batch

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
1. Create a file to store the connection password (Find the attached sample pgpass.conf) Refer: http://www.postgresql.org/docs/9.0/static/libpq-pgpass.html 2. Create a bat file with the following contents @echo off SET PGPASSFILE=D:\PgBackup\pgpass.conf ) "D:\Program Files\PostgreSQL\9.0\bin\pg_dumpall.exe" --host=localhost --username=postgres --no-password --database=postgres --oids --file=D:\PgBackup\%BACKUP_FILE% Make necessary changes in the parameters and paths Refer: http://wiki.postgresql.org/wiki/Automated_Backup_on_Windows#Using_.pgpass_and_pgdumpall.2C_same_file 3. Schedule the bat file to execute at required time using windows task scheduler Refer: http://windows.microsoft.com/en-US/windows7/schedule-a-task
URL: http://www.postgresql.org/docs/9.0/static/libpq-pgpass.html
Comments
