NIH | National Cancer Institute | NCI Wiki  

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Revised to reflect collection command instead of directory command.
Excerpt
hiddentrue
  • dm_register_collection
  • dm_register_directory
Note

This page is a work in progress.

If your user account has the Write or Own permission level on an existing collection in DME, and if that existing collection has been configured to contain another collection, you can upload a collection from your file system to that existing collection. The following command recursively copies all files and directories in the <source-path> command registers the metadata specified in <description.json> to the <destination-path> in DME. 

Code Block
dm_register_directory [OPTIONS] <source-path> collection <description.json> <destination-path>

The following table describes each optionparameter:

OptionParameterDescription
-a[ARCHIVE_TYPE]

Specify the type of the archive. Valid values are as follows:

  • S3
  • POSIX
-c
Turn off checksum calculation.
-dPrint the files to be included in registration an exit.
-e[EXCLUDE_FILE_PATH]Exclude the files that match the patterns specified in the file EXCLUDE_FILE_PATH.
-hPrint a usage message.
-i[INCLUDE_FILE_PATH]Include the files that match at least one of the patterns specified in INCLUDE_FILE_PATH.
-l[FILES_LIST]Register the files mentioned in the FILE_LIST only. Each line in the FILES_LIST file contains a relative path to the source-path. All collections should be registered before using this option.
-mRegister metadata only. Do not register files.
-sSkip confirmation prompt and register directly.
-t[NUM_THREADS]Specify the number of threads to use while uploading files to Cleversafe. This number should be between [1, 32].

For the -e and -i options, use regular expression patterns in the specified file to register a subset of the files in the source directory. The system first identifies files that match any of the include regular expression patterns. Then the system removes from the registration job the files that match any of the exclude patterns. For information, refer to Specifying Criteria for Bulk Upload

The following table describes each parameter:

<description.json>
A path to a file
ParameterDescription
<source-path>
A path in your file system, specifying the data and metadata that you want to upload. (Details TBD.)
<destination-path>
A path within DME, specifying where you want the system to create the new collection.

For example, (TBD).Metadata can be provided for each directory and file in a specific metadata file called <[directory,filename]>.metadata.json. The metadata file should exist in the same path in its corresponding directory/file. For example, the metadata for the file sample.txt should be sample.txt.metadata.json. (TBD: The format of the metadata file.)

For instructions on performing similar tasks in the GUI, refer to the following pages:

...