Last active
December 3, 2025 11:25
-
-
Save itskenny0/83bb60f4850b196697352d6f64552143 to your computer and use it in GitHub Desktop.
Scaleway: restore glacier data so it can be downloaded
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ### this assumes awscli is already configured properly | |
| ### the official docs are similar: https://www.scaleway.com/en/docs/object-storage/how-to/restore-an-object-from-glacier/ | |
| ### however, if the filenames contain spaces this fails | |
| ### so, you need to do this (replace BUCKETNAME and the endpoint url): | |
| aws s3api list-objects-v2 --bucket BUCKETNAME --query "Contents[?StorageClass=='GLACIER']" --output text --endpoint-url https://s3.fr-par.scw.cloud | cut -f2 >glacier-restore.txt | |
| while IFS= read -r x; do | |
| echo "$x" | |
| aws s3api restore-object --restore-request Days=1 --bucket BUCKETNAME --key "$x" --endpoint-url https://s3.fr-par.scw.cloud | |
| done < glacier-restore.txt | |
| ### The second command will be pretty slow, but it'll eventually restore all the files. | |
| ### Then sync it again |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment