X-Original-To: pgsql-admin@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 3546A474E4F for ; Sat, 26 Apr 2003 17:26:59 -0400 (EDT) Received: from avocet.mail.pas.earthlink.net (avocet.mail.pas.earthlink.net [207.217.120.50]) by postgresql.org (Postfix) with ESMTP id 8D3BC474E42 for ; Sat, 26 Apr 2003 17:26:58 -0400 (EDT) Received: from 0-1pool116-137.nas15.indianapolis1.in.us.da.qwest.net ([65.128.116.137] helo=nick) by avocet.mail.pas.earthlink.net with smtp (Exim 3.33 #1) id 199XCE-0003sk-00; Sat, 26 Apr 2003 14:26:58 -0700 Reply-To: From: "Nick Fankhauser" To: , Subject: Re: pg_restore vs psql Date: Sat, 26 Apr 2003 16:24:48 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) In-Reply-To: <200304261248.h3QCmJn02369@ns.naus.home> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Importance: Normal X-Spam-Status: No, hits=-16.7 required=5.0 tests=BAYES_10,IN_REP_TO,MSGID_GOOD_EXCHANGE,QUOTED_EMAIL_TEXT, RCVD_IN_NJABL autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/370 X-Sequence-Number: 8525 Erwin- If you created your dump file using the -Fc or -Ft format switches, you'll need to use pg_restore to restore from the dump file. Without the format switches, pg_dump creates a plain text file of psql commands. Generally, I'd say that if you intend to restore the entire contents of your dump file, then using the plain text format (& compressing with gzip if needed) is the way to go. If you need the ability to selectively restore some part of the dump file, (like one table) then you should use one of the non-text formats for pg_dump and thus need to restore using pg_restore. I've learned that doing a complete restore of a non-text dump file using pg_restore is a real pain, so our backup strategy includes creating both a tar-format and plain text dump file of the entire database so we are positioned to do either a partial or full restore with ease. Regards, -Nick --------------------------------------------------------------------- Nick Fankhauser nickf@doxpop.com Phone 1.765.965.7363 Fax 1.765.962.9788 doxpop - Court records at your fingertips - http://www.doxpop.com/ > -----Original Message----- > From: pgsql-admin-owner@postgresql.org > [mailto:pgsql-admin-owner@postgresql.org]On Behalf Of Erwin Ambrosch > Sent: Saturday, April 26, 2003 7:48 AM > To: pgsql-admin@postgresql.org > Subject: [ADMIN] pg_restore vs psql > > > Hi, > > can one tell me whether there are main differences in using > pg_restore of "psql -f mydb.dump mydb" on a file created with pg_dump. > > Thaks Erwin > > > ---------------------------(end of broadcast)--------------------------- > TIP 6: Have you searched our list archives? > > http://archives.postgresql.org >