elasticsearch 常用命令
#查看集群状态
curl -XGET "http://localhost:9200/_cluster/health?pretty"
#查看所有的快照
curl -XGET "http://localhost:9200/_snapshot/仓库名/_all"
#查看快照信息
curl -XGET "http://localhost:9200/_snapshot/仓库名/snapshot_name/_status"
#删除快照
curl -XDELETE "localhost:9200/_snapshot/仓库名/snapshot_name"
#生成快照
curl -XPUT -uelastic:xxxx "http://127.0.0.1:9200/_snapshot/仓库名/snapshot_name?wait_for_completion=true" -d '
{
"indices": "index_name",
"ignore_unavailable": "true", #在创建快照的过程中会忽略不存在的索引
"include_global_state": false #防止集群的全局状态被作为快照的一部分存储起来
}'
#恢复快照
curl -XPOST "http://127.0.0.1:9200/_snapshot/仓库名/snapshot_name/_restore?wait_for_completion=true" -d '
{
"ignore_unavailable": "true",
"include_global_state": false ,
"index_settings": { "index.number_of_replicas": 0 } #配置 replica为0,可选条件
}'
#查看快照恢复状态
curl "http://localhost:9200/_cluster/state" | jq '.restore'
#关闭索引
curl -XPOST "http://localhost:9200/index_name/_close"
#开启索引
curl -XPOST "http://localhost:9200/index_name/_open"
#删除索引
curl -XDELETE "http://127.0.0.1:9200/index_name"
#查看索引数据
curl -XGET "http://localhost:9200/index_name/_search"
#合并段
curl -XPOST "http://localhost:9200/index_name/_forcemerge?max_num_segments=1"
#配置replica个数
curl -XPUT "http://localhost:9200/index_name/_settings" -d '{
"index" : {
"number_of_replicas" : 0 }
}'
#创建仓库
curl -XPUT "http://127.0.0.1:9200/_snapshot/仓库名" -d '
{
"type": "fs",
"settings": {
"location": "/S3/elasticsearch/仓库目录路径" }
}'
#查询仓库信息
curl -XGET "http://127.0.0.1:9200/_snapshot/仓库名"
elasticsearch 常用命令的更多相关文章
- elasticsearch常用命令
elasticsearch的rest访问格式: curl -X<REST Verb> <Node>:<Port>/<Index>/<Type> ...
- 实战ELK(2) ElasticSearch 常用命令
1.Cluster Health 集群状态 curl 'localhost:9200/_cat/health?v' yellow代表分片副本确实,因为我们现在只有一台机器. curl 'localho ...
- elasticsearch 常用命令(一)
索引 搜索 mapping 分词器 1.创建索引 http://192.168.65.131:9200/smartom_index?pretty 2.查看索引: http://192.168.65.1 ...
- elasticsearch 常用命令 一直红色 重启不稳定 不停的宕机
persistent (重启后设置也会存在) or transient (整个集群重启后会消失的设置). 查看集群状态和每个indices状态.搜索到red的,没用就删除 GET /_cluster/ ...
- ElasticSearch——常用命令
集群相关 --查询集群健康状态 GET _cluster/health --查询所有节点 GET _cat/nodes --查询索引及分片的分布 GET _cat/shards --查询指定索引分片的 ...
- elasticsearch常用命令备注
1.检查集群健康状态 curl 'localhost:9200/_cat/health?v' 2.检查节点健康状态 curl 'localhost:9200/_cat/nodes?v' 3.新增一条索 ...
- elasticsearch(四) 之 elasticsearch常用的一些集群命令
目录 elasticsearch常用的一些集群命令 查看集群健康状态 查看集群的节点列表 查看所有的索引 删除索引 查询索引的某个文档内容 更新文档 删除文档 自动创建索引 定时删除索引 elasti ...
- elasticsearch 索引清理脚本及常用命令
elastic索引日志清理不及时,很容易产生磁盘紧张,官网给出curl -k -XDELETE可以清理不需要的索引日志. 清理脚本 #!/bin/bash #Author: 648403020@qq. ...
- Docker安装和常用命令
Docker安装 Docker的安装可以参考 https://docs.docker.com/ 下面的 Get Docker / Docker CE / Linux, 需要关注的主要是CentOS和U ...
随机推荐
- pc端字体大小自适应几种方法
$(window).resize(function ()// 绑定到窗口的这个事件中 { var whdef = 100/1920;// 表示1920的设计图,使用100PX的默认值 var wH ...
- 解决Warning: unlink(/storage/cache/cache.catalog.language.1556158719): No such file or directory in /system/library/cache/file.php on line 68问题
ytkah在调试opencart项目时提示Warning: unlink(/storage/cache/cache.catalog.language.1556158719): No such file ...
- btcpool之GbtMaker
一.简介 GbtMaker全称getblocktemplate maker,它通过getblocktemplate rpc接口从bitcoind获得挖矿所需数据,然后把该数据发送到kafka消息队列. ...
- Centos7 初始化硬盘分区、挂载
1.通过命令fdisk-l查看硬盘信息 可以看到有两块硬盘/dev/vda和/dev/vdb,启动vda是系统盘vdb是我们新增的数据盘. 2.执行以下命令,进入fdisk模式,开始对新增数据盘执行分 ...
- 【Solution】MySQL 5.8 this is incompatible with sql_mode=only_full_group_by
[42000][1055] Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated colu ...
- 一、初识CocoaPods——XCode的依赖库管理工具
概述 任意一款功能完整的APP,其中所涉及的内容都将是来自各个领域各个方面的.如果每个领域的每个方面都要重新开发并给予充分测试,那么1个APP的开发周期将会变得非常漫长,长到足以让房价再涨一倍,长到足 ...
- ElasticSearch 随笔
1.如何用亚马逊S3存储一个ES服务索引.http://t.cn/R0fAJwK 2.ELK实战 - 利用Nginx日志分析API耗时.http://t.cn/R6sgQfU 3.Kibana中的地 ...
- reduce函数
python中的reduce python中的reduce内建函数是一个二元操作函数,他用来将一个数据集合(链表,元组等)中的所有数据进行下列操作:用传给reduce中的函数 func()(必须是 ...
- app ios info权限配置:
info权限配置: Privacy - Bluetooth Peripheral Usage Description --> App需要您的同意,才能访问蓝牙 Privacy - Calenda ...
- _sntprintf_s 和 _sntprintf 区别
https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/snprintf-s-snprintf-s-l-snwprintf-s ...