NIH | National Cancer Institute | NCI Wiki  

Error rendering macro 'rw-search'

null

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

Compare with Current View Page History

« Previous Version 11 Next »

If your user account has the Read, Write, or Own permission level on various collections, you can download those collections, from DME to an Amazon Web Services (AWS) S3 bucket. 

To download multiple collections to S3:

  1. Prepare an S3 bucket, as described in Preparing to use Amazon Web Services S3 with DME

  2. Run the following command:

    dm_download_collection_s3 [optional parameters] [collection-logical-path] <destination S3 bucket> <destination-path> [AWS credentials file path]

    The following table describes each parameter:

    ParameterDescription
    [-D <REST-response>]

    An optional parameter, specifying a path and filename in your file system. The system always creates a response file:

    • If you specify this parameter, the system saves the response from the server to the specified file in the specified location.
    • If you omit this parameter, the system saves the file as download-collection-response-header.tmp in your home directory.
    [-o <output-json-file>]

    An optional parameter, specifying a path and filename in your file system. The system always creates an output file: 

    • If you specify this parameter, the system saves the output to the specified file in the specified location.
    • If you omit this parameter, the system saves the output as download-collection-response-message.json.tmp in your home directory.

    If the command is successful, the output file is empty.

    [-f <paths-file>]

    or

    [collection-logical-path]

    One or more paths within DME. Select one of the following methods to specify the collection or collections that you want to download:

    • To specify multiple collections, use the -f parameter to specify a path and filename in your file system, of a file that lists the paths for all of the DME collections you want to download, delimited by newline.
    • To specify a single collection, specify the path for the DME collection you want to download.
    <destination S3 bucket>The name of the destination S3 bucket.
    <destination path>The path to and the name of the folder in the destination bucket. Do not begin the path with a slash.
    [AWS credentials file path]

    The location of the credentials file. If your credentials file is in the default location, as noted in Preparing to use Amazon Web Services S3 with DME, you can omit this parameter.

The following example downloads a Project_1 collection from the PI_Lab1 collection in DME to a bucket1 bucket in a collectionA collection. 

Single collection example:
dm_download_collection_s3 /Example_Archive/PI_Lab1/Project_1 bucket1 collectionA

For another example, consider the following command.

dm_download_collection_s3 -f collection-list.txt bucket1 collectionA

With the following code in the specified collection-list.txt file, the above command downloads multiple collections from various locations in DME.

Multiple collections example:
collection-list.txt
/Example_Archive/PI_Lab1/Project_1
/Example_Archive/PI_Lab1/Project_2
/Example_Archive/PI_Lab2/Project_1


  • No labels