Restore all files from GLACIER at Scaleway

If you use the S3-compatible GLACIER storage of Scaleway, you may have wondered how to restore all files from GLACIER to STANDARD to download them. Well, there is no button on the web interface to provoke the restoration of a full bucket and no need to say that clicking on each file is not an option. Contra-intuitively, you should know that the lifecycle rules cannot be used for restoration from GLACIER.

The solution I found is to use the s3cmd tool.

First install it, for example on a Debian-based system with

apt install s3cmd

Then create a .s3cfg file in your home folder with the following (to be adapted to your situation of course):

host_base =
host_bucket = %(bucket)
bucket_location = fr-par
use_https = True

access_key = ACCESSKEY
secret_key = SECRETKEY

Now, to list all files in a bucket, you can call:

s3cmd ls -l --recursive s3://my-bucket-name

To count the number of files left in GLACIER, you can do:

s3cmd ls -l --recursive s3://my-bucket-name |grep GLACIER|wc -l

And to request a restoration of all files from GLACIER, here is the way to go:

s3cmd restore -v --recursive s3://my-bucket-name

Of course the restoration is not immediate: in my experience with a 1 Tb bucket with 1200 files, small files were retrieved in a few minutes but big files (> 1 Gb) could take up to several hours.