Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: added advice on how to clean up after a failed import

...

  1. Install a completely "fresh" version of DSpace by following the Installation instructions in the DSpace Manual
    • At this point, you should have a completely empty, but fully-functional DSpace installation. You will need to create an initial Administrator user in order to perform this restore (as a full-restore can only be performed by a DSpace Administrator).
  2. Once DSpace is installed, run the following command to restore all its contents from AIPs

    Code Block
     [dspace]/bin/dspace packager -r -a -f -t AIP -e <eperson> -i <site-handle-prefix>/0 -o skipIfParentMissing=true /full/path/to/your/site-aip.zip
    

     

    1. While the "-o skipIfParentMissing=true" flag is optional, it is often necessary whenever you are performing a large hierarchical site restoration. Please see the Additional Packager Options section below.

Please note the following about the above restore command:

...

Note
titleHighly Recommended to Update Database Sequences after a Large Restore

In some cases, when you restore a large amount of content to your DSpace, the internal database counts (called "sequences") may get out of sync with the Handles of the content you just restored. As a best practice, it is highly recommended to always re-run the "update-sequences.sql" script on your DSpace database after a larger scale restore. This database script should be run while DSpace is stopped (you may either stop Tomcat or just the DSpace webapps). PostgreSQL/Oracle must be running. The script can be found in the following locations for PostgreSQL and Oracle, respectively:
 [dspace]/etc/postgres/update-sequences.sql
 [dspace]/etc/oracle/update-sequences.sql

Cleaning up from a failed import

Sometimes your packager import of AIP packages can fail, due to lack of memory (see below for advice on better performance, please use JAVA_OPTS to set your memory higher than the default). If that happens, DSpace by design will leave the bitstreams it did import sucessfully, but they will be oprphaned, and will just occupy space in your assetstore. The standard DSpace cleanup cron job will clean up these orphaned bitstreams, however, you can also clean them up manually by running the following command:

Code Block
languagebash
titleClean up after a failed import
[dspace]/bin/dspace cleanup -v

Performance considerations

...