Versions Compared

Key

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

...

There are two different methods available for exporting metadata and digital objects from a Fedora 4 repository, the first uses the Camel Serialization Module https://github.com/fcrepo4-exts/fcrepo-camel-toolbox/tree/master/fcrepo-serialization , and the second uses a stand alone command line tool

Both methods can export RDF and can be configured to also export binary resources.
 
Use of the Camel Serializer is documented here https://wiki.duraspace.org/display/FF/Export+Format .  This method is considered a proof of concept.  It works by listening for events about newly created resources, or edits to existing resources, and as such it cannot . As such the re-indexer Camel component must be invoked to export resources that were created before it started listening, unless they are edited while the camel serializer is turned on.

The command line tool is part of the Import Export Utility.  https://github.com/fcrepo4-labs/fcrepo-import-export . This tool can export an entire repository, or a subset, and is intended as a method of creating a complete backup of the content of a single Fedora container and all its descendant resources , in a format that can be imported , back into the same Fedora repository, a different Fedora Repository or into an external system.

Installing the export tool

With fcrepo4-vagrant

This example uses a Fedora 4 Vagrant https://github.com/fcrepo4-exts/fcrepo4-vagrant instance as a test environment.  By following these instructions, you should be able to duplicate these exact results.

Pre-requisites

Vagrant
Virtualbox
Git

Installation

...

    run the following commands:
   

Code Block
languagebash
git clone https://github.com/fcrepo4-exts/fcrepo4-vagrant.git
cd fcrepo4-vagrant

Fedora 4

The import/export utility is designed to work against the Fedora 4 REST API. Therefore, you first must have a running Fedora repository.

There are several ways to install a Fedora repository if you do not have one already available, see either:

...

  1. Quick Start, or
  2. Fedora Vagrant
        1. (optional step to turn off user authentication) edit the file at install_scripts/config and

      ...

        1. change FEDORA_AUTH=

      ...

        1. true to FEDORA_AUTH=false

      ...

        1.  and save the file
      Code Block
      languagebash
      vagrant up

      ...

      Import/Export Utility

      The import/export utility maybe be installed in one of two ways:

      1. Download executable jar (TBD)
      2. Build from source

       

      Preparing sample data

      Code Block
      languagebash
      vagrant ssh
      sudo su -
      cd /opt
      git clone https://github.com/fcrepo4-labs/fcrepo-import-export
      cd fcrepo-import-export
      mvn clean install

         

      Without vagrant

      The export tool can be run on any computer that has access to the Fedora repository.

      Pre-requisites

      Java 8
      Mave
      Git

      Code Block
      languagebash
      git clone https://github.com/fcrepo4-labs/fcrepo-import-export
      cd fcrepo-import-export
      mvn clean install

      ...

      Go to Fedora in a browser, and in the 'Create New Child Resource' form on the right hand side of the page, type a name (I used 'albums') into the Identifier box and click 'add'. This will create a sample Resource.

      Navigate to that new resource at http://localhost:8080/fcrepo/rest/albums and create a new child resource there.  This time, change the type to binary and upload a sample binary file. I used a jpg image for this example.  The identifier will get filled in by Fedora if you don't choose one yourself.

      You now have a Container to export (http://localhost:8080/fcrepo/rest/albums).

      ...

      The export tool is installed at the same time as the import tool, you can follow the instructions about for installing the export tool, if you have not done so already.

      Preparing a sample

      Follow the instructions above to create a sample export.  After

       

      Export Package Format

      (TBD) a