You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

What: fcsu, an extensible command-line utility for working with Fedora storage.

Why: Due to Fedora's current web service API design, it can be tedious and time-consuming to make certain kinds of changes to a repository. This utility works at a lower level in order to allow efficient batch modifications that are either impossible or impractical when going through the public API.

What's the catch: fcsu is a very sharp tool and can be used to accidentally cause irreparable damage to your repository. It is always recommended that you test your changes against a backup copy rather than running modifications directly against your repository. In addition, certain types of changes you make with fcsu can necessitate a SQL or Resource Index rebuild.

A Few Examples

Once you configure it to point to your repository's data (see conf/config.properties), you can do things like the below. Note that by default there are two stores defined, 'legacy' and 'akubra', but you can define any number of them by adding a configuration file similar to the ones already found in conf/stores/.

Migrate from Fedora legacy storage to akubra:

fcsu copy legacy akubra

List all objects whose pids match a given regular expression:

fcsu list store1 --pids=^demo:Smiley.*

For all objects, migrate DC, RELS-EXT, and RELS-INT datastreams from inline XML to managed content:

fcsu modify store1 --filter=inline-to-managed-xml --datastream-ids=DC,RELS-EXT,RELS-INT

For all objects in the hdl namespace, re-compute the size and sha1 checksum of all managed and inline datastreams, even if it's already defined:

fcsu modify store1 --filter=set-fixity --pids=^hdl:.* --algorithm=sha1 --force=true --control-groups=M,X

Make a complete copy of the repository but omit all AUDIT datastreams:

fcsu modify store1 store2 --filter=remote-datastreams --remove-datastream-ids=
  • No labels