Re: Cannot get a backup using a script
От | Ken Benson |
---|---|
Тема | Re: Cannot get a backup using a script |
Дата | |
Msg-id | BY2PR02MB137939893AD76A43EE8E1BAAA3040@BY2PR02MB1379.namprd02.prod.outlook.com обсуждение исходный текст |
Ответ на | Cannot get a backup using a script (JORGE MALDONADO <jorgemal1960@gmail.com>) |
Список | pgsql-novice |
Writes,
Ken Benson | Director, Development | InfoWerks Data Services, Inc. | 817.253.7867 (direct) | infowerks.com
From: pgsql-novice-owner@postgresql.org [mailto:pgsql-novice-owner@postgresql.org] On Behalf Of JORGE MALDONADO
Sent: Wednesday, November 25, 2015 11:53 AM
To: pgsql-novice@postgresql.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
В списке pgsql-novice по дате отправления: