I have been trying to get automated backups of a PostgreSQL database using a script without success. The error I get is "fe_sendauth: no password supplied".
I have a pgpass.conf in "C:\Users\Username\AppData\Roaming\postgresql\pgpass.conf" with the correct information: localhot:5432:dbname:postgres:mypassword
The script I am testing is as follows:
pg_dump -E win1252 -f d:/respaldos/edocuments/edoc.backup -F p -n edocuments -h localhost -U postgres -w edocuments
I have run such a script with -W instead of -w just to test and I am asked for password and it runs correctly, so the script is fine I suppose.
I also added the following line to the script and I get the same error message:
SET PGPASSFILE="C:\Users\Username\AppData\Roaming\postgresql\pgpass.conf"
My OS is Windows Server 2008 R2.
I will very much appreciate any help.
With respect,
Jorge Maldonado