Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Elasticsearch restore single index from snapshot

Before I go an do something stupid, can I double check something with other Elastic users:

My cluster has 2000+ indexes. I've messed up just one of them and need to restore it from a snapshot. If I select that one index to restore, I just want to be sure I'm not going to end up with a cluster with just that index and my other 1999+ missing.

I would imagine the opposite will happen, the 1999+ will remain untouched and just that one will be restored, but I need to be sure before I hit go.

I'm using Elastic Cloud if it has any bearing on things.

like image 708
Raoot Avatar asked Sep 17 '25 16:09

Raoot


1 Answers

When you restore single index from elasticsearch snapshot, then only the single index will be restored and rest of the indices will remain untouched.

You can restore single index from elasticsearch snapshot using below command:

curl -X POST "<es_endpoint>/_snapshot/<repository_name>/<snapshot_name>/_restore?pretty" -H 'Content-Type: application/json' -d'
{
  "indices": "<index_to_restore>",
}
'
like image 58
piyush daftary Avatar answered Sep 19 '25 06:09

piyush daftary