Elasticsearch snapshot in cluster environment

I have implemented a log server using a Elasticsearch cluster which has 2 elasticsearch nodes.

Indexing naming on both servers are same. As an example for index logstash_1, on both elasticsearch nodes shows as logstash_1

So If I create a snapshot on one elasticsearch node index, will it create the full snapshot of that index ?. My exact requirement is illustrated as below.

A few pointers:

  • snapshot is for an index (regardless number/distribution of shards - indices would have their shard spread across the cluster)
  • you cannot create two indices of the same name in the same Elasticsearch cluster. Therefore I assume if you say you have two indices with exact same name on two nodes, you really have 2 clusters of 1 node - or else you really have only one index (on 2 nodes cluster each indices would have its primary and replica shards distributed evenly)
  • In case you have 2 clusters, if you want one snapshot on each cluster you will need to generate one snapshot for each cluster

A few API you can use:

  • http://node_name:9200/_cat/nodes -> this will tell you how many node your cluster has (assuming ES runs on 9200)
  • http://node_name:9200/_cat/indices?v -> this will give you list of indices on your cluster
  • https://node_name:9200/_cat/shards?v -> this will tell you where each shard is located and if replicas are assigned

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