Search code examples
backuprestorehandledspace

Exception thrown when restoring full site AIP backup in DSpace


I'm attempting to migrate a full DSpace installation (4.x) to a new 6.1. I'm performing

[dspace]/bin/dspace packager -d -a -t AIP -e repo@institution.edu -i OURHANDLE/0 sitewide-aip.zip

to export the entire site, without any special issues. The output are many .zip files including the sitewide-aip.zip.

The problem is when trying to restore in the new DSpace installation. After performing

[dspace]/bin/dspace packager -r -a -f -t AIP -e repo@institution.edu -i OURHANDLE/0 -o skipIfParentMissing=true /path/to/sitewide-aip.zip

an exception is thrown

Exception: Bad identifier/handle -- Cannot resolve handle "OURHANDLE/0"
java.lang.IllegalArgumentException: Bad identifier/handle -- Cannot resolve handle "OURHANDLE/0"
at org.dspace.app.packager.Packager.main(Packager.java:342)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:229)
at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:81)

Can't figure out why this is happening, since HANDLE/0 is suppossed to refer to base handle of the whole installation according to what I've researched so far.


Solution

  • What is your handle prefix? It can be found in your dspace.cfg file.

    https://github.com/DSpace/DSpace/blob/dspace-6_x/dspace/config/dspace.cfg#L249

    You should use that value for the command.

    You should also be able to find it in your database using the following query

     select * from handle where handle like '%/0';