Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Default Restore Mode (-r) = Attempt to restore object (and optionally children). Rollback all changes if any object is found to already exist.
  2. Restore, Keep Existing Mode (-r -k) = Attempt to restore object (and optionally children). If an object is found to already exist, skip over it (and all children objects), and continue to restore all other non-existing objects.
  3. Force Replace Mode (-r -f) = Restore an object (and optionally children) and overwrite any existing objects in DSpace. Therefore, if an object is found to already exist in DSpace, its contents are replaced by the contents of the AIP. WARNING: This mode is potentially dangerous as it will permanently destroy any object contents that do not currently exist in the AIP. You may want to perform a secondary backup, unless you are sure you know what you are doing!
Info
titleRestoring a Single AIP

All of the below examples show how to restore an entire hierarchy of objects (using -a option). To restore a single object, you can use the same commands, but remove the -a option.

Default Restore Mode

By default, the restore mode (-r option) will throw an error and rollback all changes if any object is found to already exist. The user will be informed if which object already exists within their DSpace installation.

Restore a Single AIP: Use this 'packager' command template to restore a single object from an AIP (not including any child objects):

Code Block
 [dspace]/bin/dspace packager -r -a -t AIP -e <eperson> <file<AIP-file-path>

For example:

Restore a Hierarchy of AIPs: Use this 'packager' command template to restore an object from an AIP along with all child objects (from their AIPs):

Code Block
 [dspace]/bin/dspace packager -r -a -t AIP -e <eperson> <AIP-file-path>

For example:

Code Block
Code Block
 [dspace]/bin/dspace packager -r -a -t AIP -e admin@myu.edu aip4567.zip

...

Note
titleHighly Recommended to Update Database Sequences after a Large Restore

Wiki Markup
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 can be run while the system is online (i.e. no need to stop Tomcat or PostgreSQL).  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}}

Info
titleMore Information on using Default Restore Mode with Community/Collection AIPs
  • Using the Default Restore Mode without the -a option, will only restore the metadata for that specific Community or Collection. No child objects will be restored.
  • Using the Default Restore Mode with the -a option, will only successfully restore a Community or Collection if that object along with any child objects (Sub-Communities, Collections or Items) do not already exist. In other words, if any objects belonging to that Community or Collection already exist in DSpace, the Default Restore Mode will report an error that those object(s) could not be recreated. If you encounter this situation, you will need to perform the restore using either the Restore, Keep Existing Mode or the Force Replace Mode (depending on whether you want to keep or replace those existing child objects).
Restore, Keep Existing Mode

...