Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 8556164FCD4 for ; Wed, 27 Aug 2008 11:13:03 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 06461-01 for ; Wed, 27 Aug 2008 11:12:54 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.186]) by postgresql.org (Postfix) with ESMTP id B43ED64FCD5 for ; Wed, 27 Aug 2008 11:12:59 -0300 (ADT) Received: by nf-out-0910.google.com with SMTP id c7so1158855nfi.23 for ; Wed, 27 Aug 2008 07:12:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; 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; bh=xXpDLt8lF5RTj87jq66BwjMZGyGaIvN6/H7fJQ1/XU4=; b=dSjb+2RrwE03BYTrRw1dYRnkgLPsKK0IwIJy+t8Uc1Wchm205s28KK40z7iKFrN2+c W2tQoGeThwcqlj9JYyXzwhPvdOPv2L5S2XK93QtTYWLOOtseVR2lRdWFyEQ2uCd9sFUu Kz1mluWR04hyTVHfjDKSWjtIahdyRiBXkrJ5s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=hIFTSB6wbxPPavqCYg8tSk93sdGQUGxdgZz0Q+uSrTApuT/kig5MCAXY9UqksWlFE+ CJWkSjuNrNp/Df8znvC1dQkCMzI4B743ZN6eB50B5KPMnXn9H+7irTgSDAPqVcoaVpeH EYg0NPXydz2+K7jrKreo2fQQhg5q3l7b+xTRQ= Received: by 10.210.48.14 with SMTP id v14mr4083189ebv.71.1219846377847; Wed, 27 Aug 2008 07:12:57 -0700 (PDT) Received: by 10.210.130.1 with HTTP; Wed, 27 Aug 2008 07:12:57 -0700 (PDT) Message-ID: Date: Wed, 27 Aug 2008 22:12:57 +0800 From: "Phoenix Kiula" To: "Tom Lane" Subject: Re: Dumping/Restoring with constraints? Cc: "PG-General Mailing List" In-Reply-To: <22708.1219845242@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <22708.1219845242@sss.pgh.pa.us> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200808/945 X-Sequence-Number: 136775 > The recommended solution is to use a regular schema-and-data dump. > If you really have to separate schema and data, the --disable-triggers > switch might help, though you open yourself to the possibility of > loading inconsistent data that way. Thanks Tom. This is the dump command being used on a 8.2.3 database on Linux: $ pg_dumpall > mydb.sql $ umask 077 $ gzip mydb.sql Then I download the mydb.sql.gz file into my local computer (Mac OSX with 8.3.3) and unzip it to mydb.sql. The local database is already created, with all tables and constraints and all. Here is the command I use to restore: $ psql -d mydb -U myuser -h localhost --file=mydb.sql Is this not the recommended method?