Parallel Works

pw buckets cp

Copy files between local and buckets

Synopsis

The pw buckets cp command must be followed by a source and a destination. The source and destination can be either a local file or a bucket URI.

Both PW URIs and CSP URIs are accepted. For more information about URIs, please see this section.

When copying to/from a bucket with a PW URI, you must specify at least the bucket name. However, paths can be longer, such as pw://[namespace]/[bucket-name]/[folder]/[folder2]/[folder3]/[file-name].

pw buckets cp [source] [destination] [flags]

Examples

  pw buckets cp sample.txt pw://demo/demos3bucket
  
  # Download a file named sample.txt to a local file
  pw buckets cp pw://demo/demos3bucket/sample.txt sample2.txt
  
  # Download a file from Azure Blob Storage to a local folder, using the Azure URI
  pw buckets cp https://azuredemo.blob.core.windows.net/azuredemo/sample.txt sample2.txt
  
  # Recursive download
  # Result: ./sample-dir/a.txt, ./sample-dir/sub/b.txt, ...
  pw buckets cp -r pw://demo/demos3bucket/sample-dir ./sample-dir
  
  # Recursive download of the entire bucket root into a local folder
  # Result: ./downloads/<all objects from bucket root...>
  pw buckets cp -r pw://demo/demos3bucket ./downloads/

Options

  -h, --help        help for cp
  -r, --recursive   Copy directories/prefixes recursively

Options inherited from parent commands

      --context string         The context to use. Overrides PW_CONTEXT environment variable and current context from config.
      --platform-host string   The Parallel Works ACTIVATE platform host to use. Will override any other platform host settings.
  -v, --verbose                Enable verbose logging

SEE ALSO