Elasticsearch OpenSearch Recovery

By Opster Team

Updated: Jun 27, 2023

| 2 min read

Quick links:


In OpenSearch, recovery refers to the process of recovering an index or shard when something goes wrong. There are many ways to recover an index or shard, such as by re-indexing the data from a backup / failover cluster to the current one, or by restoring from an OpenSearch snapshot. Alternatively, OpenSearch performs recoveries automatically, such as when a node restarts or disconnects and connects again. There is an API to check the updated status of index / shard recoveries.

GET /<index>/_recovery
GET /_recovery

In summary, recovery can happen in the following scenarios:

  • Node startup or failure (local store recovery)
  • Replication of primary shards to replica shards
  • Relocation of a shard to a different node in the same cluster
  • Restoring a snapshot


Getting recovery information about several indices:

GET my_index1
GET my_index2/_recovery

Notes and good things to know

  • When a node is disconnected from the cluster, all of its shards go to an unassigned state. After a certain amount of time, the shards will be allocated somewhere else on other nodes. This setting determines the number of concurrent shards per node that will be recovered.
PUT _cluster/settings
  • You can also control when to start recovery after a node disconnects. This is useful if the node just restarts, for example, because you may not want to initiate any recovery for such transient events.
PUT _all/_settings
  • OpenSearch limits the speed that is allocated to recovery in order to avoid overloading the cluster. This setting can be updated to make the recovery faster or slower, depending on your requirements.
PUT _cluster/settings

How helpful was this guide?

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?