Hi, I have been doing some testing to check how snapshots restore process works, but I’m facing some problems with .kibana index.
I have elasticsearch 6.5.4 version and .kibana indices are ".kibana_N" (incremental) type. I created snapshots saving those .kibana-N indices. When trying to simulate an elasticsearch crash in a kubernetes environment, I do the following steps:
- Create a snapshot saving .kibana* indices (.kibana does not exist. When doing "curl elasticsearch:9200/_cat/indices?v" only .kibana_N type is showed)
- Delete elasticsearch statefulset
- Start elasticsearch statefulset in a new persistent volume
- Check indices. "curl elasticsearch:9200/_cat/indices?v" shows .kibana (not .kibana_N). Of course elasticsearch and kibana versions are the same as before.
- Restore the previous snapshot
In that last step, an error is raised saying "TransportError(500, 'illegal_state_exception', 'index and alias names need to be unique, but the following duplicates were found [.kibana (alias of [.kibana_1 ...]')"
The solution I found is to reindex .kibana_1 into .kibana. Everything seems to work properly, but there are no .kibana_N index anymore, so I am afraid I am changing the configuration doing that so, maybe, it would raise some errors in the future.
I would like to know why .kibana index is created after starting elasticsearch the second time, if the first one no .kibana was showed and also, Is it proper the way I am restoring .kibana_N index? or it could be an inconvenience afterwards? I would like to be able to restore .kibana_N indices keeping their original names.
Any piece of advice or help appreciated.