AIP import - bug or my error?

39 views
Skip to first unread message

Chris Clawson

unread,
Jul 25, 2023, 7:31:09 PM7/25/23
to DSpace Technical Support
I just attempted to import an item that had been exported and deleted. I wish to import it back to a new collection but want to preserve the original and full handle. The importer imports the item only as new, seemingly ignoring the -o option. 
The example:
/opt/dspace/bin/dspace packager -o ignoreHandle=false -t AIP -e ch...@mydomain.org -p MHS-01376/6742 /home/chris/IT...@MHS-01376-5381.zip
A new item is created as MHS-01376-6855 and then added to my expected collection. I want to keep the MHS-01376-5381 URI.

I refer to this old URI in my wordpress site and don't want to run around my blog posts and rename many occurrences of these newly restored items. I have tried both "false" and "true" -o options, but neither restores the original handle,  using this command.
Might somebody correct me, please? (This handle has not need reassigned in my existing db).
DSpace 7.6

DSpace Technical Support

unread,
Jul 26, 2023, 2:45:48 PM7/26/23
to DSpace Technical Support
Hi Chris,

I think you might be missing the "-r" flag to tell the packager command that you want to use *restore* mode.  This will also default to setting "ignoreHandle=false", so that option shouldn't be needed.  See the instructions at https://wiki.lyrasis.org/display/DSDOC7x/AIP+Backup+and+Restore#AIPBackupandRestore-DefaultRestoreMode

By default, if you don't specify "-r", then it defaults to "submit" mode which tries to assign a new URI.  For more on the differences between Submit & Restore, see this section of the docs:  https://wiki.lyrasis.org/display/DSDOC7x/AIP+Backup+and+Restore#AIPBackupandRestore-IngestionModes&Options

That said, it does seem like the "ignoreHandle=false" option should have also worked with your command.  Not sure why it would not have worked, but you also may want to check the logs to see if there were errors reported.

Tim

Chris Clawson

unread,
Jul 28, 2023, 5:09:37 PM7/28/23
to DSpace Technical Support
Thanks Tim,
But I don't see any option with the  -R restore command to direct the import to a new collection. The original collection no longer exists, so how will the restore -r command work if the target collection no longer exists?  My Wordpress site still refers to this old item and it's URI. I prefer to direct it to a specific (and new) collection, but don't care too much where it goes because I can always move it around later. I do need to keep the item URI to respect the references elsewhere.

Chris Clawson

unread,
Jul 29, 2023, 10:59:02 AM7/29/23
to DSpace Technical Support
I solved my problem (with Tim's suggestion) I didn't see any examples given for the -r restore option, which include specifying a parent directory. The following example does work. I just included the -p option to specify the new parent collection.  This now takes an old, single item AIP and 'restores" it to a more recently created collection (MHS-01376/6864):
[dspace]/bin/dspace packager -r -a -k -t AIP -e ch...@mydomain.org -p MHS-01376/6864 IT...@MHS-01376-5381.zip
Thanks for the direction
Reply all
Reply to author
Forward
0 new messages