Re: Cannot get a backup using a script

From: Ken Benson <Ken(at)infowerks(dot)com>
To: "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Cannot get a backup using a script
Date: 2015-11-26 16:15:29
Message-ID: BY2PR02MB137939893AD76A43EE8E1BAAA3040@BY2PR02MB1379.namprd02.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Writes,

Ken Benson | Director, Development | InfoWerks Data Services, Inc. | 817.253.7867 (direct) | infowerks.com<http://infowerks.com/>

From: pgsql-novice-owner(at)postgresql(dot)org [mailto:pgsql-novice-owner(at)postgresql(dot)org] On Behalf Of JORGE MALDONADO
Sent: Wednesday, November 25, 2015 11:53 AM
To: pgsql-novice(at)postgresql(dot)org
Subject: [NOVICE] Cannot get a backup using a script

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
[KenB]
Is this a typo – in copying – or does your pgpass.conf actually contain localhot
It should be localhost

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

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Albe Laurenz 2015-11-26 16:24:41 Re: Cannot get a backup using a script
Previous Message Felipe Santos 2015-11-26 15:44:49 Re: Cannot get a backup using a script