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
Bridge Report Capture Tool
Download Bridge Report Capture Tool
Description
The purpose of the Bridge Report Capture Tool is to retrieve a status report from the DuraCloud Bridge application (in JSON format) and store that report in an S3 bucket. To accomplish this, the tool can be run in one of two modes. The first mode (Properties Mode) requires that all parameters be provided, and these parameters are written to a properties file (with encrypted values where necessary.) The second mode (Capture Mode) takes only the -f parameter to specify the properties file. It is the second mode in which calls are made to the bridge app to retrieve a report and store that report in S3. Properties Mode is run to create the properties file used to execute Capture Mode.
Command Line Options
Short Option | Long Option | Argument Expected | Properties Mode | Capture Mode | Description |
---|---|---|---|---|---|
-f | --props-file | Yes | Yes | Yes | The full path to a properties file. In capture mode, this file must exist. In Properties Mode, if the file exists, it will be overwritten. |
-r | --bridge-url | Yes | Yes | No | The URL at which the bridge application report can be retrieved. This must be the full URL, a GET call is made to the exact value provided to this parameter. |
-u | --bridge-username | Yes | Yes | No | The username necessary to read from the bridge application |
-p | --bridge-password | Yes | Yes | No | The password necessary to read from the bridge application |
-a | --s3-access-key | Yes | Yes | No | The AWS access key ID needed to write to the S3 bucket |
-s | --s3-secret-key | Yes | Yes | No | The AWS secret access key needed to write to the S3 bucket |
-b | --s3-bucket-name | Yes | Yes | No | The S3 bucket in which the bridge reports are to be written |
Example Usage
Properties Mode (Use this to create a properties file for use in Capture Mode)
java -jar bridge-report-capture-tool-1.0.0-driver.jar -f bridge-report-capture.properties -r "https://bridge.server.com/bridge/snapshot" -u bridgeUser -p bridgePa55word -a ANS3ACCESSKEY -s "the-s3-secret-key-value" -b bridge-report-bucket
Capture Mode (Use this to perform the report capture)
java -jar bridge-report-capture-tool-1.0.0-driver.jar -f bridge-report-capture.properties
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-prefix | Yes | Yes | The 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-prefix | Yes | Yes | The prefix value that will be applied to all content items matching the old prefix. Use "" to simply remove the old prefix. |
|
-d | --dry-run | No | No | Indicates 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 prefix-update-tool-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"".