X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 68BA8D1DCCF for ; Wed, 21 Apr 2004 09:46:53 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 43527-04 for ; Wed, 21 Apr 2004 09:46:55 -0300 (ADT) Received: from atlantis.aerodynamics.ch (mail02.aerodynamics.ch [192.54.122.8]) by svr1.postgresql.org (Postfix) with SMTP id 27FE0D1DC74 for ; Wed, 21 Apr 2004 09:46:51 -0300 (ADT) Received: from aerodynamics.ch (susi95.fwe-tf.ch [192.168.0.95]) by atlantis.aerodynamics.ch (8.11.6/8.11.6) with ESMTP id i3LCksh00603 for ; Wed, 21 Apr 2004 14:46:54 +0200 Message-ID: <40866D3E.3060600@aerodynamics.ch> Date: Wed, 21 Apr 2004 14:46:54 +0200 From: Fischer Ulrich Organization: Ruag Aerospace User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) Gecko/20030906 X-Accept-Language: de-ch, en-us, en MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: problem with pg_dump and pg_restore Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200404/275 X-Sequence-Number: 13248 Hi I try to move my datas from a postresql 7.3.2 to a postgresql 7.4.1. The database was dumped with: pg_dumpall -g GLOBALobjects.sql pg_dump -s DATABASE > DBschema.sql pg_dump -Fc DATABASE > DBdata.tar and rebuilt on the new system with: createdb DATABASE psql DATABASE < GLOBALobjects.sql psql DATABASE < tsearch2.sql psql DATABASE < DBschema.sql pg_restore -N -a -v -d DATABASE DBdata.tar All semms to go well except the restoring. pg_restore prints the following report: fi@susi179:/tmp> pg_restore -N -a -v -d codasdb codasdbdump-d.tar pg_restore: connecting to database for restore pg_restore: executing SEQUENCE SET anschrift_ansid_seq : pg_restore: executing SEQUENCE SET dokument_docnum_paper_seq pg_restore: restoring data for table "linkthemen" pg_restore: restoring data for table "links" pg_restore: restoring data for table "anschrift" pg_restore: restoring data for table "kontakt" pg_restore: restoring data for table "mitarbeiter" pg_restore: restoring data for table "kunde" pg_restore: restoring data for table "kontaktperson" pg_restore: restoring data for table "versuch" pg_restore: [archiver (db)] could not execute query: ERROR: insert or update on table "versuch" violates foreign key constraint "$1" DETAIL: Key (proid)=(0) is not present in table "projekt". pg_restore: *** aborted because of error Why are the tables not restored or better dumped in the correct order? Is there a solution to solve this problem? Thanks for any help Ulrich -- Ulrich G. Fischer Dipl. Natw. ETH Center Aerodynamics Ruag Aerospace P.O. Box 301 CH-6032 Emmen Tel. +41 41 268 23 53 Fax. +41 41 268 38 97 ulrich.fischer@aerodynamics.ch www.ruag.com