# Create snapshot on on-prem S3

**URL:** https://discuss.elastic.co/t/create-snapshot-on-on-prem-s3/354336
**Category:** Elasticsearch
**Tags:** snapshot-and-restore
**Created:** [February 28, 2024, 11:48am UTC](https://discuss.elastic.co/t/create-snapshot-on-on-prem-s3/354336 "2024-02-28T11:48:38Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Patryk\_Ostrowski](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/patryk_ostrowski/32/111965_2.png) [@Patryk\_Ostrowski](https://discuss.elastic.co/u/Patryk_Ostrowski)
#### Post date: [February 28, 2024, 11:48am UTC](https://discuss.elastic.co/t/create-snapshot-on-on-prem-s3/354336/1 "2024-02-28T11:48:38Z")

</div>

Hello,  
I have problem with integration with snapshot. I have on-prem s3 and when I tried to create repository I have a error: Unknown s3 client name [test]. Existing client configs: default.

```auto
PUT _snapshot/my_s3_repository
{
  "type": "s3",
  "settings": {
    "bucket": "logs",
    "client": "test",
    "endpoint": "10.41.131.12",
    "protocol": "https"
  }
}

```

And response:

```auto
{
  "error": {
    "root_cause": [
      {
        "type": "repository_exception",
        "reason": "[my_s3_repository] cannot create blob store"
      }
    ],
    "type": "repository_verification_exception",
    "reason": "[my_s3_repository] path is not accessible on master node",
    "caused_by": {
      "type": "repository_exception",
      "reason": "[my_s3_repository] cannot create blob store",
      "caused_by": {
        "type": "illegal_argument_exception",
        "reason": "Unknown s3 client name [test]. Existing client configs: default"
      }
    }
  },
  "status": 500
}

```

In elasticsearch.yml I added

```auto
s3.client.logisnapshoty-user.endpoint: 10.41.131.12:443

```

and also access key and secret key to keystore.

Could you help me, add external own s3 repository?

---

<div class="post-metadata">

### Author: ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)
#### Post date: [February 28, 2024, 11:56am UTC](https://discuss.elastic.co/t/create-snapshot-on-on-prem-s3/354336/2 "2024-02-28T11:56:18Z")

</div>

> [@Patryk\_Ostrowski](#):
>
> and also access key and secret key to keystore.

And what is the client named you used? The log you shared mentions that the `test` client does not exist, only the `default` client.

You need to use the correct client as mentioned in the [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/repository-s3.html#repository-s3-client).

So if in your keystore you added `s3.client.default.access_key` and `s3.client.default.secret_key`, then the client name is `default`, not `test`.

If you want to use `test` as the client name you need to add the access\_key and secret\_key for this client as well, like this:

```auto
bin/elasticsearch-keystore add s3.client.test.access_key
bin/elasticsearch-keystore add s3.client.test.secret_key

```

---

<div class="post-metadata">

### Author: ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)
#### Post date: [February 28, 2024, 12:00pm UTC](https://discuss.elastic.co/t/create-snapshot-on-on-prem-s3/354336/3 "2024-02-28T12:00:05Z")

</div>

> [@Patryk\_Ostrowski](#):
>
> `s3.client.logisnapshoty-user.endpoint: 10.41.131.12:443`

Same thing as mentioned before, the client needs to be the same for all settings.

The settings follows this naming scheme:

```auto
s3.client.CLIENT_NAME.SETTING_NAME

```

So if you added `s3.client.logisnapshoty-user.endpoint` in `elasticsearch.yml` you need to add `s3.client.logisnapshoty-user.access_key` and `s3.client.logisnapshoty-user.secret_key`

---

<div class="post-metadata">

### Author: ![Patryk\_Ostrowski](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/patryk_ostrowski/32/111965_2.png) [@Patryk\_Ostrowski](https://discuss.elastic.co/u/Patryk_Ostrowski)
#### Post date: [February 28, 2024, 12:17pm UTC](https://discuss.elastic.co/t/create-snapshot-on-on-prem-s3/354336/4 "2024-02-28T12:17:22Z")

</div>

Thanks for your anserw. I changed my config and also have the same problem:

In my configuration elastisearch.yml

```auto
s3.client.logisnapshoty-user.endpoint: 10.71.151.2:443

```

In my keystore I added:

```auto
/usr/share/elasticsearch/bin/elasticsearch-keystore add s3.client.logisnapshoty-user.access_key

and

/usr/share/elasticsearch/bin/elasticsearch-keystore add s3.client.logisnapshoty-user.secret_key

```

and after send request:

```auto
PUT _snapshot/my_s3_repository
{
  "type": "s3",
  "settings": {
    "bucket": "logi-snapshoty",
    "client": "logisnapshoty-user",
    "endpoint": "10.71.151.2",
    "protocol": "https"
  }
}

```

and response:

```auto
{
  "error": {
    "root_cause": [
      {
        "type": "repository_exception",
        "reason": "[my_s3_repository] cannot create blob store"
      }
    ],
    "type": "repository_exception",
    "reason": "[my_s3_repository] Could not determine repository generation from root blobs",
    "caused_by": {
      "type": "repository_exception",
      "reason": "[my_s3_repository] cannot create blob store",
      "caused_by": {
        "type": "illegal_argument_exception",
        "reason": "Unknown s3 client name [logisnapshoty-user]. Existing client configs: default"
      }
    }
  },
  "status": 500
}

```

I have 3 node cluster, and I execute this command and change elasticsearch.yml on master node, is it ok?

---

<div class="post-metadata">

### Author: ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)
#### Post date: [February 28, 2024, 12:20pm UTC](https://discuss.elastic.co/t/create-snapshot-on-on-prem-s3/354336/5 "2024-02-28T12:20:31Z")

</div>

> [@Patryk\_Ostrowski](#):
>
> I have 3 node cluster, and I execute this command and change elasticsearch.yml on master node, is it ok?

The snapshot configuration needs to be done on all master and data nodes, also any changes to `elasticsearch.yml` requires a restart.

So you need to change `elasticsearch.yml` on all nodes and restart them.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [March 27, 2024, 12:21pm UTC](https://discuss.elastic.co/t/create-snapshot-on-on-prem-s3/354336/6 "2024-03-27T12:21:11Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
