From launh@perridot.com Tue Jan 29 02:59:49 2002 Received: from dns.perridot.com ([202.187.97.3]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g0T2xml30742; Mon, 28 Jan 2002 21:59:49 -0500 (EST) (envelope-from launh@perridot.com) Received: from linux1.perridot.com (processflow.perridot.com [202.187.97.20]) by dns.perridot.com (8.11.2/8.11.2) with ESMTP id g0T2dQJ19303; Tue, 29 Jan 2002 10:39:26 +0800 Received: from launh (launh.perridot.com [10.35.1.4]) by linux1.perridot.com (8.11.2/8.11.2) with SMTP id g0T31x627162; Tue, 29 Jan 2002 11:01:59 +0800 Message-ID: <003401c1a871$516922a0$0401230a@perridot.com> From: "Lau NH" To: , Subject: Backup database through web and php Date: Tue, 29 Jan 2002 11:01:58 +0800 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0031_01C1A8B4.5EE489E0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Archive-Number: 200201/238 X-Sequence-Number: 3119 This is a multi-part message in MIME format. ------=_NextPart_000_0031_01C1A8B4.5EE489E0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi all, I am writing a php script to backup my postgres database through web int= erface, but my database is password required. When I do a pg_dump at the l= inux shell prompt, it will prompt for password in order to backup the datab= ase, does anyone know how to pass this password with the pg_dump command to= gether so that I can do it using php system call?=20=20 ------=_NextPart_000_0031_01C1A8B4.5EE489E0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi all,
   I am writing a php script to = backup my=20 postgres database through web interface, but my database is password=20 required.  When I do a pg_dump at the linux shell prompt, it will prom= pt=20 for password in order to backup the database, does anyone know how to pass = this=20 password with the pg_dump command together so that I can do it using php sy= stem=20 call? 
 
------=_NextPart_000_0031_01C1A8B4.5EE489E0-- From radu.popescu@aldratech.com Tue Jan 29 14:13:24 2002 Received: from www.aldratech.com ([213.157.162.9]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g0TEDOl96197; Tue, 29 Jan 2002 09:13:24 -0500 (EST) (envelope-from radu.popescu@aldratech.com) Message-ID: <001601c1a8cf$662e46d0$0600a8c0@rpopescu> From: "Radu-Adrian Popescu" To: "Lau NH" , , References: <003401c1a871$516922a0$0401230a@perridot.com> Subject: Re: Backup database through web and php Date: Tue, 29 Jan 2002 16:14:15 +0200 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0011_01C1A8DF.FEE61730" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Received: from rpopescu ([192.168.0.6]) by mail.aldratech.com (JAMES SMTP Server 1.2.1rc2) with SMTP ID 285; Tue, 29 Jan 2002 16:13:01 +0200 X-Archive-Number: 200201/240 X-Sequence-Number: 3121 This is a multi-part message in MIME format. ------=_NextPart_000_0011_01C1A8DF.FEE61730 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable You could set the authentification method to "trust" for the host the scrip= t is being run from, so you won't get a password prompt at all (see the pg_= hba.conf file). ----- Original Message -----=20 From: Lau NH=20 To: pgsql-admin@postgresql.org ; pgsql-hackers@postgresql.org=20 Sent: Tuesday, January 29, 2002 05:01 Subject: [ADMIN] Backup database through web and php Hi all, I am writing a php script to backup my postgres database through web i= nterface, but my database is password required. When I do a pg_dump at the= linux shell prompt, it will prompt for password in order to backup the dat= abase, does anyone know how to pass this password with the pg_dump command = together so that I can do it using php system call?=20=20 ------=_NextPart_000_0011_01C1A8DF.FEE61730 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
You could set the authentification=20 method to "trust" for the host the script is being run from, so y= ou=20 won't get a password prompt at all (see the pg_hba.conf file).
 
----- Original Message -----
Fro= m:=20 Lau NH
To: pgsql-admin@postgresql.org= ; pgsql-hackers@postgresql.org= =20
Sent: Tuesday, January 29, 2002=20 05:01
Subject: [ADMIN] Backup database t= hrough=20 web and php

Hi all,
   I am writing a php script t= o backup=20 my postgres database through web interface, but my database is password= =20 required.  When I do a pg_dump at the linux shell prompt, it will pr= ompt=20 for password in order to backup the database, does anyone know how to pas= s=20 this password with the pg_dump command together so that I can do it using= php=20 system call? 
 
<= /HTML> ------=_NextPart_000_0011_01C1A8DF.FEE61730-- From nwalker@eldocomp.com Wed Jan 30 17:27:48 2002 Received: from ecint.ecinet.com (smtp.eldocomp.com [205.159.99.3]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g0UHRil98918; Wed, 30 Jan 2002 12:27:48 -0500 (EST) (envelope-from nwalker@eldocomp.com) Received: from nwalke (nwalker.ecinet.com [192.168.22.250]) by ecint.ecinet.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id D9GX99K0; Wed, 30 Jan 2002 10:31:58 -0700 Message-Id: <4.2.2.20020130102837.00aa9890@ecint.ecinet.com> X-Sender: nwalke@ecint.ecinet.com X-Mailer: QUALCOMM Windows Eudora Pro Version 4.2.2 Date: Wed, 30 Jan 2002 10:31:29 -0700 To: "Lau NH" , , From: Naomi Walker Subject: Re: Backup database through web and php In-Reply-To: <003401c1a871$516922a0$0401230a@perridot.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=====================_754950972==_.ALT" X-Archive-Number: 200201/264 X-Sequence-Number: 3145 --=====================_754950972==_.ALT Content-Type: text/plain; charset="us-ascii"; format=flowed At 11:01 AM 1/29/02 +0800, Lau NH wrote: >Hi all, > I am writing a php script to backup my postgres database through web > interface, but my database is password required. When I do a pg_dump at > the linux shell prompt, it will prompt for password in order to backup > the database, does anyone know how to pass this password with the pg_dump > command together so that I can do it using php system call? > I was just reading up on this subject, and it suggests using PGPASSWORD in the environment. I have not tried that yet, but think all the passwords must be the same. It is sometimes unclear to me when challenged for a password, logged in as postgres, whether or not they want the database password I am working on, or postgres'. So far, it appears to be asking for the postgres password. -- Naomi Walker Chief Information Officer Eldorado Computing, Inc. 602-604-3100 ext 242 --=====================_754950972==_.ALT Content-Type: text/html; charset="us-ascii" At 11:01 AM 1/29/02 +0800, Lau NH wrote:
Hi all,
   I am writing a php script to backup my postgres database through web interface, but my database is password required.  When I do a pg_dump at the linux shell prompt, it will prompt for password in order to backup the database, does anyone know how to pass this password with the pg_dump command together so that I can do it using php system call? 
 
I was just reading up on this subject, and it suggests using PGPASSWORD in the environment.  I have not tried that yet, but think all the passwords must be the same. 

It is sometimes unclear to me when challenged for a password, logged in as postgres, whether or not they want the database password I am working on, or postgres'.  So far, it appears to be asking for the postgres password.
--
Naomi Walker
Chief Information Officer
Eldorado Computing, Inc.
602-604-3100  ext 242 --=====================_754950972==_.ALT--