Cannot get a backup using a script

From: JORGE MALDONADO <jorgemal1960(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Cannot get a backup using a script
Date: 2015-11-25 19:52:32
Message-ID: CAAY=A783oXBDaJptWviDtxDU0vfeMU-izY+_FE3k0T_LTj+xPA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

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

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Albe Laurenz 2015-11-26 09:13:58 Re: Cannot get a backup using a script
Previous Message Léa Massiot 2015-11-25 18:50:51 Re: Cannot start a cluster