# Download Objects

An object in the Object Storage can be viewed and downloaded to your local computer. On downloading, the SSE-S3 encryption applied to that object is automatically decrypted before the download process begins.

In the case of SSE-C, you must provide the encryption keys for download. Use the CLI tools, SDK, or API methods to download the objects protected with SSE-C encryption.

For large objects, you may not need to download the entire file. You can perform a partial download of objects using the Object Storage API. The API allows you to specify a byte range in your request, enabling you to download only a portion of the object data. Using the DCD, you can download one object at a time. For downloading multiple objects, consider using CLI tools, SDKs, or REST API.

{% hint style="info" %}
**Note:** An object's metadata can be viewed directly from the [<mark style="color:blue;">properties</mark>](https://docs.ionos.com/sections-test/guides/storage-and-backup/concepts/objects-folders#properties-and-metadata) page in the DCD or through the API call, providing a quick way to inspect an object's properties without incurring data transfer fees. Data transfer fees apply when you download objects from your Object Storage bucket. For more information, see [<mark style="color:blue;">Pricing Model</mark>](https://docs.ionos.com/sections-test/guides/storage-and-backup/ionos-object-storage/overview/pricing).
{% endhint %}

## DCD

To download objects, follow these steps:

1\. In the **DCD**, go to **Menu** > **Storage & Backup** > **IONOS Object Storage**.

2\. From the drop-down list in the **Buckets** tab, choose either **Show user-owned buckets** or **Show contract-owned buckets** depending on the bucket type you want to view.

3\. From the **Buckets** list, choose the bucket from which you want to download the object. The list of objects in the bucket is listed.

4\. Choose the object to download and click on the respective object's action menu (three dots). The **Download** option is also available from the respective object's properties page.

5\. Click **Download**. If an object has been shared through a public URL, click the URL to download the object.

![Download objects](https://1737632334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MifAzdGvKLDTtvJP8sm%2Fuploads%2Fgit-blob-e5da3d704d8a8715e1323c83f610844bdb48f3b4%2Fs3-download-objects.png?alt=media)

{% hint style="success" %}
**Result:** The object is successfully downloaded.
{% endhint %}

{% hint style="info" %}
**Note:** For downloading multiple objects, consider using CLI tools, SDKs, or REST API.
{% endhint %}

## API

Using the [<mark style="color:blue;">API</mark>](https://api.ionos.com/docs/s3/v2/#tag/Basic-Operations/operation/GetObject), you can download objects from a bucket.

## CLI

**To download `my-object.txt` to a specified file locally:**

```
aws s3 cp s3://my-bucket/my-object.txt my-object.txt  --endpoint-url https://s3.eu-central-2.ionoscloud.com
```

**To download a specified version of the `my-object.txt` to a specified file locally:**

```
aws s3api get-object --bucket my-bucket --key some-prefix/my-object.txt my-object.txt --version-id fe11a12a-870b-050f-bc9d-3cecefb1f7c4 --endpoint-url https://s3.eu-central-2.ionoscloud.com
```

**To download all the objects from the `my-bucket` bucket to the local directory `my-dir`:**

```
aws s3 cp s3://my-bucket my-dir --recursive --endpoint-url https://s3.eu-central-2.ionoscloud.com
```

**To recursively copy all objects with the `/my-dir/` prefix from `my-bucket-1` to `my-bucket-2`:**

```
aws s3 cp s3://my-bucket-1/my-dir/ s3://my-bucket-2/my-dir/ --recursive --exclude "*.log" --endpoint-url https://s3.eu-central-2.ionoscloud.com
```

**To get the object’s metadata without downloading an object:**

```
aws s3api head-object --bucket my-bucket --key myobject.txt --endpoint-url https://s3.eu-central-2.ionoscloud.com
```

For more information, see the [<mark style="color:blue;">cp</mark>](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/s3/cp.html), [<mark style="color:blue;">get-object</mark>](https://awscli.amazonaws.com/v2/documentation/api/2.0.34/reference/s3api/get-object.html), and [<mark style="color:blue;">head-object</mark>](https://awscli.amazonaws.com/v2/documentation/api/2.0.34/reference/s3api/head-object.html) command references.
