X-Original-To: pgsql-admin@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id D94064758E6 for ; Fri, 4 Apr 2003 13:19:43 -0500 (EST) Received: from localhost.localdomain (unknown [65.217.53.66]) by postgresql.org (Postfix) with ESMTP id 41C52474E42 for ; Fri, 4 Apr 2003 13:19:42 -0500 (EST) Received: from thorn.mmrd.com (thorn.mmrd.com [172.25.10.100]) by localhost.localdomain (8.12.8/8.12.5) with ESMTP id h34Iuvkj022679; Fri, 4 Apr 2003 13:56:57 -0500 Received: from gnvex001.mmrd.com (gnvex001.mmrd.com [192.168.3.55]) by thorn.mmrd.com (8.11.6/8.11.6) with ESMTP id h34IJcx26652; Fri, 4 Apr 2003 13:19:39 -0500 Received: from camel.mmrd.com ([172.25.5.213]) by gnvex001.mmrd.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id F3HTL7Z6; Fri, 4 Apr 2003 13:19:38 -0500 Subject: Re: restore a dump file (with postgis tables): errors!! From: Robert Treat To: Pedro Salazar Cc: pgsql-admin In-Reply-To: <1049450199.10862.55.camel@vitoria.intra.cet.pt> References: <1049450199.10862.55.camel@vitoria.intra.cet.pt> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.8 Date: 04 Apr 2003 13:19:38 -0500 Message-Id: <1049480378.8125.187.camel@camel> Mime-Version: 1.0 X-Spam-Status: No, hits=-38.8 required=5.0 tests=BAYES_01,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, REFERENCES,REPLY_WITH_QUOTES,USER_AGENT_XIMIAN 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/59 X-Sequence-Number: 8214 On Fri, 2003-04-04 at 04:56, Pedro Salazar wrote: > Greetings, > > I have a pgsql 7.3 database where I created postgis tables and my schema > with my object model database. I want to dump my database and restore it > in another machine with pgsql (also 7.3.2). > > what I did: > > 1- pg_dump -U postgres locawadb | gzip > locawa1.dmp.gz > > 2- createdb -U postgres locawadb > (create users in database) > gunzip -c locawa1.dmp.gz | psql -U postgres locawadb > > But I got a few errors on the 2 step. > > With -a option (echo) in psql I noticed that some errors where about: > > - the user owner from my schema could not create a schema (well I > supposed that this operation should be done through super user > postgres); > - that functions like srid() and others did not exist!? (shouldn't > postgres warrant the order of dependences?); > - that some user tables from my schema with geom data types failed to > restore; > - and a few class errors (?) and invalid namespace of my schema!! > I'm wondering if your second database has postgis properly set up? I'm not familiar with it, but it sounds like the postgis support isn't meshing. > My question is: are my procedures of dump and restore database well > done? (I already saw that exist a pg_restore command line, ...is it > equal to the psql command line or it's better?) It's better in some cases worse in others. Probably worth a try. You might also try and dump only your schema and restore that to make sure that the schema is being transferred correctly before you worry about the data. Robert Treat