Partial snapshot of a cluster

I want to know about snapshot feature of elasticSearch. While taking snapshot what if one of my node is not working? Can I still take the snapshot. If yes, will elastic search able to take the snapshot of all the shards(by using replica shards present in other nodes). I read about the "partial" setting of a snapshot which stops snapshot to get failed if primary shard are not available. I want to know whether the backup is of whole cluster or not. Also if I am restoring this snapshot to another cluster, Do I need to have same nodes and node configuration as previous cluster?

Please help!
Thanks in advance

As long as the primaries for all shards are available, the snapshot will fully complete. Note that when a node that holds a primary goes offline, the replica is promoted to primary. If this happens (node failing and replica promoted to primary) during a snapshot, then the snapshot fails unless you have set partial=true for the snapshot, in which case a partial snapshot will be taken of all the other shards except the one that failed.

Taking a snapshot will happen on all the indices in the cluster if you don't specify any specific indices to snapshot. You have the option to specify particular indices to snapshot, in which case only those will get snapshot.

You do not need the same nodes or node configurations to restore a snapshot. Elasticsearch will handle allocating the shards and index configurations for the indices being restored.

The docs explain in some more detail how this works; https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html

Hi Ali, thanks for your answer. Just one more thing if a partial snapshot is taken using partial=true parameter, does elasticsearch takes snapshot of the shard which is present in the node which is not working using the replica present in the other nodes. As you said that replica is promoted to primary, so I am expecting that the answer should be yes. Also just clarify, If I took a snapshot of an index whose primary shard is in "not working node", by using partial=true will I be able to take the snapshot of that index.(assume that it's replica is present in the node which is functioning properly)

does elasticsearch takes snapshot of the shard which is present in the node which is not working using the replica present in the other nodes.

Yes, because that shard would no longer be the replica, it would be the primary (once the primary is gone from the cluster and the replica has been promoted).

Also just clarify, If I took a snapshot of an index whose primary shard is in "not working node", by using partial=true will I be able to take the snapshot of that index.(assume that it's replica is present in the node which is functioning properly)

If there is at least one copy of every shard available in the index, then that copy will be the primary. It is not possible to have a replica without having an active primary. So if the current primary leaves the cluster, the replica will be promoted to primary at the same time.

If you set partial=true, you can still take a snapshot of that index, you will just potentially be missing some data if a primary is unavailable (which would make the cluster go into a RED state, by the way).

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