Why did Elasticsearch automatically rename all of my indices?


#1

Hi,

I have been trying to upgrade from 2.x to 6.x and am seeing very strange behavior. Most recently, I noticed that elasticsearch has renamed my indices from my human-readable names to some random uncomprehendable name. Why is this happening?

Thanks,
Dave


(David Pilato) #2

This is on purpose. We changed that in 5.x.


#3

Really, now my pattern matching in Kibana doesn't work? I used to be able to use myname* as my index pattern but now it doesn't find any data?

Is there any way to change this? Also we keep backups and it is beneficial to have the date set in the name. And all if the index folders now show today as the date so I can't even tell from the directory properties.

Thanks!
Dave


(David Pilato) #4

now my pattern matching in Kibana doesn't work?

This is still working. I'm just saying that the file names on disk changed, not the index names that you always access via the API.

You should never look at what you have in the data dir but only use APIs.

To do backups, use snapshot and restore feature.

BTW the _cat API will give you details about the concrete index id (which is on disk) and the index name.


#5

Thanks for the tips, I'm not sure what I was seeing before... I ended up restoring a filesystem snapshot, checking using the elasticsearch-migration plugin for 2.x, going to 5.x, starting elasticsearch and waiting a long time and eventually it came up, then installing x-pack in elastisearch and kibana, starting elasticsearch and waiting a long time (it complained about .watchers stuff but eventually got over it). Then I started Kibana and now I'm able to use the reindex helper to slowly reindex the 196 indices. Phew. I think the biggest thing I did was just letting elasticsearch work through whatever problems (.watchers etc.) it encountered as it was coming up even though it was throwing ERROR log lines.

One big thing that confused me as I switched versions was the path.data settings in elasticsearch.yml. In 2.x it expected the path to be /foo and in 5.x it expected the path to be /foo/elasticsearch. Don't think I saw this documented in the breaking changes.


(David Pilato) #8

No. path.data should still be /foo. Elasticsearch can deal with old data directory organization. Previously the cluster.name was part of it (ie elasticsearch) and if you start from scratch a new cluster in 5.x, you won't see it anymore.
But if you start a 5.x node on an existing directory created with 2.x, elasticsearch will be able to read it.


(system) #9

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