-
Notifications
You must be signed in to change notification settings - Fork 35
Basic DSpace Import Process
Once you have your data in Simple Archive Format, you can do with it whatever you like. I frequently then import it into DSpace, and here is an example command of how I do that.
First, make your dspace-user or tomcat-user the owner of the content.
sudo chown -R tomcat:tomcat /home/peterdietz/Desktop/MelanieSeedsBAtch/SimpleArchiveFormat
Its usually best to import as your dspace-user or tomcat-user.
sudo su tomcat
Then run DSpace Import.
/dspace/bin/dspace import -a
-e [email protected]
-c 1811/49710
-s /home/peterdietz/Desktop/MelanieSeedsBatch/SimpleArchiveFormat/
-m /home/peterdietz/Desktop/MelanieSeedsBatch/seedsbatch1.map
Here's the full syntax of DSpace's ItemImport
usage: ItemImport
-t,--test test run - do not actually import items
-R,--resume resume a failed import (add only)
-a,--add add items to DSpace
-c,--collection destination collection(s) Handle or database ID
-d,--delete delete items listed in mapfile
-e,--eperson email of eperson doing importing
-h,--help help
-m,--mapfile mapfile items in mapfile
-n,--notify if sending submissions through the workflow, send
notification emails
-p,--template apply template
-q,--quiet don't display metadata
-r,--replace replace items in mapfile
-s,--source source of items (directory)
-w,--workflow send submission through collection's workflow
-z,--zip name of zip file
adding items: ItemImport -a -e eperson -c collection -s sourcedir -m mapfile
adding items from zip file: ItemImport -a -e eperson -c collection -s sourcedir -z filename.zip -m mapfile
replacing items: ItemImport -r -e eperson -c collection -s sourcedir -m mapfile
deleting items: ItemImport -d -e eperson -m mapfile
If multiple collections are specified, the first collection will be the one that owns the item.
Finally, once the import has completed, you can always manually run the Media Filter, to generate thumbnails of images, and make the new content searchable.
/dspace/bin/dspace filter-media -i 1811/49710
Where -i
is the identifier for the collection that you just imported into in the previous import step. This might not be needed, since people typically have a cron job that runs nightly to run the media-filter, but manually running it over the new content, ensures that the thumbnails are available.