####elasticsearch 集群迁移与扩容脚本命令 ######下线节点命令 curl -X PUT "localhost:9200/_cluster/settings" -H 'Content-Type: application/json' -d' { "transient" : { "cluster.routing.allocation.exclude._ip" : "10.0.0.1" } } ######查看集群分片数量 curl -X GET "localhost:9200/_cat/allocation?v" #####重新加入节点 curl -X PUT "localhost:9200/_cluster/settings" -H 'Content-Type: application/json' -d' { "transient" : { "cluster.routing.allocation.include._ip" : "10.0.0.*" } } ######数据恢复 增加网络传输速度 curl -X PUT "localhost:9200/_cluster/settings" -H 'Content-Type: application/json' -d' { "persistent" : { "indices.recovery.max_bytes_per_sec" : "100mb" } }