Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 053949F95F4 for ; Tue, 21 Aug 2007 12:34:58 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 77302-03 for ; Tue, 21 Aug 2007 12:34:54 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from rv-out-0910.google.com (rv-out-0910.google.com [209.85.198.184]) by postgresql.org (Postfix) with ESMTP id 4A5899F95AF for ; Tue, 21 Aug 2007 12:34:54 -0300 (ADT) Received: by rv-out-0910.google.com with SMTP id l15so1190050rvb for ; Tue, 21 Aug 2007 08:34:53 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=fkT9o8Hhm/SdjQ+/CIFdAF1OTV84cIXP8r7FMQVs8zuwAzXSOCGTZNAvolfb5Fb1ed/OA0RO8seV2fYU3KkI/yA+dwhbUR1yr19UHUNM7lRYEgh2zOe8+IcLWOOZo8qhae0et+IfrJgJrkUqaaiagG7EC16BsPUWj51FxI8rItc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=mVEJy/FhhWNixLD90PedO4OzecJIYfz53RdJ14SU7LWHABkiYjb9y09fhVCYa1N5QHc23NKPWQZc4FXp0f3CeQL5hDALq0+j7ax2lm+ump5J/3bomoAtL1ZUJzubjg0/fSIPN93FyvSEkAT/cZISGOhcMdSkmMlIVMWrdhWyvZw= Received: by 10.141.37.8 with SMTP id p8mr3443030rvj.1187710493424; Tue, 21 Aug 2007 08:34:53 -0700 (PDT) Received: by 10.141.98.12 with HTTP; Tue, 21 Aug 2007 08:34:53 -0700 (PDT) Message-ID: Date: Tue, 21 Aug 2007 10:34:53 -0500 From: "Scott Marlowe" To: "Kevin Grittner" Subject: Re: Dump & Load a database??? Cc: pgsql-admin@postgresql.org, smiley2211 In-Reply-To: <46CAB713.EE98.0025.0@wicourts.gov> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <12256258.post@talk.nabble.com> <46CAB713.EE98.0025.0@wicourts.gov> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200708/254 X-Sequence-Number: 26585 On 8/21/07, Kevin Grittner wrote: > >>> On Tue, Aug 21, 2007 at 9:50 AM, in message <12256258.post@talk.nabble.com>, > smiley2211 wrote: > > > Do I have to DROP \ recreate and load the target database (this is what I > > currently do)? is there a way to just do an IN PLACE load like in other > > RDBMS environments??? > > > > pg_dump proddb | gzip > proddb_082107.sql.gz > > > > gunzip < proddb_082107.sql.gz | psql -d testdb -f - > > You might want to consider using one or both of these pg_dump options: > > -c, --clean clean (drop) schema prior to create > -C, --create include commands to create database in dump and note that you don't need a file in between steps. pg_dump -c proddb | psql -d testdb pg_dump --help and psql --help will give you a list of all the switches you can throw at them.