ElasticSearch 数据快照、恢复与监控工具使用指南
1. 执行数据快照
在拥有可用的 ElasticSearch 集群和已定义的存储库后,就可以为索引创建快照。每个存储库可定义多个快照。
1.1 准备工作
需要一个正常运行的 ElasticSearch 集群以及之前创建好的存储库。
1.2 创建快照
以创建名为snap_1的快照,包含索引test和test1为例,使用的 HTTP 方法为 PUT,curl 命令如下:
curl -XPUT "localhost:9200/_snapshot/my_backup/snap_1?wait_for_completion=true" -d '{ "indices": " test-index,test-2", "ignore_unavailable": "true", "include_global_state": false }'执行结果示例:
{ "snapshot" : { "snapshot" : "snap_1", "indices" : [ "test-index" ], "state" : "SUCCESS", "start_time" : "2014-11-13T21:40:45.406Z", "start_time_