# Snapshot Repository with Minio

**URL:** <https://discuss.elastic.co/t/snapshot-repository-with-minio/300475>\
**Category:** Elasticsearch\
**Tags:** docker, snapshot-and-restore\
**Created:** [March 23, 2022, 2:51pm UTC](https://discuss.elastic.co/t/snapshot-repository-with-minio/300475 "2022-03-23T14:51:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![peterON](https://avatars.discourse-cdn.com/v4/letter/p/6de8d8/32.png) [@peterON](https://discuss.elastic.co/u/peterON)\
**Post date:** [March 23, 2022, 2:51pm UTC](https://discuss.elastic.co/t/snapshot-repository-with-minio/300475/1 "2022-03-23T14:51:58Z")

</div>

Hey, I have tried multiple days to get elastic and Minio to talk to each other. For Dev purpose I currently run a docker-compose with Elasticsearch 8.1.1 and the latest Minio. The `docker-compose.yml` is as basic as it gets: [version: "3"services: elastic: image: "docker.elastic.co/elasticsear - Pastebin.com](https://pastebin.com/ZVeKH7sr)

I create a new bucket in Minio called `elastic` and have even tried giving it full read/write.  
Then I added the secret- and access-keys with `docker-compose exec elastic bash -c "echo EXAMPLE | bin/elasticsearch-keystore add -f --stdin s3.client.default.access_key"`.  
Then create the repository with the following cmd:

```auto
curl -X PUT "localhost:9200/_snapshot/s3_repository?pretty" -H 'Content-Type: application/json' -d'
{
    "type": "s3",
    "settings": {
        "bucket": "elastic",
        "endpoint": "minio:9000",
        "path_style_access": "true",
        "protocol": "http"
    }
}'

```

(For testing I also had keys in that request)  
When I verify the repository either by adding `?verify=true` or in Kibana. I always get `no route to host`.

```auto
{'error': {'root_cause': [{'type': 'repository_exception', 'reason': '[s3_repository] Could not determine repository generation from root blobs'}], 'type': 'repository_exception', 'reason': '[s3_repository] Could not determine repository generation from root blobs', 'caused_by': {'type': 'i_o_exception', 'reason': 'Exception when listing blobs by prefix [index-]', 'caused_by': {'type': 'sdk_client_exception', 'reason': 'Failed to connect to service endpoint: ', 'caused_by': {'type': 'no_route_to_host_exception', 'reason': 'No route to host'}}}}, 'status': 500}

```

I can exec into the elastic container and ping/curl the minio container. Also configuring the internal docker ip to exclude dns didn't work.

I feel like I have tried all the possible combinations of settings I could scrape from the docs, can anyone give me any more pointers to the a basic setup going?

---

<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:** [April 20, 2022, 2:52pm UTC](https://discuss.elastic.co/t/snapshot-repository-with-minio/300475/2 "2022-04-20T14:52:09Z")

</div>

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