Linux – How to take Elasticsearch single index backup

elasticsearchlinux

Can someone guide me to take single index backup in elasticsearch. When I search for this, I get all commands to take full snapshot.

Best Answer

By default a snapshot of all open and started indices in the cluster is created. This behavior can be changed by specifying the list of indices in the body of the snapshot request.

PUT /_snapshot/my_backup/snapshot_2?wait_for_completion=true
{
  "indices": "index_1,index_2",
  "ignore_unavailable": true,
  "include_global_state": false
}