Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Move to the directory where you downloaded the code. For Vagrant installs, this will be under /opt/fcrepo-import-export; otherwise, it will located in the directory where you cloned the GitHub repository when you build the tool from source. From there, you will need to locate the compiled jar file. If you build it from source, it will be in the GitHub repo at fcrepo-import-export/target/fcrepo-import-export-0.13.10-SNAPSHOT.jar.

To see all the available command line options:

Code Block
languagetext
java -jar fcrepo-import-export/target/fcrepo-import-export-0.13.10-SNAPSHOT.jar -h

Note: You will see "Error parsing args: Unrecognized option: -h" but this is bug and will be addressed in forthcoming releases.

...

Code Block
languagetext
java -jar fcrepo-import-export/target/fcrepo-import-export-0.13.10-SNAPSHOT.jar --mode export --resource http://localhost:8080/rest/albums --dir /tmp/test --binaries

...

Code Block
languagetext
java -Dfcrepo.log.importexport=WARN -jar fcrepo-import-export/target/fcrepo-import-export-0.13.10-SNAPSHOT.jar --mode export --resource http://localhost:8080/rest/albums --dir /tmp/test --binaries

...

Exported resources may be imported back into the repository from which they came, or into the same path of another repository instance. This feature is currently under development and documentation will be made available in forthcoming releases.

The following command will import the previous export into the same location of the same repository.

Code Block
languagetext
java -jar fcrepo-import-export/target/fcrepo-import-export-0.3.0-SNAPSHOT.jar --mode import --resource http://localhost:8080/rest/albums --dir /tmp/test --binaries

To import into a different repository and/or path,  use the map flag to ensure that the base URIs of the resources are properly translated in the new repository.

The following command will import the previous export into the same location of the same repository.  In other words,  the import would complete the migration of data from http://localhost:8080/rest/albums to http://localhost:8686/rest/albums.

Code Block
languagetext
java -jar fcrepo-import-export/target/fcrepo-import-export-0.3.0-SNAPSHOT.jar --mode import --resource http://localhost:8686/rest/albums --dir /tmp/test --binaries --map http://localhost:8080/rest/albums,http://localhost:8686/rest/albums