Thanks so much for your reply Andrea,
You were spot on. I have to run the update from the tomcat home directory – and then it works as advertised.
If anyone is interested I’ve written a couple of scriptlets I run from ~tomcat. First I export the item I want to add to:
# 10092 is the prefix for our handles
echo enter a handle 10092/
/ir/dspace/bin/dspace dsrun org.dspace.app.itemexport.ItemExport -t ITEM -i 10092/$HANDLE -d /usr/local/tomcat/export -n $HANDLE
Then I copy the new file I want to add to the directory I just made and run ls FILENAME > contents to overwrite the contents file
Then I import it into Dspace
# Dspace item updater. email@example.com 7 Nov 2014
# Run from /usr/local/tomcat
# will update everthing Dspace Simple Archive format
# under the ./export directory
/ir/dspace/bin/dspace itemupdate --eperson=appropriate@eperson -A --source=/usr/local/tomcat/export/
echo "Now delete the undo directories (if it worked!)"
I’ve been able to load MUCH larger files than through the web interface this way (I’ve had 4/5Gb datasets recently, darned physicists!)
Thank you for your help,
Research Data Co-ordinator
University of Canterbury, Christchurch, New Zealand.
James Hight Building, 519, Level 5
Ph +64 3 364 2987 extn 8718
On 01/11/13 08:51, Anton Angelo wrote:
I create an archive using the itemexport function, edit the contents file (with echo filename >> contents), add the file to the archive and then run
/ir/dspace/bin/dspace dsrun org.dspace.app.itemupdate.ItemUpdate -A --eperson=valid@eperson --source=/usr/local/tomcat/1/testdata –verbose
In return I’m getting:
Actions to be performed:
ItemUpdate - initializing run on Thu Oct 31 14:36:26 NZDT 2013
Done processing. Successful items: 0 of 0 items in source archive
Any ideas why it isn’t adding the bitstream either to the archive or to the item in the repository?
I just used this sequence to add a file to an existing item using export/import (DSpace 1.8.2):
[dspace]/bin/dspace export -i [prefix]/3998 -t ITEM -d /data/tmp -n 0
echo handles-with-fulltext.xml > /data/tmp/0/contents
cd /data/tmp && [dspace]/bin/dspace itemupdate -A --source . --verbose -e firstname.lastname@example.org
There is something odd going on with interpolating the "source" argument it seems. /data/tmp is the parent of the "0" directory created by the export. Note I had to cd to that directory and use "." as the source. Using /data/tmp or /data/tmp/ as the source argument, I get "ERROR creating Undo Archive directory".
Finally, I had to use ">", ie overwrite the contents file; otherwise it complained about existing bitstreams (including the license bitstream, which you're likely to have even when you think the item has no files).
Dr Andrea Schweer
IRR Technical Specialist, ITS Information Systems
The University of Waikato, Hamilton, New Zealand