# Create several repositories in a single location

**URL:** <https://discuss.elastic.co/t/create-several-repositories-in-a-single-location/155842>\
**Category:** Elasticsearch\
**Created:** [November 8, 2018, 8:54am UTC](https://discuss.elastic.co/t/create-several-repositories-in-a-single-location/155842 "2018-11-08T08:54:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sebc](https://avatars.discourse-cdn.com/v4/letter/s/dbc845/32.png) [@sebc](https://discuss.elastic.co/u/sebc)\
**Post date:** [November 8, 2018, 8:54am UTC](https://discuss.elastic.co/t/create-several-repositories-in-a-single-location/155842/1 "2018-11-08T08:54:00Z")

</div>

Hi,

Despite reading documentation, I could not figure out all the details about "repositories" used to snapshot/restore indices from/to elasticsearch.

I configured a single snapshot/restore folder location for my E/S cluster thanks to path.repo field in .yml conf file : I put following line in the conf file :  
path.repo: ["/myfolder/elasticsearch-backup"]

Then, I created a repository using following API:  
PUT /\_snapshot/snapshot\_repo\_one  
{  
"type": "fs",  
"settings": {  
"compress" : true,  
"location": "/myfolder/elasticsearch-backup"  
}  
}

I create two snapshots in this repository:  
PUT /\_snapshot/snapshot\_repo\_one/snapshot-number-one?wait\_for\_completion=false  
PUT /\_snapshot/snapshot\_repo\_one/snapshot-number-two?wait\_for\_completion=false

Great, I am able to list these snapshots for the repository:  
GET /\_snapshot/snapshot\_repo\_one/\_all  
=\> returns my 2 snapshots (snapshot-number-one & snapshot-number-two) 🙂

Though, I tried to create a second repository in the same (single configured) location:  
PUT /\_snapshot/snapshot\_repo\_two  
{  
"type": "fs",  
"settings": {  
"compress" : true,  
"location": "/myfolder/elasticsearch-backup"  
}  
}

I didn't create any snapshot in this new repository, but when I try to list the snapshots from this one, I get the same list as the previous one (snapshot-number-one & snapshot-number-two) ...☹  
GET /\_snapshot/snapshot\_repo\_two/\_all

Do you know why ? what did I miss about repositories & locations in the documentation ?  
Thanks for your help

Sebastien

---

<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:** [December 6, 2018, 8:54am UTC](https://discuss.elastic.co/t/create-several-repositories-in-a-single-location/155842/2 "2018-12-06T08:54:26Z")

</div>

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