Find Index name associated with ES/data folder

I had to delete all my data from my elasticsearch/data/nodes/* folder because index "cust_name_abc" had a transaction log read error. Which stopped my entire ELK stack.

In the future how do I find the matching elasticsearch/data/nodes/xxx folder for "cust_name_abc"

The data folder had folder names with random number & letters.

Thanks

Removing files from the Elasticsearch path.data directory is quite dangerous and not a recommended way of cleaning up bad data, the only times I've done so is when I've done a clean install on an old Elasticsearch node - then I remove the entire data directory to create a fresh one.

If you need to get rid of a faulty index, just use the Delete Index mechanism - it allows you to delete one or several indices via a curl command (or from Kibana). For instance

curl -X DELETE "localhost:9200/facebook-*"

will delete all indices with names starting with "facebook-". This is quick and much safer than removing files from the data directory.

1 Like

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