Move a bucket’s contents to another E2E account by copying every object across with an
S3-compatible tool: the bucket itself stays where it is, but the data does not have to. This
uses mc; see
Connect with the mc client for
installing it.
Set up a bucket admin key on each side
Section titled “Set up a bucket admin key on each side”In the destination account, create a bucket to receive the data. On both the source and destination bucket, attach an access key with the Bucket Admin role; see Generate an access key.
Add both buckets as mc aliases
Section titled “Add both buckets as mc aliases”mc alias set <source-alias> https://objectstore.e2enetworks.net <source-access-key> <source-secret-key>mc alias set <destination-alias> https://objectstore.e2enetworks.net <destination-access-key> <destination-secret-key>Use the Chennai endpoint from S3 compatibility instead for a bucket in that region.
Copy the data
Section titled “Copy the data”mc cp --recursive <source-alias>/<source-bucket> <destination-alias>/<destination-bucket>--recursive copies every object, including anything under a folder-like prefix. mc shows a
progress bar while it copies, and your prompt comes back when it is done.
Check the copied bucket
Section titled “Check the copied bucket”Count the objects on each side. Each command prints a single number. When the copy is complete, the two match:
mc ls --recursive <source-alias>/<source-bucket> | wc -lmc ls --recursive <destination-alias>/<destination-bucket> | wc -lDo not delete anything from the source bucket until the numbers match; on a bucket without versioning, a deleted object cannot be brought back. See Delete a bucket if you no longer need the source bucket at all.