From seanpssong@yahoo.com Fri Oct 28 13:57:32 2005 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 6F621DB216 for ; Fri, 28 Oct 2005 10:57:32 -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 44840-10 for ; Fri, 28 Oct 2005 13:57:28 +0000 (GMT) Received: from web42007.mail.yahoo.com (web42007.mail.yahoo.com [66.218.93.175]) by svr1.postgresql.org (Postfix) with SMTP id BE58ADA41F for ; Fri, 28 Oct 2005 10:57:30 -0300 (ADT) Received: (qmail 26796 invoked by uid 60001); 28 Oct 2005 13:57:31 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=0sJgYso1K1ATbq47+99xfOmxWFzb0n/uNKS13ungt1RqmLE8EDxnT4ma1i84bxz0h1U5CI02pG7K7lFbZvV5kTqaP0TN1oBN2XjCnMlTcrZSraqu3X7fdROeb0BPCGYoLbyKzuv7s21m8KNgIUsaxcA/xmkWeJHP5zdzZ6Q8vSU= ; Message-ID: <20051028135731.26794.qmail@web42007.mail.yahoo.com> Received: from [199.246.133.126] by web42007.mail.yahoo.com via HTTP; Fri, 28 Oct 2005 06:57:31 PDT Date: Fri, 28 Oct 2005 06:57:31 -0700 (PDT) From: Sean Song Subject: backup/restore APIs To: pgsql-interfaces@postgresql.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1249117008-1130507851=:26787" Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.48 required=5 tests=[DNS_FROM_RFC_ABUSE=0.479, HTML_MESSAGE=0.001] X-Spam-Score: 0.48 X-Spam-Level: X-Archive-Number: 200510/31 X-Sequence-Number: 5793 --0-1249117008-1130507851=:26787 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit 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. --0-1249117008-1130507851=:26787 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit
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. --0-1249117008-1130507851=:26787-- From david@stanaway.net Fri Oct 28 21:01:29 2005 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. From peter_e@gmx.net Sat Oct 29 00:07:37 2005 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 831BBDB205 for ; Fri, 28 Oct 2005 21:07:37 -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 04502-05 for ; Sat, 29 Oct 2005 00:07:34 +0000 (GMT) Received: from gauss.credativ.com (ipx11302.ipxserver.de [212.112.227.254]) by svr1.postgresql.org (Postfix) with ESMTP id 48F49DB298 for ; Fri, 28 Oct 2005 21:07:36 -0300 (ADT) Received: from [192.168.2.4] (p54B3E790.dip.t-dialin.net [84.179.231.144]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by gauss.credativ.com (Postfix) with ESMTP id 5A611D7648; Sat, 29 Oct 2005 02:07:37 +0200 (CEST) From: Peter Eisentraut To: Sean Song Subject: Re: backup/restore APIs Date: Sat, 29 Oct 2005 02:07:29 +0200 User-Agent: KMail/1.8.1 Cc: pgsql-interfaces@postgresql.org References: <20051028135731.26794.qmail@web42007.mail.yahoo.com> In-Reply-To: <20051028135731.26794.qmail@web42007.mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200510290207.30054.peter_e@gmx.net> 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/34 X-Sequence-Number: 5796 Am Freitag, 28. Oktober 2005 15:57 schrieb Sean Song: > 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? No.