点击上方“IT那活儿”公众号,关注后了解更多内容,不管IT什么活儿,干就完了!!!
jps|grep -i elasticsearch|awk {print $1}|xargs kill –-停止新ES集群各节点
./elasticsearch -d --启动新ES集群各节点
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
文章版权归作者所有,未经允许请勿转载,若此文章存在违规行为,您可以联系管理员删除。
转载请注明本文地址:https://www.ucloud.cn/yun/129098.html
出品 | 滴滴技术作者 |魏子珺 Elasticsearch 是基于 Lucene 实现的分布式搜索引擎,提供了海量数据实时检索和分析能力。Elastic 公司开源的一系列产品组成的Elastic Stack,可以为日志服务、搜索引擎、系统监控等提供简单、易用的...
...启新的实例,然后通过备份来恢复数据减少损失。虽然 Elasticsearch 有良好的容灾性,但由于以下原因,其依然需要备份机制。 数据灾备。在整个集群无法正常工作时,可以及时从备份中恢复数据。 归档数据。随着数据的积累,...
升级前重新索引 Elasticsearch可以读取上一个主要版本中创建的索引,旧的索引必须重新索引或删除。Elasticsearch 6.x可以使用Elasticsearch 5.x中创建的索引,但不能使用Elasticsearch 2.x或之前创建的索引,Elasticsearch 5.x可以使用Elasticsea...
...数据的存储和检索技术。 从0.11.X 版本开始我们就已经是Elasticsearch的忠实用户了。在经历了一些波折之后,最终我们认为做出了正确的技术选型。 Elasticsearch 用于支持我们的主要媒体监控应用,客户通过该应用可以检索和分析媒...
...办袋鼠云、阿里云、有赞、滴滴的技术大牛倾囊相授~ “ElasticSearch运维技术实践”精彩上演! Now,温故而知新,一起来回顾吧~ 干货来啦,别带着它入睡,赶紧拿小本本记下来吧! 解 惑 篇 在此本萌特别精编了一辑本场沙龙现...
阅读 2789·2023-01-11 11:02
阅读 3331·2023-01-11 11:02
阅读 1856·2023-01-11 11:02
阅读 3591·2023-01-11 11:02
阅读 3084·2023-01-11 11:02
阅读 3533·2023-01-11 11:02
阅读 3230·2023-01-11 11:02
阅读 1583·2023-01-11 11:02