Hi Sean, The "[dspace]/etc/" folder was removed in DSpace 7 because all the old SQL scripts (which used to sit in "etc" in older versions of DSpace) have been moved elsewhere. This folder was already "mostly" empty in DSpace 5 & 6, and we completely emptied it out & removed it in DSpace 7.
* SQL migration scripts (which used to be in that folder in 4.x or below) were all migrated to https://github.com/DSpace/DSpace/tree/main/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres, as they are all now controlled by Flyway DB (as of DSpace 5.x) * The old "update-sequences.sql" SQL script (which used to be in that folder in 5.x or 6.x) has been replaced by the "./dspace database update-sequences" command So, if you see a "[dspace]/etc" folder, it can be safely removed after you upgrade to DSpace 7. Any SQL scripts in that folder are outdated and unnecessary in DSpace 7. Tim ________________________________ From: [email protected] <[email protected]> on behalf of Sean Carte <[email protected]> Sent: Thursday, July 14, 2022 9:53 AM To: Michael Plate <[email protected]> Cc: DSpace Technical Support <[email protected]> Subject: Re: [dspace-tech] Duplicate key after restoring server from AIP backup Thanks for the advice, Michael. I do wonder, though, why the /dspace/etc/ directory is missing in 7.x? It doesn't seem to be there in: https://github.com/DSpace/DSpace/tree/main/dspace I took a copy from a 6.x installation, and ran it with psql. Apart from a couple of errors, it seemed to work and I can now deposit items. ERROR: relation "workflowitem" does not exist LINE 1: ...setval('workflowitem_seq', max(workflow_id)) FROM workflowit... ^ ERROR: relation "tasklistitem" does not exist LINE 1: ...setval('tasklistitem_seq', max(tasklist_id)) FROM tasklistit... Sean On Thu, 14 Jul 2022 at 12:48, Michael Plate <[email protected]<mailto:[email protected]>> wrote: Hi Sean, at least this you might correct this by setting the handle_seq to a value greater than the last handle. I don't recommend that for important systems :) Michael Am 14.07.22 um 08:02 schrieb Sean Carte: > I restored an entire site from an AIP backup, and now, when I attempt to > submit an item, I get this error: > > Caused by: java.sql.BatchUpdateException: Batch entry 0 update > public.handle set > resource_id='26a7cedb-76e7-4acc-a515-37708a3e1c7b'::uuid, > handle='123456789/9', resource_type_id=2 where handle_id=264 was > aborted: ERROR: duplicate key value violates unique constraint > "handle_handle_key" > Detail: Key (handle)=(123456789/9) already exists. Call > getNextException to see other errors in the batch. > > I think this is because I haven't run the update-sequences.sql that the > documentation suggests I should, but I can't find that script; there > isn't even a /dspace/etc/ directory: > > ls /dspace/ > assetstore exports log solr upload > bin handle-server reports temp var > config lib sitemaps triplestore webapps > > This is the documentation I've been using: > > https://wiki.lyrasis.org/display/DSDOC7x/AIP+Backup+and+Restore#AIPBackupandRestore-RestoringEntireSite > <https://wiki.lyrasis.org/display/DSDOC7x/AIP+Backup+and+Restore#AIPBackupandRestore-RestoringEntireSite> > > DSpace version: 7.3-SNAPSHOT > SCM revision: e5f316c9adf78e59d8277a271a0fc2a2d21da0f8 > SCM branch: main > OS: Linux(amd64) version 5.4.0-120-generic > Applications: > Discovery: enabled. > JRE: Private Build version 11.0.15 > Ant version: Apache Ant(TM) version 1.10.7 compiled on October 24 2019 > Maven version: 3.6.3 > DSpace home: /dspace > > Sean > > -- > All messages to this mailing list should adhere to the Code of Conduct: > https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx > <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 > [email protected]<mailto:dspace-tech%[email protected]> > <mailto:[email protected]<mailto:dspace-tech%[email protected]>>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/dspace-tech/CA%2BxAuhMkoCiM%2BRJafRddPpH15wU%2BfB%3DJBwnAYA6m_OmogX9OhA%40mail.gmail.com > <https://groups.google.com/d/msgid/dspace-tech/CA%2BxAuhMkoCiM%2BRJafRddPpH15wU%2BfB%3DJBwnAYA6m_OmogX9OhA%40mail.gmail.com?utm_medium=email&utm_source=footer>. -- 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 [email protected]<mailto:dspace-tech%[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/cd567e6a-5b3d-23fd-a83c-a5bd32073dd7%40bibliothek.uni-kassel.de. -- 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 [email protected]<mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/CA%2BxAuhOnZJ5kcBYy4DS%2BM%3DyW1wqyaayBaCK5Q1kiajiGweq8Tg%40mail.gmail.com<https://groups.google.com/d/msgid/dspace-tech/CA%2BxAuhOnZJ5kcBYy4DS%2BM%3DyW1wqyaayBaCK5Q1kiajiGweq8Tg%40mail.gmail.com?utm_medium=email&utm_source=footer>. -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/PH0PR22MB32744385880E2925E7F868FBED889%40PH0PR22MB3274.namprd22.prod.outlook.com.
