X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 38C33DB225 for ; Fri, 28 Oct 2005 18:01:29 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 37990-09 for ; Fri, 28 Oct 2005 21:01:26 +0000 (GMT) Received: from mail.dialmex.net (67.107.77.98.ptr.us.xo.net [67.107.77.98]) by svr1.postgresql.org (Postfix) with ESMTP id 4DDFBDB266 for ; Fri, 28 Oct 2005 18:01:26 -0300 (ADT) Received: from david.dialmex.net (dmxnocws13.dialmex.net [67.107.77.78]) by mail.dialmex.net (Postfix) with ESMTP id 5ECE2EE993; Fri, 28 Oct 2005 16:01:28 -0500 (CDT) Subject: Re: backup/restore APIs From: David Stanaway To: Sean Song Cc: pgsql-interfaces@postgresql.org In-Reply-To: <20051028135731.26794.qmail@web42007.mail.yahoo.com> References: <20051028135731.26794.qmail@web42007.mail.yahoo.com> Content-Type: text/plain Date: Fri, 28 Oct 2005 16:01:28 -0500 Message-Id: <1130533288.15621.8.camel@dmxnocws13.dialmex.net> Mime-Version: 1.0 X-Mailer: Evolution 2.2.3 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.025 required=5 tests=[AWL=0.025] X-Spam-Score: 0.025 X-Spam-Level: X-Archive-Number: 200510/33 X-Sequence-Number: 5795 If your schema is static (Never a safe assumption) you can use the "COPY ... TO ..." SQL using your preferred client library. If you want to keep the state of sequences, and changes to the schema etc, you might be better off using pg_dump. If you want to use that in your app, it probably wouldn't be too hard to link in the code from pg_dump. Keep in mind though, that probably has version dependent code in it as it looks at the system tables, and may be subject to change. On Fri, 2005-10-28 at 06:57 -0700, Sean Song wrote: > Hi, > > I want to do backup/restore Postgresql database from my program, but I > don't want to rely on pg_dump/pg_restore or psql front end tools. Is > there backup/restore functions in the interface libs for this purpose? > > Thanks, > > > pcsps > > ______________________________________________________________________ > Yahoo! FareChase - Search multiple travel sites in one click.