Create a Copy of an Object

Prev Next
s3cmd [-c CONFIGFILE] cp s3://BUCKET1/OBJECT1 s3://BUCKET2[/OBJECT2]  

CONFIGFILE

Configuration file. Defaults to $HOME/.s3cfg

BUCKET1

Bucket from which to copy object

OBJECT1

Source object to copy

BUCKET2

Bucket in which to create new object

OBJECT2

Name of destination object, if different from source object

Example

Create copy of file.zip, which is stored in bucket mybucket, store the copy in the same bucket and call it copyoffile.zip:

$ s3cmd -c vast.s3cfg cp s3://mybucket/file.zip s3://mybucket/copyoffile.zip