From: | Fischer Ulrich <ulrich(dot)fischer(at)aerodynamics(dot)ch> |
---|---|
To: | pgsql-admin(at)postgresql(dot)org |
Subject: | problem with pg_dump and pg_restore |
Date: | 2004-04-21 12:46:54 |
Message-ID: | 40866D3E.3060600@aerodynamics.ch |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
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(at)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(dot)fischer(at)aerodynamics(dot)ch www.ruag.com
From | Date | Subject | |
---|---|---|---|
Next Message | Grega Bremec | 2004-04-21 13:28:23 | Re: problem with pg_dump and pg_restore |
Previous Message | Matthew T. O'Connor | 2004-04-21 11:59:45 | Re: pg_autovacuum crashes when query fails for temp tables |