---
title: How to restore an object from Glacier
description: Retrieve objects from Glacier in Object Storage.
tags: object-storage object storage glacier
dates:
  validation: 2025-07-01
  posted: 2021-05-27
---
import Requirements from '@macros/iam/requirements.mdx'


<Requirements />

- A Scaleway account logged into the [console](https://console.scaleway.com)
- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization
- An [Object Storage bucket](/object-storage/how-to/create-a-bucket/)
- An object in [Glacier storage class](/object-storage/how-to/edit-storage-class/)

<Message type="important">
  Objects in Glacier can only be restored to `Standard Multi-AZ` class.
</Message>

<Message type="tip">
  To facilitate the steps of restoration and ensure fast restitution of your data, we recommend you store average-sized files (larger than 1 MB) in Glacier, as opposed to several small files.
</Message>

## 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 Multi-AZ` class. The list of objects displays.

3. Click <Icon name="more" />, then select **Restore** from the drop-down menu. A pop-up appears.

4. Enter the number of days after which the object will be transferred back to Glacier, or click the toggle to permanently restore the object.

5. Click **Restore object from Glacier**.

  Your object remains available in `Standard Multi-AZ` class for the duration you specified. It will be transferred automatically back to Glacier once the configured period is over.


## How to restore all objects in a bucket

If you have numerous files in a bucket that you would like to restore, we recommend using the command line interface, with a dedicated tool such as the [AWS CLI](/object-storage/api-cli/object-storage-aws-cli/).

1. Run the command below in a terminal to create a list of objects to restore, and store it as a text file. Make sure to replace `<YOUR-BUCKET>` with the name of your bucket.

    ```bash
    aws s3api list-objects-v2 --bucket <YOUR-BUCKET> --query "Contents[?StorageClass=='GLACIER']" --output text | awk '{print $2}' > glacier-restore.txt
    ```
    <Message type="note">
    The `list-objects-v2` operation is [limited to 1,000 objects](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-objects-v2.html#description).
    </Message>
    
2. Run the following command to restore every object listed in the previous step. Make sure to replace `<YOUR-BUCKET>` with the name of your bucket, and `NUM` with the desired number of days.

    ```bash
    for x in `cat glacier-restore.txt`
      do
        aws s3api restore-object --restore-request Days=NUM --bucket <YOUR-BUCKET> --key "$x"
      done
    ```
<Message type="note">
  Use the `Days=NUM` parameter to specify the desired number of days. By default, the restoration period is one day.
</Message>

## Restore time

The time it takes to restore an object depends on the size of the object and if [multipart](/object-storage/concepts/#multipart-uploads) is configured. If your object is larger than 1 MB, it can take anywhere from a few minutes to 24 hours for the 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, 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:

```json
{
    "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.
