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

The docs on snapshots (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?

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 for more information.

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?

That's correct :slight_smile:

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 :frowning: . To have always mounted backup mountpoint (backup data) is imho stupid idea, isn't ?