How to clone Amazon S3 buckets efficiently

If you have more than 10,000 documents that you want to clone or move to another Amazon S3 bucket, then use s3s3mirror. It is much faster and cheaper.

Incase you want to clone fewer documents, use s3cmd command from s3tools.org.

Download and follow installation instructions on s3cmd github repo. Once successfully installed and configured, type the below command.

cp --recursive --acl-public s3://production_site/files/ s3://test_site/files/

Hope this saves you guys some time.

Add a Comment

Your email address will not be published. Required fields are marked *

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Anti-spam image