Elasticsearch:集群运维常用API(二)

一、Snapshot
1、从已备份的快照中恢复indices

POST _snapshot/oss_bucket_name/snapshot_name/_restore?wait_for_completion=false
{
  "indices":"indices_name",
  "ignore_unavailable":"true",
  "index_settings": {
    "index.number_of_replicas": 0,
    "index.routing.allocation.total_shards_per_node":"10"
  },
  "include_global_state":false
}

二、discover(7之前版本)
1、更改ES集群minimum_master_nodes节点数量

PUT _cluster/settings
{
    "persistent" : {
        "discovery.zen.minimum_master_nodes" : 1
    }
}

你可能感兴趣的:(elasticsearch)