Monday, April 29, 2024

Restore a snapshot in elasticsearch

Suppose you want to restore indice software on another machine. Move the snap pieces and create same repository as in source. After that execute below command which will restore "Software" indices.


 [elk@elknode2 backup]$ curl -X POST "http://localhost:9200/_snapshot/esbackup/29thapril_snapshot/_restore?pretty" -H 'Content-Type: application/json' -d'

{

"indices": "software"

}'


Above should return as below:


{

  "accepted" : true

}