POST _snapshot/es7_bak20210607/es6_bakgpbl-parb/_restore
在恢复快照时,可以使用tail -f 参数实时查看es的日志
[2021-06-07T16:14:00,262][INFO ][o.e.c.m.MetaDataDeleteIndexService] [es7] [bid_info_supplier/MltM8uBnSWO2G2bdru7tuQ] deleting index
[2021-06-07T16:14:24,916][INFO ][o.e.c.r.a.DiskThresholdMonitor] [es7] releasing read-only-allow-delete block on indices: [[bid_info_supplier, bid_info]]
[2021-06-07T16:40:09,523][INFO ][o.e.c.r.a.AllocationService] [es7] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[bid_info][4]]]).
1.6 F&Q 具体问题:
{
"error" : {
"root_cause" : [
{
"type" : "mapper_parsing_exception",
"reason" : "analyzer [ik_max_word] not found for field [lawDetail]"
}
],
"type" : "mapper_parsing_exception",
"reason" : "Failed to parse mapping [bl_law]: analyzer [ik_max_word] not found for field [lawDetail]",
"caused_by" : {
"type" : "mapper_parsing_exception",
"reason" : "analyzer [ik_max_word] not found for field [lawDetail]"
}
},
"status" : 400
} 产生原因:
分词器没有安装 解决办法:
安装匹配版本的分词器即可
注意:
在控制台删除直接使用delete bid_info
DELETE _snapshot/back/es-2021060814 //删除快照
单个删除索引:
curl -XDELETE -u elastic:密码 http://localhost:9200/es-message-2021.08.14
删除多个索引,中间有逗号隔开:
curl -XDELETE -u elastic:密码 http://localhost:9200/abis-info-2021.08.09,abis-error-2021.08.10
模糊匹配删除:
curl -XDELETE -u elastic:密码 http://localhost:9200/abis-*
删除所有索引:
curl -XDELETE http://localhost:9200/_all
或 curl -XDELETE http://localhost:9200/*
_all ,* 通配所有的索引
通常不建议使用通配符,误删了后果就很严重了,所有的index都被删除了
禁止通配符为了安全起见,可以在elasticsearch.yml配置文件中设置禁用_all和*通配符
action.destructive_requires_name = true
这样就不能使用_all和*了