Help > AWS > s3 >
get
PreviousNext

  • Overview
  • Syntax
  • Arguments
  • Notes
  • Examples
  • Overview

    downloads cloud storage file(s) to local machine

    Download ZappyShell

    Syntax

    get <SOURCE> <TARGET> [--enc-key ENCRYPTION_KEY_PATH] [--enc-aes]
               [--enc-rsa] [--del INPUT] [--mov INPUT] [--mov-folder FOLDER_PATH]
               [--sync] [--setdate] [--struct] [-y|--overwrite] [-s|--skip]
               [-l|--fail] [-p|--prompt] [--crfol] [--exclude-olderthan INPUT]
               [--exclude-newerthan INPUT] [-r|--recursive] [-c|--continue-onerror]
               [--auth NAME] [--region NAME] [--accesskey YOUR_ACCESS_KEY]
               [--secretkey YOUR_SECRET_KEY] [--serviceurl URL] [--threads COUNT]
               [--consoleout FILEPATH] [-v|--verbose] [-w|--wait] [-i|--interactive] 
    
    Alias: dow, download
    

    Arguments

    Parameter Description
    <SOURCE>
    Source file(s) you want to download
    <TARGET>
    Target folder path where you want save downloaded file
    --enc-key ENCRYPTION_KEY_PATH
    Specifies encryption key file path. This encryption key is used to encrypt data. To create new encryption key use mkkey command.
    --enc-aes
    Use AES 256 Bit algorithm for encryption
    --enc-rsa
    Use RSA 1024 Bit algorithm for encryption
    --del
    Delete source file(s) after successful transfer
    --mov
    Move source file(s) to archive folder after successful transfer
    --mov-folder FOLDER_PATH
    Folder path where you want to move source file(s) after successful transfer. This option only applicable if you specified --mov option. You can timestmp your archive folder path with predefined placeholders (e.g. --mov-folder c:\archive\Load_{{YYYY}}_{{MM}}_{{DD}}). Valid placeholders are [{{DD}},{{MM}},{{MON}},{{YY}},{{YYYY}},{{HH}},{{HH12}},{{HH24}},{{MI}},{{SS}},{{MS}},{{US}},{{DATAROOT}}]
    --sync
    Synchronize source files with target. Files are compared based on size and LastWriteDateUtc if both attributes same in source and target then file is skipped.
    --setdate
    Sets the target file's last-modified time to be the same as the source file's LastModifiedDate after upload or download. When target file is cloud storage file then this option sets Metadata entry rather than setting actual LastModifiedDate because storage file LastModifiedDate attribute is readonly and cannot be changed.
    --struct
    Transfer files along with folder structure. Automatically create missing folders at target location. When you specify this option no need to specify recursive option because its always recursive scan when --struct option specified.
    -y | --overwrite
    Overwrite target file(s) if exists
    -s | --skip
    Skip file transfer and continue with other files
    -l | --fail
    Throw error if target file exists
    -p | --prompt
    Prompt for action if target file exists
    --crfol
    Automatically create missing target folder
    --exclude-olderthan
    Exclude files if they are older than specified period. You may use format specifier or exact date/datetime. Period format specifiers are d,h,m or s (days, hours, minutes or seconds). Example: 5d = (5 days), 5h=(5 hours), 5m=(5 hours), 5s=5s=(5 second), "2015-12-31 11:59:59"=(exact date+time), "2015-12-31"=(exact date)
    --exclude-newerthan
    Exclude files if they are newer than specified period. You may use format specifier or exact date/datetime. Period format specifiers are d,h,m or s (days, hours, minutes or seconds). Example: 5d = (5 days), 5h=(5 hours), 5m=(5 hours), 5s=5s=(5 second), "2015-12-31 11:59:59"=(exact date+time), "2015-12-31"=(exact date)
    -r | --recursive
    Scan recursive
    -c | --continue-onerror
    Continue on error such as specified file is missing at source
    --auth NAME
    Credential entry name. This entry name must exist (previously saved using setauth command)
    --region NAME
    Region where requests should be redirected. If you don't specify region then all requests are first directed to US Standard Region (us-east-1) for name resolution. If you want to create new bucket in a specific region or you want to reduce latency in name resolution then specify this parameter.. Possible values are [us-west-1 | us-west-2 | eu-west-1 | eu-central-1 | ap-southeast-1 | ap-southeast-2 | ap-northeast-1 | sa-east-1]
    --accesskey YOUR_ACCESS_KEY
    Cloud account access key
    --secretkey YOUR_SECRET_KEY
    Cloud account secret key
    --serviceurl URL
    Service url for cloud service e.g. --serviceurl https://s3-us-west-2.amazonaws.com
    --threads COUNT
    Number of concurrent operations. If you don't specify then system will use default settings to optimize transfer.
    --consoleout FILEPATH
    Captures console output and saves to file
    -v | --verbose
    Log verbosity level. -v means detailed, If you don't specify this option then minimum logging will be done.
    -w | --wait
    Wait for user input before exit
    -i | --interactive
    Continue in interactive mode after this command is completed. This switch is not applicable if you already in interactive mode

    Notes

    Examples

    Examples
    Download single file from S3 storage

    get "mybucket/folder2/file1.txt" "c:\localfolder1\"  
    Download single encrypted file from S3 storage (Uploaaded earlier using customer generated AES 256 bit encryption key. To generate encryption you have to use mkkey command)

    get "mybucket/folder2/file1.txt" "c:\localfolder1\" --enc-key "c:\private.key" --enc-aes 
    Download single file from S3 storage as different name

    get "mybucket/folder2/file1.txt" "c:\localfolder1\newname_file1.txt"  
    Download multiple files from S3 storage

    get "mybucket/folder2/*.txt" "c:\localfolder1" 
    Download multiple files with always overwite option ON (-y). Get files from sub folders too (-r).

    get "mybucket/folder2/*.txt" "c:\localfolder1" -y -r
    Download full folder structure to target.

    get "mybucket/folder2/" "c:\localfolder1" --struct -r
    Sync entire source folder/bucket to target (including folder structure). Download source files only if its newer than target file (--sync). Retain folder structure of source to target (--struct)

    get mybucket/ "c:\data" --struct -sync
    Download only those files which are modified in last 5 days

    get mybucket/ "c:\data"  --exclude-olderthan 5d
    Download only those files which are modified in last 10 hours

    get mybucket/ "c:\data" --exclude-olderthan 10h
    Download only those files which are modified in last 30 minutes

    get mybucket/ "c:\data" --exclude-olderthan 30m
    Download only those files which are modified after 2010-12-31 (just date without time)

    get mybucket/ "c:\data" --exclude-olderthan 2010-12-31
    Download only those files which are modified after 2010-12-31 15:56:59 (date and time). Use double quotes to wrap datetime

    get mybucket/ "c:\data" --exclude-olderthan "2010-12-31 15:56:59"
    Download files to local storage and once transferred delete from source (--del option). Overwrite target file (-y option)

    get "mybucket\*.txt" "c:\data" --del -y
    Download files to local storage and once transferred move source file to some archive folder (--mov and --mov-folder options). Automatically create archive folder with current timestamp in YYYYMMDD format

    get "mybucket\*.txt" "c:\data" --mov --mov-folder "mybucket/archive/process_{{YYYY}}{{MM}}{{DD}}"


    www.zappysys.com | Products | All copyrights reserved. ZappySys LLC.