From ganesh@magnusquest.com Wed Nov 12 12:44:53 2003 X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 3989ED1B504; Wed, 12 Nov 2003 12:44:53 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 80433-02; Wed, 12 Nov 2003 08:44:25 -0400 (AST) Received: from magnusquest.com (magnusquest.com [128.121.126.6]) by svr1.postgresql.org (Postfix) with ESMTP id 1AB09D1B509; Wed, 12 Nov 2003 08:44:22 -0400 (AST) Received: from ganesan ([219.93.76.2]) by magnusquest.com (8.12.10/8.11.6) with ESMTP id hACCiLaV066403; Wed, 12 Nov 2003 20:44:22 +0800 (MYT) From: "Ganesan Kanavathy" To: , Subject: pg_dump still requires password Date: Wed, 12 Nov 2003 20:43:54 +0800 Message-ID: <002901c3a91a$a696a440$1300a8c0@headquarters.mq.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_002A_01C3A95D.B4B9E440" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Importance: Normal X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.5 tagged_above=0.0 required=5.0 tests=HTML_80_90 X-Spam-Level: X-Archive-Number: 200311/207 X-Sequence-Number: 11194 This is a multi-part message in MIME format. ------=_NextPart_000_002A_01C3A95D.B4B9E440 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit I want to do auto backup for pg with cronjob. The problem is it equesting for password. I have tried with pgpass but still it does not work. I created the pgpass as per below: echo your_host:5432:your_user:your_db:your_pass > ~/.pgpass bash$ chmod 600 ~/.pgpass My cronjob entry is as below: /usr/local/pgsql/bin/pg_dump --no-owner -d helpdesk -U ganesh > /www/htdocs/sg/backup/helpdesk.dump When I issue the command it is asking for passwd which I cannot used for cronjob to run at midnight. Please help. How I do solve this problem. I have posted this earlier the suggestion was to use pgpass but that does not help. What other way can I achive this. Regards, Ganesan ------=_NextPart_000_002A_01C3A95D.B4B9E440 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

I want to do auto backup for pg with cronjob. The problem is it equesting for password.<= /o:p>

 

I have tried with pgpass but= still it does not work. I created the pgpass as per b= elow:

 

echo your_host:5432:your_user:your_db:your_pass > ~/.pgp= ass bash$ chmod 600 ~/.pgpass<= /span>

 

My cronjob entry is = as below:

 

/usr/local/pgsql/bin/pg_dump= --no-owner  -d helpdesk -U ganesh > /www/htdocs/sg/backup/helpdesk.dump

 

When I issue the command it is asking for passwd which I cannot used for c= ronjob to run at midnight. =  

 

Please help. How I do solve this problem.

 

I have posted this earlier the suggestion was to use pgpass but that does not help. What other way can I <= span class=3DSpellE>achive this.

 

Regards,

Ganesan

 

------=_NextPart_000_002A_01C3A95D.B4B9E440-- From drubior@tinet.org Wed Nov 12 14:05:54 2003 X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 7FC83D1B557 for ; Wed, 12 Nov 2003 14:05:54 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 90418-03 for ; Wed, 12 Nov 2003 10:05:26 -0400 (AST) Received: from nil.tinet.org (tinet.org [195.77.216.130]) by svr1.postgresql.org (Postfix) with ESMTP id E75B3D1B535 for ; Wed, 12 Nov 2003 10:05:21 -0400 (AST) Received: from tinet.org ([195.76.233.3]) by nil.tinet.org (Netscape Messaging Server 4.1) with ESMTP id HO8SGK02.D6Y for ; Wed, 12 Nov 2003 15:05:08 +0100 Message-ID: <3FB23DD1.3090301@tinet.org> Date: Wed, 12 Nov 2003 15:04:01 +0100 From: Daniel Rubio User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01 X-Accept-Language: en-us, en MIME-Version: 1.0 Cc: pgsql-admin@postgresql.org Subject: Re: pg_dump still requires password References: <002901c3a91a$a696a440$1300a8c0@headquarters.mq.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/208 X-Sequence-Number: 11195 > When I issue the command it is asking for passwd which I cannot used for > cronjob to run at midnight. Execute the task as user postgres (crontab for postgres, not root) and modify pg_hba.conf to permit access in trust mode (without asking for password) e.g : local all postgres trust You can subtitute postgres for the user you need and the database too (if the dump is not pg_dumpall) > > > > Please help. How I do solve this problem. > > > > I have posted this earlier the suggestion was to use pgpass but that > does not help. What other way can I achive this. > > > > Regards, > > Ganesan > > > -- ******************************************************** Daniel Rubio Rodríguez OASI (Organisme Autňnom Per la Societat de la Informació) c/ Assalt, 12 43003 - Tarragona Tef.: 977.244.007 - Fax: 977.224.517 e-mail: drubio@oasi.org ******************************************************** From bhuvan@symonds.net Thu Nov 13 04:40:57 2003 X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 7D7E4D1B54B; Thu, 13 Nov 2003 04:40:57 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 48711-05; Thu, 13 Nov 2003 00:40:26 -0400 (AST) Received: from Gateway.bksys.co.in (unknown [61.3.252.136]) by svr1.postgresql.org (Postfix) with ESMTP id 841FCD1B50E; Thu, 13 Nov 2003 00:40:23 -0400 (AST) Received: from bksys.co.in (mail.bksys.co.in [192.168.1.1]) by Gateway.bksys.co.in (8.11.6/8.11.6) with ESMTP id hAD4eKq25292; Thu, 13 Nov 2003 10:10:21 +0530 Received: from Bhuvan.bksys.co.in (Bhuvan.bksys.co.in [192.168.1.71]) by bksys.co.in (8.11.6/8.8.5) with ESMTP id hAD4eKg13089; Thu, 13 Nov 2003 10:10:20 +0530 Subject: Re: pg_dump still requires password From: "A.Bhuvaneswaran" To: Ganesan Kanavathy Cc: pgsql-admin@postgresql.org, pgsql-admin-owner@postgresql.org In-Reply-To: <002901c3a91a$a696a440$1300a8c0@headquarters.mq.com> References: <002901c3a91a$a696a440$1300a8c0@headquarters.mq.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-PmO4QgPkxzAjB/8gPujx" Message-Id: <1068698575.1707.2.camel@Bhuvan.bksys.co.in> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Thu, 13 Nov 2003 10:12:56 +0530 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/227 X-Sequence-Number: 11214 --=-PmO4QgPkxzAjB/8gPujx Content-Type: text/plain Content-Transfer-Encoding: quoted-printable > I have tried with pgpass but still it do > es not work. I created the pgpass as per below: >=20 Version? ~/.pgpass is supported since 7.3. Two more solutions are: 1) Set PGPASSWORD variable to avoid pg_dump asking for password 2) Set connection as trust in pg_hba.conf regards, bhuvaneswaran regards, bhuvaneswaran --=-PmO4QgPkxzAjB/8gPujx Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQA/swvPL2UFujVh8ToRAoW/AJ9x5F7dRHLshnrQ6z/mni6hRKD+tACeLi/u 4jbbxgsLFW6v1N1ldB6Nh6Y= =3s/k -----END PGP SIGNATURE----- --=-PmO4QgPkxzAjB/8gPujx--