Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 86627475A3F for ; Mon, 11 Nov 2002 13:38:20 -0500 (EST) Received: from mail1.ihs.com (mail1.ihs.com [170.207.70.222]) by postgresql.org (Postfix) with ESMTP id 9C48047580B for ; Mon, 11 Nov 2002 13:38:19 -0500 (EST) Received: from css120.ihs.com (css120.ihs.com [170.207.105.120]) by mail1.ihs.com (8.12.6/8.12.6) with ESMTP id gABIbwqq013591; Mon, 11 Nov 2002 11:37:58 -0700 (MST) Date: Mon, 11 Nov 2002 11:24:16 -0700 (MST) From: "scott.marlowe" To: David Busby Cc: Zavier Sheran , Subject: Re: Backing up the database via browser In-Reply-To: <013301c289ab$2311feb0$4000000a@busbydev> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-MailBodyFilter: Message body has not been filtered X-MailScanner: Found to be clean X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/50 X-Sequence-Number: 1632 On Mon, 11 Nov 2002, David Busby wrote: > Zavier, > Using PHP You can do a ``, shell_exec, or passthru to run another > process, (search for the word "exec" on php.net). Using that and PostgreSQL > command pg_dump you can pull it off, might take a while, here's some > untested code with no error checking > > $db = $_GET['db']; > $cmd = "pg_dump -c -D -f /tix/miner/miner.sql -F p -N -U postgres $db"; > $res = `$cmd`; > // Alternate: $res = shell_exec($cmd); > echo $res; > ?> He might need to start the $cmd with "/path/to/pg_dump... unless the pgsql path is in httpd's path.