點擊上方“IT那活兒”公眾號,關(guān)注后了解更多內(nèi)容,不管IT什么活兒,干就完了!!!
jps|grep -i elasticsearch|awk {print $1}|xargs kill –-停止新ES集群各節(jié)點
./elasticsearch -d --啟動新ES集群各節(jié)點
curl -u xxx.x.xxx.65:9201/_template/template_ shsnc-crm_tpt_tj* >> template.txt
curl -H "Content-Type: application/json"
-XPUT http://xxx.x.XXX.214:9201/_template/template_shsnc-
crm_tpt_tj_dtfjzl_data -d{"order": 0, "index_patterns":
["shsnc-crm_tpt_tj_dtfjzl_data"], "settings": {"index":
{"number_of_shards": "1", "number_of_replicas": "0"}},
"mappings": {"_doc":{"dynamic": false, "properties":
{"appname": {"ignore_above": 10000, "type": "keyword"},
"createTime": {"format": "yyyy-MM-dd HH:mm:ss.SSS", "type": "date"}, "raw_message": {"analyzer": "ik_smart", "type":
"text"}, "startLine": {"ignore_above": 10000, "type":
"keyword"}, "op_time": {"format": "yyyy-MM-dd HH:mm:ss", "type": "date"}, "COUNT": {"ignore_above": 10000, "type":
"keyword"}, "cmdb_id": {"ignore_above": 10000, "type":
"keyword"}, "agentip": {"ignore_above": 10000, "type":
"keyword"}}}}, "aliases": {}}
curl -H Content-Type: application/json
-XPOST "http://xxx.x.xxx.214:9201/_reindex?pretty" -d {
"source": {
"remote": {"host": "http://xxx.x.xxx.65:9201"},
"username": "xxxxxx", --username、password若有則指定,若無則去掉此項
"password": "xxxxxx",
"index": "shsnc-crm_tpt_tj_dtfjzl_data",
"type": "_doc"},
"dest": {"index": "shsnc-crm_tpt_tj_dtfjzl_data"}}
curl -H Content-Type: application/json
-XPUT http://xxx.x.xxx.65:9201/_snapshot/my_backup -d {
"type": "fs",
"settings": {
"location": "/home/elk/es-repo-test",
"compress": true,
"max_snapshot_bytes_per_sec":"20mb",
"max_restore_bytes_per_sec":"20mb"}}
注:
Curl -H Content-Type: application/json -XPUT
http://xxx.x.xxx.65:9201/_snapshot/my_backup/es-snapshot-1?wait_for_completion=true
curl -H Content-Type: application/json
-XPUT http://xxx.x.xxx.20:9201/_snapshot/my_backup -d {
"type": "fs",
"settings": {
"location": "/home/elk/es-repo-test",
"compress": true,
"max_snapshot_bytes_per_sec":"20mb",
"max_restore_bytes_per_sec":"20mb"}}
curl -XPOST http://xxx.x.xxx.20:9201/_snapshot/my_backup/es-snapshot-1/_restore
文章版權(quán)歸作者所有,未經(jīng)允許請勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。
轉(zhuǎn)載請注明本文地址:http://specialneedsforspecialkids.com/yun/129098.html
閱讀 3735·2023-01-11 11:02
閱讀 4244·2023-01-11 11:02
閱讀 3050·2023-01-11 11:02
閱讀 5180·2023-01-11 11:02
閱讀 4736·2023-01-11 11:02
閱讀 5533·2023-01-11 11:02
閱讀 5313·2023-01-11 11:02
閱讀 3986·2023-01-11 11:02