# Is path.repo necessary for snapshots in elasticsearch.yml?

**URL:** <https://discuss.elastic.co/t/is-path-repo-necessary-for-snapshots-in-elasticsearch-yml/24753>\
**Category:** Elasticsearch\
**Created:** [July 1, 2015, 7:18pm UTC](https://discuss.elastic.co/t/is-path-repo-necessary-for-snapshots-in-elasticsearch-yml/24753 "2015-07-01T19:18:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![LansK](https://avatars.discourse-cdn.com/v4/letter/l/dc4da7/32.png) [@LansK](https://discuss.elastic.co/u/LansK)\
**Post date:** [July 1, 2015, 7:18pm UTC](https://discuss.elastic.co/t/is-path-repo-necessary-for-snapshots-in-elasticsearch-yml/24753/1 "2015-07-01T19:18:59Z")

</div>

The docs on snapshots ([https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html)) say:

"The shared file system repository ("type": "fs") uses the shared file system to store snapshots. In order to register the shared file system repository it is necessary to mount the same shared filesystem to the same location on all master and data nodes. This location (or one of its parent directories) has to be registered in the path.repo setting on all master and data nodes."

But if the repository folder is already created on each node, what else is achieved by adding it to path.repo?

---

<div class="post-metadata">

**Author:** ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)\
**Post date:** [July 1, 2015, 7:32pm UTC](https://discuss.elastic.co/t/is-path-repo-necessary-for-snapshots-in-elasticsearch-yml/24753/2 "2015-07-01T19:32:43Z")

</div>

This is required only for v1.6.0 and above. It ensures that repositories cannot be created outside of the path specified in `path.repo`. See [https://www.elastic.co/blog/elasticsearch-1-6-0-released#fs-config](https://www.elastic.co/blog/elasticsearch-1-6-0-released#fs-config) for more information.

---

<div class="post-metadata">

**Author:** ![LansK](https://avatars.discourse-cdn.com/v4/letter/l/dc4da7/32.png) [@LansK](https://discuss.elastic.co/u/LansK)\
**Post date:** [July 2, 2015, 1:14am UTC](https://discuss.elastic.co/t/is-path-repo-necessary-for-snapshots-in-elasticsearch-yml/24753/3 "2015-07-02T01:14:42Z")

</div>

Thanks - I'm using 1.5 at the moment, so I didn't catch that. I guess in 1.6 it will throw an error if I do not add path.repo for my current snapshots folder?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [July 2, 2015, 1:36am UTC](https://discuss.elastic.co/t/is-path-repo-necessary-for-snapshots-in-elasticsearch-yml/24753/4 "2015-07-02T01:36:29Z")

</div>

That's correct 🙂

---

<div class="post-metadata">

**Author:** ![Pytlicek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pytlicek/32/12059_2.png) [@Pytlicek](https://discuss.elastic.co/u/Pytlicek)\
**Post date:** [September 21, 2016, 4:37pm UTC](https://discuss.elastic.co/t/is-path-repo-necessary-for-snapshots-in-elasticsearch-yml/24753/5 "2016-09-21T16:37:39Z")

</div>

Elastic won't start if path (in my case mountpoint) is not accessible (not mounted).  
For example : java.lang.IllegalStateException: Unable to access 'path.repo' (/mnt/backup/elasticsearch/snapshots)  
I think this isn't good to check path if you use script to backup elastic data to some (mounted) location.  
If your location is bad : throw an exepction and don't create snapshot. But elastic will be always able to start. In this case elastic stops starting and stays down ☹ . To have always mounted backup mountpoint (backup data) is imho stupid idea, isn't ?

---

<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:** [July 5, 2017, 10:18pm UTC](https://discuss.elastic.co/t/is-path-repo-necessary-for-snapshots-in-elasticsearch-yml/24753/6 "2017-07-05T22:18:26Z")

</div>


