From sandy@mcw.co.il Wed Mar 9 13:54:58 2011 Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 2C7E61337B9C for ; Wed, 9 Mar 2011 09:54:58 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 25631-02-5 for ; Wed, 9 Mar 2011 13:54:49 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from ma-industries.com (mailgw1.ma-industries.com [194.90.130.233]) by mail.postgresql.org (Postfix) with ESMTP id 8F0791337B8C for ; Wed, 9 Mar 2011 09:54:30 -0400 (AST) Received: from Internal Mail-Server by Mail-SeCure (envelope-from sandy@mcw.co.il) with SMTP; 9 Mar 2011 15:47:27 +0200 Received: from Mcw-BS-Mail.mpdc.mcw.co.il ([172.16.101.52]) by mcw-frontend.mpdc.mcw.co.il with Microsoft SMTPSVC(6.0.3790.4675); Wed, 9 Mar 2011 15:58:28 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01CBDE61.AC1EA1D6" Subject: FW: backup using pg_dump postgreSQL 8.3.8 Date: Wed, 9 Mar 2011 15:58:20 +0200 Message-ID: <10E646CF2170984794256AC2DD2C065C6BA882@Mcw-BS-Mail.mpdc.mcw.co.il> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: backup using pg_dump postgreSQL 8.3.8 thread-index: AcveWrsgJNuyXbmpRT2kEPuyvjcB2AABvKvA From: "Sandy Test" To: , X-OriginalArrivalTime: 09 Mar 2011 13:58:28.0223 (UTC) FILETIME=[10EBA0F0:01CBDE62] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.898 tagged_above=-10 required=5 tests=BAYES_00=-1.9, HTML_MESSAGE=0.001, UNPARSEABLE_RELAY=0.001 X-Spam-Level: X-Archive-Number: 201103/96 X-Sequence-Number: 36968 This is a multi-part message in MIME format. ------_=_NextPart_001_01CBDE61.AC1EA1D6 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable =20 We have postgreSQL 8.3.8 installed on a windows 8 server (64 bit). =20 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,=20 It still asks for a password. =20 1. Is this a 64bit issue? If the server was 32bit, would it not ask for a password? =20 2. Is there a way of running a dos script that would run the pg_dump providing a password when prompted?=20 =20 3. Is there a way of running the pg_dump with a user that doesn't have a password? =20 Thanks =20 Sandy Test System Manager Makhteshim IT Makhteshim Agan Group tel:972-8-6296823 fax:972-8-6296043 sandy.test@ma-industries.com =20 ------_=_NextPart_001_01CBDE61.AC1EA1D6 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

 

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=

 

------_=_NextPart_001_01CBDE61.AC1EA1D6-- From vibhor.aim@gmail.com Wed Mar 9 14:08:58 2011 Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 22D8E1337B8C for ; Wed, 9 Mar 2011 10:08:58 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 30283-01; Wed, 9 Mar 2011 14:08:49 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pw0-f46.google.com (mail-pw0-f46.google.com [209.85.160.46]) by mail.postgresql.org (Postfix) with ESMTP id 27E2F1337B82; Wed, 9 Mar 2011 10:08:46 -0400 (AST) Received: by pwi15 with SMTP id 15so139426pwi.19 for ; Wed, 09 Mar 2011 06:08:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:subject:mime-version:content-type:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to:x-mailer; bh=UOkDC8/C7lcZ6lVmHwJfehUye8JZxs6mFv5E6ugUbP8=; b=QUb+6RDnEA3js4EUIlHBosEN75NtMkxlO9PutK/2//NOHAvyHej8+trNdGNcABpEGD aGCaox4hvzjPfSeHloyZ0B84I/AmUBFs4IgWfdagqoAkNcl+z2sF1gOodj6x3Kk2lhs3 s19KyCu59IJemavYNbC25V7Mi4HPq9uB3sOFs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=kiZQnxEASgTKZTksSiy7hJr+hpOGq7kxBb99WH/wJZgpN56n8A++/AcxNegm3vpHla 4ViIL8nDpIT1AltuD3fucDVQlijAmkaK/XT3YBmZIOpWzol+UYzJnnE7lc2OewYGowee EPQnxEMHHySbN+XuyJ0UD/PbLaLRGZGJGiSkI= Received: by 10.142.165.21 with SMTP id n21mr5474648wfe.310.1299679726985; Wed, 09 Mar 2011 06:08:46 -0800 (PST) Received: from [172.24.35.132] ([121.241.184.140]) by mx.google.com with ESMTPS id d35sm2478127wfj.9.2011.03.09.06.08.40 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 09 Mar 2011 06:08:45 -0800 (PST) Subject: Re: FW: backup using pg_dump postgreSQL 8.3.8 Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=windows-1252 From: Vibhor Kumar In-Reply-To: <10E646CF2170984794256AC2DD2C065C6BA882@Mcw-BS-Mail.mpdc.mcw.co.il> Date: Wed, 9 Mar 2011 19:40:06 +0530 Cc: , Content-Transfer-Encoding: quoted-printable Message-Id: <1F229316-6442-4E01-8254-CDBF7B84485F@gmail.com> References: <10E646CF2170984794256AC2DD2C065C6BA882@Mcw-BS-Mail.mpdc.mcw.co.il> To: Sandy Test X-Mailer: Apple Mail (2.1082) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.899 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001 X-Spam-Level: X-Archive-Number: 201103/97 X-Sequence-Number: 36969 On Mar 9, 2011, at 7:28 PM, Sandy Test wrote: >=20 > We have postgreSQL 8.3.8 installed on a windows 8 server (64 bit). >=20 > 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 =85= trust, > It still asks for a password. >=20 > 1. Is this a 64bit issue? If the server was 32bit, would it not ask = for a password?=20 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?=20 Include following in dos script. set PGPASSWORD=3D 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?=20 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 From ajs@crankycanuck.ca Wed Mar 9 14:48:29 2011 Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id E05781337C14 for ; Wed, 9 Mar 2011 10:48:29 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 38900-10; Wed, 9 Mar 2011 14:48:21 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.yitter.info (mail.yitter.info [208.86.224.201]) by mail.postgresql.org (Postfix) with ESMTP id C42A01337BE0; Wed, 9 Mar 2011 10:48:13 -0400 (AST) Received: from crankycanuck.ca (69-196-144-230.dsl.teksavvy.com [69.196.144.230]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.yitter.info (Postfix) with ESMTPSA id 4871E1ECB408; Wed, 9 Mar 2011 14:48:12 +0000 (UTC) Date: Wed, 9 Mar 2011 09:48:10 -0500 From: Andrew Sullivan To: pgsql-general@postgresql.org, pgsql-admin@postgresql.org Subject: Re: [GENERAL] FW: backup using pg_dump postgreSQL 8.3.8 Message-ID: <20110309144810.GP32629@shinkuro.com> Mail-Followup-To: Andrew Sullivan , pgsql-general@postgresql.org, pgsql-admin@postgresql.org References: <10E646CF2170984794256AC2DD2C065C6BA882@Mcw-BS-Mail.mpdc.mcw.co.il> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <10E646CF2170984794256AC2DD2C065C6BA882@Mcw-BS-Mail.mpdc.mcw.co.il> User-Agent: Mutt/1.5.18 (2008-05-17) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201103/99 X-Sequence-Number: 36971 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 From adrian.klaver@gmail.com Wed Mar 9 15:28:05 2011 Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 5A8AD1337BBC for ; Wed, 9 Mar 2011 11:28:05 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 51249-06; Wed, 9 Mar 2011 15:27:56 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-fx0-f46.google.com (mail-fx0-f46.google.com [209.85.161.46]) by mail.postgresql.org (Postfix) with ESMTP id 1CEF51337B93; Wed, 9 Mar 2011 11:27:53 -0400 (AST) Received: by fxm17 with SMTP id 17so581727fxm.19 for ; Wed, 09 Mar 2011 07:27:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:reply-to:to:subject:date:user-agent:cc :references:in-reply-to:mime-version:content-type :content-transfer-encoding:message-id; bh=fuPxjkXsnmNR1/3TZNf/0c7c/IHJDTDONpbKH8RgxQU=; b=jECx+NUJ/9Rx07HzOPPKHtx5XJTdLfyMx5PTzANfYf8TC68kuu82XrH3sr5Sf2eFQM 1347Jt7SyW6CZEHtZtv22y0M4HA2vthsCKXV8IbyRx/9IA7xlsiTRShvLT4PpjWMYtSg JYKB5boWAVQnTR7r36RF/nby42GALJTi8I8tg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:reply-to:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:content-type:content-transfer-encoding:message-id; b=aY7EK6jsytAOvQx6qqj/0CGdpjDTIy+OJ88KItuiqLZOGlyhmHxv57C6EuYp6LDWLk ATq6/5CY0otMwSlL0RDP0uNpn4mP1MBPBDIwpL5/BHRulIHrZUiQnDsJKFrMXVdxK9d4 N66DzVYUpbilTBktKJ9kTnr9/tjAW4Sed0H20= Received: by 10.223.102.129 with SMTP id g1mr273829fao.3.1299684473657; Wed, 09 Mar 2011 07:27:53 -0800 (PST) Received: from tucker.localnet (c-24-17-164-54.hsd1.wa.comcast.net [24.17.164.54]) by mx.google.com with ESMTPS id s2sm929262fai.45.2011.03.09.07.27.51 (version=SSLv3 cipher=OTHER); Wed, 09 Mar 2011 07:27:52 -0800 (PST) From: Adrian Klaver Reply-To: adrian.klaver@gmail.com To: pgsql-general@postgresql.org Subject: Re: [GENERAL] FW: backup using pg_dump postgreSQL 8.3.8 Date: Wed, 9 Mar 2011 07:27:48 -0800 User-Agent: KMail/1.13.5 (Linux/2.6.32-29-generic; KDE/4.4.5; i686; ; ) Cc: "Sandy Test" , pgsql-admin@postgresql.org References: <10E646CF2170984794256AC2DD2C065C6BA882@Mcw-BS-Mail.mpdc.mcw.co.il> In-Reply-To: <10E646CF2170984794256AC2DD2C065C6BA882@Mcw-BS-Mail.mpdc.mcw.co.il> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201103090727.48971.adrian.klaver@gmail.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.889 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, T_TO_NO_BRKTS_FREEMAIL=0.01 X-Spam-Level: X-Archive-Number: 201103/100 X-Sequence-Number: 36972 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 From tgl@sss.pgh.pa.us Wed Mar 9 15:32:08 2011 Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 4E7BC1337B9C for ; Wed, 9 Mar 2011 11:32:08 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 52609-05; Wed, 9 Mar 2011 15:31:59 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 7BAC91337B93; Wed, 9 Mar 2011 11:31:56 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p29FVu2G024276; Wed, 9 Mar 2011 10:31:56 -0500 (EST) To: Andrew Sullivan cc: pgsql-general@postgresql.org, pgsql-admin@postgresql.org Subject: Re: [GENERAL] FW: backup using pg_dump postgreSQL 8.3.8 In-reply-to: <20110309144810.GP32629@shinkuro.com> References: <10E646CF2170984794256AC2DD2C065C6BA882@Mcw-BS-Mail.mpdc.mcw.co.il> <20110309144810.GP32629@shinkuro.com> Comments: In-reply-to Andrew Sullivan message dated "Wed, 09 Mar 2011 09:48:10 -0500" Date: Wed, 09 Mar 2011 10:31:56 -0500 Message-ID: <24275.1299684716@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201103/102 X-Sequence-Number: 36974 Andrew Sullivan 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 From ajs@crankycanuck.ca Wed Mar 9 15:42:18 2011 Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 7C6F01337B9C for ; Wed, 9 Mar 2011 11:42:18 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 34999-04; Wed, 9 Mar 2011 15:42:11 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.yitter.info (mail.yitter.info [208.86.224.201]) by mail.postgresql.org (Postfix) with ESMTP id AB24B1337B93; Wed, 9 Mar 2011 11:42:10 -0400 (AST) Received: from crankycanuck.ca (69-196-144-230.dsl.teksavvy.com [69.196.144.230]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.yitter.info (Postfix) with ESMTPSA id 4BCF31ECB408; Wed, 9 Mar 2011 15:42:10 +0000 (UTC) Date: Wed, 9 Mar 2011 10:42:08 -0500 From: Andrew Sullivan To: Tom Lane Cc: Andrew Sullivan , pgsql-general@postgresql.org, pgsql-admin@postgresql.org Subject: Re: [GENERAL] FW: backup using pg_dump postgreSQL 8.3.8 Message-ID: <20110309154207.GQ32629@shinkuro.com> Mail-Followup-To: Andrew Sullivan , Tom Lane , pgsql-general@postgresql.org, pgsql-admin@postgresql.org References: <10E646CF2170984794256AC2DD2C065C6BA882@Mcw-BS-Mail.mpdc.mcw.co.il> <20110309144810.GP32629@shinkuro.com> <24275.1299684716@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <24275.1299684716@sss.pgh.pa.us> User-Agent: Mutt/1.5.18 (2008-05-17) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201103/103 X-Sequence-Number: 36975 On Wed, Mar 09, 2011 at 10:31:56AM -0500, Tom Lane wrote: > Andrew Sullivan 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