Phương Nguyễn
Phương Nguyễn

Reputation: 8905

How to copy bucket in amazon S3?

I'm really sick of amazon ability to clone a bucket. They don't offer bucket renaming and they don't offer a good way to copy bucket with dozen of thousands files in it. Is there a way that take seconds to minutes instead of hours?

Upvotes: 1

Views: 2555

Answers (1)

Bas Peeters
Bas Peeters

Reputation: 3354

You can easily clone a bucket by using sync. (First create the bucket you want to clone it to):

aws s3 sync --quiet s3://[bucket-old] s3://[bucket-new]

Tip: use the --dryrun flag to see what you're doing first (and break it off when it looks good or else you have to wait for your thousands of files to finish listing)

Upvotes: 6

Related Questions