Advertisement
hivefans

es_move.sh

Dec 10th, 2020
909
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.75 KB | None | 0 0
  1. ####elasticsearch 集群迁移与扩容脚本命令
  2. ######下线节点命令
  3. curl -X PUT "localhost:9200/_cluster/settings" -H 'Content-Type: application/json' -d'
  4. {
  5.  "transient" : {
  6.    "cluster.routing.allocation.exclude._ip" : "10.0.0.1"
  7.  }
  8. }
  9.  
  10. ######查看集群分片数量
  11. curl -X GET "localhost:9200/_cat/allocation?v"
  12.  
  13. #####重新加入节点
  14. curl -X PUT "localhost:9200/_cluster/settings" -H 'Content-Type: application/json' -d'
  15. {
  16.   "transient" : {
  17.     "cluster.routing.allocation.include._ip" : "10.0.0.*"
  18.   }
  19. }
  20.  
  21. ######数据恢复 增加网络传输速度
  22. curl -X PUT "localhost:9200/_cluster/settings" -H 'Content-Type: application/json' -d'
  23. {
  24.    "persistent" : {
  25.        "indices.recovery.max_bytes_per_sec" : "100mb"
  26.    }
  27. }
  28.  
  29.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement