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--