Enable pgpass under Windows XP
These are the steps I used to enable pgpass under Windows XP.
- Create file with name: pgpass.conf with this information in it:
hostname:port:database:username:password
see this for file data format
- Move the file to the %APP_DATA%\postgresql directory of the user running the backup ( not the db server user - postgres). In my case it was: C:\Documents and Settings\Windows User Name\Application Data\postgresql.
- Add --no-password option to the backup statement like this:
"C:\Program Files\PostgreSQL\9.X\bin\pg_dump.exe" -h localhost -U postgres --no-password -C -f "database_name_dump.sql" database_name_db
Comments
Post a Comment