HomeStorageObject StorageHow to
Restore an object from Glacier class
Jump toUpdate content

How to restore an object from Glacier

Reviewed on 15 June 2023Published on 27 May 2021
Security & Identity (IAM):

You may need certain IAM permissions to carry out some actions described on this page. This means:

  • you are the Owner of the Scaleway Organization in which the actions will be carried out, or
  • you are an IAM user of the Organization, with a policy granting you the necessary permission sets
Requirements:
Important:

Objects in Glacier can only be restored to Standard class.

Tip:

To facilitate the steps of restoration and ensure a fast restitution of your data, we recommend you use Glacier to store average sized files (larger than 1 MB), as opposed to several small files.

How to restore an object

  1. Click Object Storage in the Storage section of the side menu. The list of your buckets displays.

  2. Click the bucket name that contains the objects you want to restore to STANDARD class. The list of objects displays.

  3. Click the Restore icon next to the object that you want to restore:

    Tip:

    Alternatively, click «See more Icon» > Restore.

    A pop-up appears.

  4. Enter the number of days after which the object will be transferred back to Glacier if you want the restoration to be temporary.

    Important:

    Alternatively, you can click the toggle button to disable the automatic transfer of your object back to Glacier. This allows you to restore your object permanently.

  5. Click Restore object from S3 Glacier.

    Note:

    Your object remains available in STANDARD class for the duration you specified. It will be transferred automatically back to GLACIER once the configured period is over.


    If you did not select the option to send your object back to Glacier, your object will remain in STANDARD class permanently.


    You can send your object back to Glacier class manually at any time.

How to restore all objects in a bucket

If you have numerous files in a bucket that you would like to restore, it may be more convenient to use the command line, for example with the s3cmd tool. To restore all files recursively in a bucket, you can invoke this command:

s3cmd restore -v --recursive s3://<bucket-name>

To count the number of files still in GLACIER (see restore time below, this is not immediate), you can use:

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

Restore time

The time it takes to restore an object depends on the size of the object and on if multipart is configured. If your object is larger than 1 MB, it can take anywhere from a few minutes to 24 hours for restore to start.

For multipart objects, each part is equivalent to one object. Consequently, the more parts your object has, the longer the restore time will be.

To determine how many parts a multipart object has, you can run the following aws-cli command:

aws s3api <object-name> --bucket <bucket-name> --key b

For a multipart object, the Etag includes a suffix that indicates the number of parts of the object. In the example below, the -<PartNumber> is 14:

{
"AcceptRanges": "bytes",
"LastModified": "2022-08-16T12:07:00+00:00",
"ContentLength": 141855946,
"ETag": "\"df1c7b0641b048c77f7177e3d22dde78-14\"",
"VersionId": "1660651620102268",
"ContentType": "application/x-tar",
"Metadata": {}
}

Therefore, in this example, the time it takes to restore the object (that has 14 parts) is equivalent to the time it takes to restore 14 objects.

See Also