get command

s3 get <bucket>/<keyprefix> [<path>] [/big] [/sub]

Examples

s3 get mybucket/pic*
s3 get mybucket/backup-pictures/ c:\mypicturefolder\ /sub

Gets the specified object(s) from S3 to the given path, or the current directory if the path is omitted. If no filename is supplied with the path, then the suffix of the key after the final slash is used as the filename, except with the /sub option.

A trailing * on the end of the key is treated as a wildcard, except with the /big option or if a full filename is specified in the path parameter.

Applicable options

/big - fetches a file or files split using /big with the put command.
/sub - enables a whole directory hierarchy uploaded with 'put /sub' to be downloaded.

Last edited Oct 28, 2009 at 1:23 PM by maxc, version 2

Comments

dsunderic Jun 4, 2015 at 10:02 PM 
It is also a little inconsistent. It took me a while to figure out how to get file back to local folder. It is very picky about "proper" cmd:

F:\Dejan\test>f:\dejan\s3 get insightdata_backup F:\Dejan\test\
s3.exe version 1.7 - check for updates at http://s3.codeplex.com

Syntax error: The first parameter to the get command must have a slash (/) between the bucket name and the key
Type 's3 help' for assistance.

F:\Dejan\test>f:\dejan\s3 get insightdata_backup/ F:\Dejan\test\
s3.exe version 1.7 - check for updates at http://s3.codeplex.com

Could not find a part of the path 'F:\Dejan\test\'.

F:\Dejan\test>f:\dejan\s3 get insightdata_backup/* F:\Dejan\test\
s3.exe version 1.7 - check for updates at http://s3.codeplex.com

Syntax error: You specified a destination filename but there is more than one key; can't copy multiple keys to one file
Type 's3 help' for assistance.

F:\Dejan\test>f:\dejan\s3 get insightdata_backup/* F:\Dejan\test\ /sub
s3.exe version 1.7 - check for updates at http://s3.codeplex.com

Syntax error: With the /sub option, the first parameter must be just a bucket name or must end with a slash (/)
Type 's3 help' for assistance.

F:\Dejan\test>f:\dejan\s3 get insightdata_backup/ F:\Dejan\test\ /sub
s3.exe version 1.7 - check for updates at http://s3.codeplex.com

Syntax error: With the /sub option, the first parameter must be just a bucket name or must end with a slash (/)
Type 's3 help' for assistance.

F:\Dejan\test>f:\dejan\s3 get insightdata_backup F:\Dejan\test\ /sub
s3.exe version 1.7 - check for updates at http://s3.codeplex.com

insightdata_backup/Research_backup_2015_05_20_120004_0617624.trn
insightdata_backup/Research_backup_2015_05_21_000002_6725322.trn

dsunderic Jun 4, 2015 at 8:53 PM 
It is too complicated to use in my scenario. I have a dozen or two of files. Some of them are larger than 5GB but most are not.
To put all files in a bucket I had to use /big:5000. Now to get them to a local folder I need to specify both backup key and target name. That is very difficult to do when you have lot of files.