From DSpace 7.6 to DSpace 8.0 dump restore error (pg_restore: error)

129 views
Skip to first unread message

Alex B

unread,
Jul 19, 2024, 8:32:49 AM7/19/24
to DSpace Technical Support
Dear Colleagues,
tried to transfer the database dump from DSpace 7.6 to DSpace version 8.0:

pg_restore: dropping CONSTRAINT item item_uuid_key
pg_restore: while PROCESSING TOC:
pg_restore: from TOC entry 3637; 2606 18745 CONSTRAINT item item_uuid_key dspace
pg_restore: error: could not execute query: ERROR:  cannot drop constraint item_uuid_key on table public.item because other objects depend on it
DETAIL:  constraint item_uuid_fkey on table public.qaevent_processed depends on index public.item_uuid_key
constraint notifypatterns_to_trigger_item_id_fkey on table public.notifypatterns_to_trigger depends on index public.item_uuid_key
HINT:  Use DROP ... CASCADE to drop the dependent objects too.
Command was: ALTER TABLE IF EXISTS ONLY public.item DROP CONSTRAINT IF EXISTS item_uuid_key;
---------------------------------------
Сreated the dump with this command:
pg_dump -U postgres -W -h localhost -Fc -v -C -E UTF8 -d dspace -f dspace.sql

tried to transfer:
pg_restore -U postgres -W -h localhost -v -e -c --if-exists -d dspace dspace.sql

PostgreSQL 15
------------------------------------------
Has the database structure changed in the DSpace 8.0?
Help me fix this error.

DSpace UI 8 / REST API 8

Best regards,
Alex







DSpace Technical Support

unread,
Jul 25, 2024, 4:26:56 PM7/25/24
to DSpace Technical Support
Hi Alex,

There are database modifications in every release, but there's no code in DSpace 8.0 which tries to run "ALTER TABLE IF EXISTS ONLY public.item DROP CONSTRAINT IF EXISTS item_uuid_key;"  So, the error isn't making sense to me.  The only place in DSpace that I see an "item_uuid_key" constraint is here on the new "qaevent_processed" table (newly added in 8.0): https://github.com/DSpace/DSpace/blob/dspace-8_x/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/V8.0_2023.08.07__qaevent_processed.sql#L16    But, in that situation that's a *new* constraint and not one that should be deleted.

You might consider re-trying the data migration, or even using our official migration recommendations in the documentation at https://wiki.lyrasis.org/display/DSDOC8x/Migrating+DSpace+to+a+new+server   This guide walks through the recommended way to export data from one DSpace, and then migrate that data into a new instance...and it can be used to upgrade from 7.x to 8.0.

Tim

Alex B

unread,
Aug 2, 2024, 9:46:10 AM8/2/24
to DSpace Technical Support
Hi Tim,

Thank you very much. The dump was successfully migrated to the version of DSpace 8.

pg_dump -U dspace -W -h localhost > output_file.sql // from old
psql -U dspace dspace -W -h localhost < output_file.sql // to new

Best regards,
Alex



> 25 июля 2024 г., в 23:26, DSpace Technical Support <dspac...@googlegroups.com> написал(а):
> --
> All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
> ---
> You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/4f021048-e76f-47b8-bf70-421881a68259n%40googlegroups.com.


Reply all
Reply to author
Forward
0 new messages