点击上方“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
摘要:本文给大家分享下滴滴在多集群架构的实践。负责整个集群的元数据管理。任务处理模型,在任务执行完成后,会回调大量处理元数据变更。滴滴平台通过统一管控索引,避免了同一个索引名称出现在连接的多个集群中。 出品 | 滴滴技术作者 |魏子珺 showImg(https://segmentfault.com/img/bVbsMkj?w=1800&h=766); Elasticsearch 是基于 L...
摘要:常见的数据库都会提供备份的机制,以解决在数据库无法使用的情况下,可以开启新的实例,然后通过备份来恢复数据减少损失。虽然有良好的容灾性,但由于以下原因,其依然需要备份机制。我们今天就着重讲解下第二种备份的方式,即的使用。 常见的数据库都会提供备份的机制,以解决在数据库无法使用的情况下,可以开启新的实例,然后通过备份来恢复数据减少损失。虽然 Elasticsearch 有良好的容灾性,但由...
摘要:要升级包含在中创建的索引的集群,必须在升级到之前重新索引或删除它们。将和重置为旧索引中使用的值。等待索引状态变为。在单个更新别名请求中删除旧索引。当重新索引作业完成时,将和设置为所需的值默认设置是和。 升级前重新索引 Elasticsearch可以读取上一个主要版本中创建的索引,旧的索引必须重新索引或删除。Elasticsearch 6.x可以使用Elasticsearch 5.x中创...
摘要:截止目前我们选择了不升级集群。有了这么多的分片和节点,集群操作有时变得更特殊。我们相信测试本身导致了集群宕机。和的性能高度依赖于具体的查询和数据,没有银弹。考虑使用缓存,包括外缓存和级别的缓存。 本文首发于InfoQ https://www.infoq.cn/article/... 作者:Anton Hägerstrand翻译:杨振涛 目录: 数据量 版本 节点配置 索引结构 性能 ...
摘要:我们会得到查询语句中根据哪个字段进行聚合,另外每个字段基数会由其他服务进行统计,例如根据字段进行聚合,由于基数过大。如果是针对大基数字段进行聚合查询预估消耗内存较大时,就会把这种查询熔断。 showImg(https://segmentfault.com/img/bVblkvK?w=640&h=360); 12月15日,即便天气寒冷,飘着雨。跨星空间座无虚席由袋鼠云、阿里云、elast...
阅读 3260·2023-01-11 11:02
阅读 3821·2023-01-11 11:02
阅读 2649·2023-01-11 11:02
阅读 4819·2023-01-11 11:02
阅读 4313·2023-01-11 11:02
阅读 5019·2023-01-11 11:02
阅读 4798·2023-01-11 11:02
阅读 3231·2023-01-11 11:02