pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
FW: backup using pg_dump  postgreSQL 8.3.8
6+ messages / 5 participants
[nested] [flat]

* FW: backup using pg_dump  postgreSQL 8.3.8
@ 2011-03-09 13:58  Sandy Test <sandy@mcw.co.il>
  0 siblings, 3 replies; 6+ messages in thread

From: Sandy Test @ 2011-03-09 13:58 UTC (permalink / raw)
  To: pgsql-general@postgresql.org; pgsql-admin

 

We have postgreSQL 8.3.8 installed on a windows 8 server (64 bit).

 

We want to be able to run a nightly backup using the pg_dump command.

Unfortunately, even with the pg_hba.conf fix of adding host postgres ...
trust, 

It still asks for a password.

 

1. Is this a 64bit issue? If the server was 32bit, would it not ask for
a password?

 

2. Is there a way of running a dos script that would run the pg_dump
providing a password when prompted? 

 

3. Is there a way of running the pg_dump with a user that doesn't have a
password?

 

Thanks

 

Sandy Test

System Manager Makhteshim

IT

Makhteshim Agan Group

tel:972-8-6296823   fax:972-8-6296043

sandy.test@ma-industries.com

 

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: FW: backup using pg_dump  postgreSQL 8.3.8
@ 2011-03-09 14:10  Vibhor Kumar <vibhor.aim@gmail.com>
  parent: Sandy Test <sandy@mcw.co.il>
  2 siblings, 0 replies; 6+ messages in thread

From: Vibhor Kumar @ 2011-03-09 14:10 UTC (permalink / raw)
  To: Sandy Test <sandy@mcw.co.il>; +Cc: pgsql-general@postgresql.org; pgsql-admin


On Mar 9, 2011, at 7:28 PM, Sandy Test wrote:

> 
> We have postgreSQL 8.3.8 installed on a windows 8 server (64 bit).
> 
> We want to be able to run a nightly backup using the pg_dump command.
> Unfortunately, even with the pg_hba.conf fix of adding host postgres … trust,
> It still asks for a password.
> 
> 1. Is this a 64bit issue? If the server was 32bit, would it not ask for a password? 

I haven;t seen issue with PG 8.3.8
Please share pg_hba.conf file entry.


> 2. Is there a way of running a dos script that would run the pg_dump providing a password when prompted? 

Include following in dos script.
set PGPASSWORD=<passowrd>

Or you can use pgpass.conf file option.

> 3. Is there a way of running the pg_dump with a user that doesn't have a password? 

For that user, you have to mention trust with hostname in pg_hba.conf

Thanks & Regards,
Vibhor Kumar
vibhor.aim@gmail.com
Blog:http://vibhork.blogspot.com




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: [GENERAL] FW: backup using pg_dump  postgreSQL 8.3.8
@ 2011-03-09 14:48  Andrew Sullivan <ajs@crankycanuck.ca>
  parent: Sandy Test <sandy@mcw.co.il>
  2 siblings, 1 reply; 6+ messages in thread

From: Andrew Sullivan @ 2011-03-09 14:48 UTC (permalink / raw)
  To: pgsql-general@postgresql.org; pgsql-admin

On Wed, Mar 09, 2011 at 03:58:20PM +0200, Sandy Test wrote:
> 
> We want to be able to run a nightly backup using the pg_dump command.
> 
> Unfortunately, even with the pg_hba.conf fix of adding host postgres ...
> trust, 
> 
> It still asks for a password.

pg_hba sometimes surprises people because of its matching rules.  If
there's another entry that matches before the explicit postgres entry,
that's the rule you're going to get:

    The first record with a matching connection type, client address,
    requested database, and user name is used to perform
    authentication. There is no "fall-through" or "backup": if one
    record is chosen and the authentication fails, subsequent records
    are not considered. If no record matches, access is denied.

(http://www.postgresql.org/docs/9.0/interactive/auth-pg-hba-conf.html).
Are you sure that's not your problem.  (It always is for me, and I
always make this mistake at least once per installation, even after
many years.)

A

-- 
Andrew Sullivan
ajs@crankycanuck.ca



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: [GENERAL] FW: backup using pg_dump  postgreSQL 8.3.8
@ 2011-03-09 15:27  Adrian Klaver <adrian.klaver@gmail.com>
  parent: Sandy Test <sandy@mcw.co.il>
  2 siblings, 0 replies; 6+ messages in thread

From: Adrian Klaver @ 2011-03-09 15:27 UTC (permalink / raw)
  To: pgsql-general@postgresql.org; +Cc: Sandy Test <sandy@mcw.co.il>; pgsql-admin

On Wednesday, March 09, 2011 5:58:20 am Sandy Test wrote:
>
> 
> 
> 
> 2. Is there a way of running a dos script that would run the pg_dump
> providing a password when prompted?

Using .pgpass
http://www.postgresql.org/docs/9.0/static/libpq-pgpass.html



> 
> 
> 
> Thanks
> 
> 
> 
> Sandy Test
>
-- 
Adrian Klaver
adrian.klaver@gmail.com



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: [GENERAL] FW: backup using pg_dump postgreSQL 8.3.8
@ 2011-03-09 15:31  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Andrew Sullivan <ajs@crankycanuck.ca>
  0 siblings, 1 reply; 6+ messages in thread

From: Tom Lane @ 2011-03-09 15:31 UTC (permalink / raw)
  To: Andrew Sullivan <ajs@crankycanuck.ca>; +Cc: pgsql-general@postgresql.org; pgsql-admin

Andrew Sullivan <ajs@crankycanuck.ca> writes:
> On Wed, Mar 09, 2011 at 03:58:20PM +0200, Sandy Test wrote:
>> We want to be able to run a nightly backup using the pg_dump command.
>> 
>> Unfortunately, even with the pg_hba.conf fix of adding host postgres ...
>> trust, 
>> 
>> It still asks for a password.

> pg_hba sometimes surprises people because of its matching rules.

If it is asking for a password, and password authentication is what's
supposed to be used, then pg_hba is not where the problem is.  What
I think is that the OP has placed his client-side pgpass file in the
wrong place, or given it the wrong name, or the wrong permissions,
or the wrong contents.

I'm not too sure what the right name or place is on Windows, though,
so I have to defer to those who use that platform for more detailed
help.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: [GENERAL] FW: backup using pg_dump postgreSQL 8.3.8
@ 2011-03-09 15:42  Andrew Sullivan <ajs@crankycanuck.ca>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Andrew Sullivan @ 2011-03-09 15:42 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Andrew Sullivan <ajs@crankycanuck.ca>; pgsql-general@postgresql.org; pgsql-admin

On Wed, Mar 09, 2011 at 10:31:56AM -0500, Tom Lane wrote:
> Andrew Sullivan <ajs@crankycanuck.ca> writes:
> > On Wed, Mar 09, 2011 at 03:58:20PM +0200, Sandy Test wrote:

> >> Unfortunately, even with the pg_hba.conf fix of adding host postgres ...
> >> trust, 

> If it is asking for a password, and password authentication is what's
> supposed to be used, then pg_hba is not where the problem is.

Yes, but I think the OP was saying that the setting was moved to
trust.  My point was just that adding a trust entry isn't enough if
there's an earlier password entry.

I agree that .pgpass is probably the desired answer anyway.

A

-- 
Andrew Sullivan
ajs@crankycanuck.ca



^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2011-03-09 15:42 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-03-09 13:58 FW: backup using pg_dump  postgreSQL 8.3.8 Sandy Test <sandy@mcw.co.il>
2011-03-09 14:10 ` Vibhor Kumar <vibhor.aim@gmail.com>
2011-03-09 14:48 ` Andrew Sullivan <ajs@crankycanuck.ca>
2011-03-09 15:31   ` Re: [GENERAL] FW: backup using pg_dump postgreSQL 8.3.8 Tom Lane <tgl@sss.pgh.pa.us>
2011-03-09 15:42     ` Re: [GENERAL] FW: backup using pg_dump postgreSQL 8.3.8 Andrew Sullivan <ajs@crankycanuck.ca>
2011-03-09 15:27 ` Adrian Klaver <adrian.klaver@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox