Path to index on disk in ES 5.3

In ES v2.* I used to be able to see the index files under a directory that was equivalent to the index name. In v 5.* this appears not to be the case. eg.
ES 2.* nodes/0/indices/myindex
ES 5.* nodes/0/indices/Se6GMUykQKiG7EDMt3e-AQ

Is there a way to map the index name to the ordinal value ?
I need this because I need to be able to copy an index made on one machine to a separate machine on a separate network etc.

Many thanks,
Phil

Hi Phil,

https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html
what about making an snapshot? would that work?

Thanks for the reply.

I'm not sure whether it would. Let me elaborate- I generate an index during our build process. I used to then archive this and distribute it to the various ES node data paths. I'd delete the older version of the index first by simply removing the directory, then I'd copy in the new index directory. It worked well. However, now , because I have multiple indices, I have no way of telling which is the index directory I should delete up front. Would snapshotting solve this issue ?

I think that manual work is pretty error prone, I would definitely give it a try to snapshot, and then if you want to delete an index you can use the API.
You can generate a snapshot of an index you need, and then restore it in another instance.
Hopefully I understood your case, but I might be wrong :slight_smile:

I'd have to experiment. It's a nice idea, thanks.
In the meantime, I also found the mapping I want from index name to ordinal:
http://localhost:9200/_cat/indices/

I do prefer the idea of the snapshot though. I'm going to go away and play!

it worked great thanks !

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