Can we control file/location where index data is stored in Elasticsearch?

Hi,

Can we control the file or location where the index data of particular index is stored in Elasticsearch?

That is, let say, I have multiple indices in my Elasticsearch indices and one of which is called index1

Can I specify the location/file where the data specific to the index1 to be stored on creation?
Can I back up the files specific to index1 alone separately ?
Can I restore the index index1 from the back up?

Any response on this would be greatly appreciated.

Thanks.
Sundar.

1 Like

You can not specify location for an index within a node. You can however backup specific indices using the snapshot API. Note that file system level backups or snapshots are not supported.

Thanks @Christian_Dahlqvist for the response

@sundar.s depending on the stack version, you can use node attributes to define where a particular index should be stored. For a more generic configuration, this setting can be specified in index template itself.
The whole idea of Hot-Warm-Cold architecture is based on this where most recent indices are stored on Hot nodes (which have node.attr set to hot), older ones on Warm and very old (basically not being used anymore even for searching/ analysis hence frozen indices) on Cold.

However, you need to analyze the number of shards for each index as you should have count of nodes per attr = max. number of shards (pri+rep) of any index to be stored on attr labelled nodes.

Thanks Ayush

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