Page History
...
In the above example, the package "aip4567.zip" is restored to the DSpace installation with the Handle provided within the package itself (and added as a child of the parent object specified within the package itself). In addition, any child AIPs referenced by "aip4567.zip" are also recursively ingested (the -a
option specifies to also restore all child AIPs). They are also restored with the Handles & Parent Objects provided with their package. If any object is found to already exist, all changes are rolled back (i.e. nothing is restored to DSpace)
Restore, Keep Existing Mode
When the "Keep Existing" flag (-k
option) is specified, the restore will attempt to skip over any objects found to already exist. It will report to the user that the object was found to exist (and was not modified or changed). It will then continue to restore all objects which do not already exist.
One special case to note: If a Collection or Community is found to already exist, its child objects are also skipped over. So, this mode will not auto-restore items to an existing Collection.
Use this 'packager' command template:
Code Block |
---|
[dspace]/bin/dspace packager -r -a -k -t AIP -e <eperson> <file-path>
|
For example:
Code Block |
---|
[dspace]/bin/dspace packager -r -a -k -t AIP -e admin@myu.edu aip4567.zip
|
In the above example, the package "aip4567.zip" is restored to the DSpace installation with the Handle provided within the package itself (and added as a child of the parent object specified within the package itself). In addition, any child AIPs referenced by "aip4567.zip" are also recursively restored (the -a
option specifies to also restore all child AIPs). They are also restored with the Handles & Parent Objects provided with their package. If any object is found to already exist, it is skipped over (child objects are also skipped). All non-existing objects are restored.
Force Replace Mode
When the "Force Replace" flag (-f
option) is specified, the restore will overwrite any objects found to already exist in DSpace. In other words, existing content is deleted and then replaced by the contents of the AIP(s).
Note | ||
---|---|---|
| ||
|
Restore, Keep Existing Mode
When the "Keep Existing" flag (-k
option) is specified, the restore will attempt to skip over any objects found to already exist. It will report to the user that the object was found to exist (and was not modified or changed). It will then continue to restore all objects which do not already exist.
One special case to note: If a Collection or Community is found to already exist, its child objects are also skipped over. So, this mode will not auto-restore items to an existing Collection.
Use this 'packager' command template:
Code Block |
---|
[dspace]/bin/dspace packager -r -a -k -t AIP -e <eperson> <file-path>
|
For example:
Code Block |
---|
[dspace]/bin/dspace packager -r -a -k -t AIP -e admin@myu.edu aip4567.zip
|
In the above example, the package "aip4567.zip" is restored to the DSpace installation with the Handle provided within the package itself (and added as a child of the parent object specified within the package itself). In addition, any child AIPs referenced by "aip4567.zip" are also recursively restored (the -a
option specifies to also restore all child AIPs). They are also restored with the Handles & Parent Objects provided with their package. If any object is found to already exist, it is skipped over (child objects are also skipped). All non-existing objects are restored.
Force Replace Mode
When the "Force Replace" flag (-f
option) is specified, the restore will overwrite any objects found to already exist in DSpace. In other words, existing content is deleted and then replaced by the contents of the AIP(s).
Warning | ||
---|---|---|
| ||
Warning | ||
| ||
Because this mode actually destroys existing content in DSpace, it is potentially dangerous and may result in data loss! It is recommended to always perform a secondary full backup (assetstore files & database) before attempting to replace any existing object(s) in DSpace. |
...
If any error occurs, the script attempts to rollback the entire replacement process.
Restoring Entire Site
In order to restore an entire Site from a set of AIPs, you must do the following:
...
- 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).
order to restore an entire Site from a set of AIPs, you must do the following:
- 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).
- 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 /full/path/to/your/site-aip.zip
Please note the following about the above restore command:
...
- Notice that you are running this command in "Force Replace" mode (
-r -f
). This is necessary as your empty DSpace install will already include a few default groups (Administrators and Anonymous) and your initial administrative user. You need to replace these groups in order to restore your prior DSpace contents completely. <eperson>
should be replaced with the Email Address of the initial Administrator (who you created when you reinstalled DSpace).<site-handle-prefix>
should be replaced with your DSpace site's assigned Handle Prefix. This is equivalent to thehandle.prefix
setting in yourdspace.cfg
/full/path/to/your/site-aip.zip
...
Please note the following about the above restore command:
...
- is the full path to the AIP file which represents your DSpace SITE. This file will be named whatever you named it when you actually exported your entire site. All other AIPs are assumed to be referenced from this SITE AIP (in most cases, they should be in the same directory as that SITE AIP).
Note | ||
---|---|---|
| ||
|
...
Additional Packager Options
...