This documentation space is deprecated. Please make all updates to DuraCloud documentation on the live DuraCloud documentation space.

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

Compare with Current View Page History

« Previous Version 2 Next »

Purpose

The tools listed below are generally single-purpose instruments for affecting change to or collecting information about content stored in DuraCloud. There are a variety of reasons why a tool may be built to operate against the DuraCloud API. All of these tools are command-line only.

These tools are not part of the primary DuraCloud baseline. They are, instead, set aside as a set titled Auxiliary tools. These tools are built to serve a need, and are tested and used for the original purpose. However, these tools are not subject to the same production standards as the primary DuraCloud baseline, so they should be used carefully.

Tools

Prefix Update Tool

Download Prefix Update Tool 

Description

The purpose of the Prefix Update Tool is to allow for content item prefix values to be changed. If a given file path captured in the content IDs of files transferred to DuraCloud is incorrect, this tool can be used to correct that path. If a set of files needs to be given a prefix after they have already been transferred to DuraCloud, this tool can be used for that purpose as well.

Command Line Options

Short Option

Long Option

Argument Expected

Required

Description

Default Value (if optional)

-h

--host

Yes

Yes

The host address of the DuraCloud DuraStore application

 

-s

--space-id

Yes

Yes

The ID of the DuraCloud space where content will be stored

 

-u

--username

Yes

Yes

The username necessary to connect to DuraCloud

 

-p

--password

Yes

Yes

The password necessary to perform writes to DuraStore

 

-r

--port

Yes

No

The port of the DuraCloud DuraStore application

443

-i

--store-id

Yes

No

The Store ID for the DuraCloud storage provider

The primary storage provider is used

-o--old-prefixYesYesThe prefix value that is to be replaced. Use "" to match all content items (if adding a prefix to all content items in a space is desired.) 
-n

 

--new-prefixYesYesThe prefix value that will be applied to all content items matching the old prefix. Use "" to simply remove the old prefix.

 

-d--dry-runNoNoIndicates that no changes should be made to DuraCloud, but that the changes which would be made should be printed to the console. This allows you to see what the tool would do without changing anything. 

 

Example Usage
java -jar prefixupdatetool-1.0.0-driver.jar -h institution.duracloud.org -s my-favorite-space -o C:/bobsfiles/Fall 2002 notes/ -n robert/notes/2002-fall/ -u [username] -p [password]

The above command would cause the files stored in the space named "my-favorite-space" which have the existing prefix "C:/bobsfiles/Fall 2002/notes" to be updated such that the original prefix would be replaced with "robert/notes/2002-fall. For example a file in the space with the content ID: "C:/bobsfiles/Fall 2002 notes/board-meetings/2002-11-01-meeting-notes.txt" would be changed to "robert/notes/2002-fall/board-meetings/2002-11-01-meeting-notes.txt"".

 

 

 

  • No labels