If you have objects in the Scaleway Glacier
storage class you must restore them before continuing.
Migrating data from one bucket to another
Reviewed on 29 July 2024 • Published on 14 September 2018
Before you start
To complete the actions presented below, you must have:
- A Scaleway account logged into the console
- Owner status or IAM permissions allowing you to perform actions in the intended Organization
- Installed and initialized the AWS CLI for Scaleway
- An Object Storage bucket
-
Create a new bucket.
aws s3api create-bucket --bucket BUCKET-TARGET -
Copy the objects between the Object Storage buckets.
Importantaws s3 sync s3://BUCKET-SOURCE s3://BUCKET-TARGET -
Check that the content of the copied objects matches the content of the source ones.
aws s3 ls --recursive s3://BUCKET-SOURCE --summarize > bucket-contents-source.txtaws s3 ls --recursive s3://BUCKET-TARGET --summarize > bucket-contents-target.txt -
Compare objects that are in the source and target buckets by using the outputs that are saved to files in the AWS CLI directory. See the following example output:
aws s3 ls --recursive s3://DOC-EXAMPLE-BUCKET --summarizeSample output:
2022-01-20 11:20:49 multiaz.pngTotal Objects: 1 Total Size: 18640 -
Update any existing applications or workloads so that they can use the target bucket name, and delete the source bucket.
ImportantDelete the old bucket once everything is copied to avoid additional charges. You can use the following command:
aws s3 rb s3://BUCKET-SOURCE --force