Broken DOIs after Restoring Collection from AIP... how to fix?

63 views
Skip to first unread message

Carolyn Sullivan

unread,
Oct 3, 2024, 10:42:02 AM10/3/24
to DSpace Technical Support
Hello everyone,

A collection was accidentally deleted in our repository and we've restored it using an AIP (see this thread for Part I of this adventure).

Tragically, when the collection was restored, new handles and internal ids seem to have been assigned to all the items.  As a result, DOIs assigned to the items no longer resolve and the statistics history for these items has disappeared.

Our systems analyst believes we can get back the old handles and related statistics using Force Replace mode: https://wiki.lyrasis.org/display/DSDOC7x/AIP+Backup+and+Restore#AIPBackupandRestore-ForceReplaceMode

However, we see this has a significant warning attached, a la 'because this mode actually destroys existing content in DSpace, it is potentially dangerous and may result in data loss!'  I assume we'd lose any modifications made to items since the creation of this AIP that are included in both this collection and a non-deleted collection.  Are there any other issues we need to be aware of in running this mode?

Crossposting to DSpace Slack.

Thanks,
Carolyn.

DSpace Technical Support

unread,
Oct 3, 2024, 11:17:45 AM10/3/24
to DSpace Technical Support
Hi Carolyn,

Yes, "force replace" might be your best option here.  That warning is there because it *does destroy* in DSpace that is found to be duplicative.  So, if you force replace a Collection, then it will overwrite everything in that Collection (even group memberships/permissions) based on what is in the AIP.  Same with Items, it will overwrite everything on the existing item (metadata, files, even permissions) based on what is in the AIP.

Ideally, you would find a way to *test* the process beforehand to ensure you don't accidentally destroy something you wanted to keep.  But, since it sounds like you are only going to "force replace" the objects that were *wrongly* restored, hopefully that won't be a problem.  Though, I guess you could consider testing the force replace on a *single* Item or a handful of Items to make sure it fixes the problems you are hoping to fix.

Tim

Carolyn Sullivan

unread,
Oct 3, 2024, 3:09:37 PM10/3/24
to DSpace Technical Support
Thanks  for the recommendations, Tim.  We've run some tests and are retrying the restoration now, will let you know how it goes!

Carolyn Sullivan

unread,
Oct 3, 2024, 4:17:35 PM10/3/24
to DSpace Technical Support
So we have a new problem.  We need to delete the restored community before we run it again with the -f command, or else we'll end up with duplicated items, but when we tried to delete the newly restored community THIS time, it deleted a handful of items before the interface timed out, and when we checked the logs, we found errors for deleting items.  We can't figure out why was able to delete the community the first time around, when we're running into this issue deleting the restored community.  So...

(1) Is there a way to delete the restored community from commandline?
(2) Has anyone run into these kind of errors and timeouts on attempting to delete a community or collection before?

Additional notes on why we concluded we needed to the delete the restored community before running the restore from AIP with f command:
We ran a test on a single item that was previously restored in a test instance.  Running the -f option on the single item resulted in retention of the previously restored item (which had a new handle/item id), along with restoration of the item from the AIP (with the original handle/item ID from before the collection was deleted and the first restore process without the -f option ran).  The item appeared twice in the collection in this case.  So we had to delete the collection again and run the restoration process again, this time with the -f command, in order to avoid duplicating the entire collection. 

Any assistance would be deeply appreciated!
Carolyn.



DSpace Technical Support

unread,
Oct 3, 2024, 4:59:56 PM10/3/24
to DSpace Technical Support
Hi Carolyn,

I don't believe there's an official commandline script for deleting communities, but *obviously* you can send commands to the REST API from commandline (or other tools).    Here's how to delete a community via a REST call (after you login as an Admin first, obviously): https://github.com/DSpace/RestContract/blob/main/communities.md#deleting-a-community   

Some institutions have also created their own various libraries that work against the DSpace REST API.  So, these might be useful too, as sometimes it can be easier to work with a library than build your own commandline script.  Here's an example Python library from the Library Code: https://github.com/the-library-code/dspace-rest-python

I'm not aware of anyone reporting issues with *deleting* content in DSpace.  My recommendation would be to share the errors if you cannot figure it out.  It doesn't make sense to me either why it would work the first time and not work the second time.

Tim

Carolyn Sullivan

unread,
Oct 8, 2024, 8:16:21 AM10/8/24
to DSpace Technical Support
Hello Tim,

Thanks so much for the helpful advice and moral support these past couple of weeks :)  We (and by we, I mostly mean our awesome Systems Analyst, François) have managed to restore the collection that was originally deleted, huzzah!

Re: the weird deleting errors:  It turns out the errors appeared while the process was running both the first and the second time, BUT the process still ran to completion both times without any actual effects relating to those errors that we could see--ie. at the end, everything deleted.  So that was weird.  

Adding an image of the errors that appeared in case this is relevant to anyone in the future, or in case these errors point to any issues we should resolve:

First (accidental) deletion:

Deletion_InitialSept_Edit.png

Second deletion run:
DeletionErrors_100324.png

Again, thanks everyone for your time and support!
Carolyn.
Reply all
Reply to author
Forward
0 new messages