From: | john(dot)iliffe <john(dot)iliffe(at)pppoe(dot)ca> |
---|---|
To: | pgsql-in-general(at)postgresql(dot)org |
Subject: | Re: Unable to Run pg_dump |
Date: | 2013-03-24 19:16:55 |
Message-ID: | a4af616077e9273974efce8dbb146964@pppoe.ca |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-in-general |
Sorry to reply to my own posting but this might simplify what I'm asking.
I need to do unattended backups. The database is protected by pg_hba,conf as:
local mydb cobkup trust
local all all password
so a batch script running under id cobkup should be able to read a database called
"mydb" without a password.
The script calls pg_dump with the following command:
/usr/pgsql-9.2.1/bin/pg_dump -f /notraid/$dirname/coaxdb.`date +%Y%m%d` -F custom -v -U cobkup mydb
Running this from cron gives the following error:
pg_dump: [archiver (db)] connection to database "coaxpubs" failed:
fe_sendauth: no password supplied
Questions:
1. Why does this setup require a password? (trust on local machine)
2. What didn't I understand?
Regards,
John
===============================================================================
>
> Subject: [pgsql-in-general] Unable to Run pg_dump
> Date: Wednesday 20 March 2013, 14:34:22
> From: "john.iliffe" <john(dot)iliffe(at)pppoe(dot)ca>
> To: pgsql-in-general(at)postgresql(dot)org
>
> I have been using pg_dump to produce automatic backups using cron for
> several years.
>
> I recently changed to postgresql-9.2.1 and now I get the error:
>
> =================
> mkdir created /notraid/dbbk20130319 correctly
> Password:
> pg_dump: [archiver (db)] connection to database "coaxpubs" failed:
> fe_sendauth: no password supplied
> Bad database backup 0
> =================
>
> I think the config is correct for an unattended backup. I have pg_hba.conf
> set as:
>
> local mydb cobkup trust
> local all all password
>
> and the following is the command in the script run by cron:
>
> /usr/pgsql-9.2.1/bin/pg_dump -f /notraid/$dirname/mydb.`date +%Y%m%d`
> -F custom -v -U cobkup mydb
>
> A search of the archives doesn't turn up any changes between versions 8 and
> 9 of postgresql regarding password insertion.
>
> I suspect this is going to be a misunderstanding on my part but can anyone
> help?
>
> Regards,
>
> John
>
>
>
> --
> Sent via pgsql-in-general mailing list (pgsql-in-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-in-general
>
> -----------------------------------------
From | Date | Subject | |
---|---|---|---|
Next Message | john.iliffe | 2013-03-25 14:44:18 | Re: Unable to Run pg_dump |
Previous Message | Jose Antonio Quintana/UPC | 2013-03-21 12:07:09 | Reading from file without superuser privilege |