Skip to content
This repository has been archived by the owner on Aug 4, 2020. It is now read-only.

Latest commit

 

History

History
53 lines (34 loc) · 1.45 KB

Importing-Test-Data.md

File metadata and controls

53 lines (34 loc) · 1.45 KB

Importing Test Data

EPrints' import tool

Importing a single record

Example assumes the EPrint repository id is "lemurprint", you are importing EPrintXML documents from "PATH_TO_SINGLE_EPRINT_XML_DOC"

This is the basic command structure

    sudo su eprints
    /usr/share/eprints3/bin/import --verbose lemurprints eprint XML PATH_TO_SINGLE_EPRINT_XML_DOC

If you were loading document 1225.xml as username named "John Doe" whos user number (id) was 2 then you could load that document with the following command.

    sudo su eprints
    /usr/share/eprints3/bin/import --verbose -user 2 lemurprints eprint XML 1225.xml

Importing a directory of EPrintXML documents

Example assumes the EPrint repository id is "lemurprint", you are importing a directory of EPrintXML documents from "PATH_TO_EPRINT_XML_DOCS"

    sudo su eprints
    /usr/share/eprints3/bin/import --verbose lemurprints eprint XML PATH_TO_EPRINT_XML_DOCS

If the EPrint XML documents are in a folder called "testdata", the user number you want to load the documents as is "2" then the following command would look like--

    sudo su eprints
    /usr/share/eprints3/bin/import --verbose -user 2 lemurprints eprint XML testdata

Importing records via REST API

Optional configurations