Hi Samuele, Thanks. It works perfectly now. > Dear Lerato, > > In data martedì, 29 maggio 2012 13.09:29, Lerato Mohapi ha scritto: >> I am trying to Migrate my Old Documents Into Invenio following >> this:http://invenio-demo.cern.ch/help/admin/howto-migrate and an example >> demobibdata.xml inside the directory [invenio installation >> directory]/var/tmp/. So I created the attached xml file (uploader.xml) >> and run the command : bibupload -i uploader.xml . Unfortunately I get >> the >> error shown below. >> ##########ERROR Uploading ########################################## >> 2012-05-29 12:33:52 --> Task #17 started. >> 2012-05-29 12:33:52 --> Input file '/home/adminuser/uploader.xml', input >> mode 'insert'. >> 2012-05-29 12:33:52 --> Error: [Errno 13] Permission denied: >> '/home/adminuser/uploader.xml' >> 2012-05-29 12:33:52 --> Exiting. >> 2012-05-29 12:33:52 --> Task #17 finished. [ERROR] >> ################################################################## > > so this is due to bibupload not having the rights to open the file > "/home/adminuser/uploader.xml". This is normal because you have to run > bibupload as the "apache" (or "www-data") user, and this user has no > rights to > open files in your home directory (not even to list them...). In order for > bibupload to be able to open the file, just move it to /tmp, and give it > proper readaccess rights as in: > > $ mv /home/adminuser/uploader.xml /tmp > $ chmod a+r /tmp/uploader.xml > > The /tmp directory in Linux is sort of special because all users of the > machine have all access rights to the files it contains. > >> Can anyone please help out pointing out where i went wrong. I understand >> one can create an old data text file (datadump.txt) as in the URL above >> and then create the data format file dump.cfg file also and convert own >> format into XML MARC by running the commands: bibconvert -cdatadump.cfg >> < >> datadump.txt > datadump.xml. But what is in the datadump.cfg and >> datadump.txt file (Sample please any one)? What about the datadump.xml? >> Is >> the data in my uploader.xml file isn't suppose to be the same as that in >> the datadump.xml file generated by the bibconvert command? > > The idea is that you simply need to create from your input documents a > MARCXML > file that you are going to upload to Invenio. For that you can use > bibconvert > as suggested in the guide you mention, as well as any other script you > might > wish to create that would map your input format to MARCXML. > > The example you attach is almost well formed MARCXML, besides: > > * it lacks the <record></record> tags delimiting the single record. I edited the file to include the <record></record>. > * moreover in Invenio conventions (and MARC standard) the 8560_ $f > subfield > should contain the email of the submitter not the path of a file. For all > the > conventions see: > > <http://docs.sagrid.ac.za/help/admin/howto-marc> > > * the 8564_ $u subfield should contain a valid URL that users might follow > in > order to retrieve the document. localhost wouldn't work for users external > to > the machine. If what you are trying to do is to also import a file in > Invenio > along side its metadata (and not just pointing to it), I'd recommend you > using > the special FFT tag described here: > > <http://docs.sagrid.ac.za/help/admin/bibupload-admin-guide#3.5> > > basically you would need to add something as: > <datafield tag="FFT ind1=" " ind2=" "> > <subfield code="a">http://url/to/the/file.pdf</subfield> > </datafield> > I also added the special FFT tag and the localhost URL was just an example. I didnt want to just post the real server url yet, Still working on securing it. > and - upon bibupload - Invenio will take care of fetching the above file, > importing it and creating the corresponding 8564_ tags. > > If you are just starting considering Invenio, I'd recommend you using the > latest version 1.0. which was release on February. > >> I presume the demobibdata.xml (Same format as in datadump.xml file >> created >> above) file can directly be used to upload the demo record by simply >> running the bibupload -i demobibdata.xml commands, hence why I created a >> similar file and straight-away ran the commands bibupload -i >> uploader.xml >> for my case. Am I wrong? > > Correct. demobibdata.xml is infact uploaded into Invenio by an implicit > call > to bibupload -i demobibdata.xml. > > Hope the above suggestions might help you. > > Best regards, > Samuele > > -- > Samuele Kaplun > Invenio Developer ** <http://invenio-software.org/> > > Thanks again for your Guide.
Cheers Lerato
