使用elasticdump导出/导入 -- ES数据

导出指定索引数据到指定文件夹:

./elasticdump --input=http://用户:密码@IP:9201/索引名字 --output=导出路径/out.json --type=data

将导出的文件导入

./elasticdump --input=路径/out.json --output=http://账号:密码@IP:9201/索引名称 --type=data --fileType=json

【elasticdump --input=http://用户:密码@ip:9200/索引 --output=./导出文件名.json --type=data --limit=100 --offset=200

--offset 200 表示从第 200 条记录开始导出,--limit 100 表示每100 条数据一个批次,即导出第 200 条到第 299 条记录。

】

按照查询结果导出

先创建一个查询json文件:search.json

{"query":{"term":{"status":1}}}

然后导出:

./elasticdump --input=http://账号:密码@IP:9201/索引名称 --output=./output2.json --type=data --limit=100 --searchBody=@路径/search.json

相关推荐
Sayai12 小时前
Elasticsearch 日志检索 DSL 实战:时间范围查询、字段去重、分钟级统计与最新日志获取
大数据·运维·elasticsearch·搜索引擎·日志分析
阿狗童鞋17 小时前
Elasticsearch实战指南
大数据·elasticsearch·搜索引擎
IT大白鼠18 小时前
搜索系列 · 第 04 篇——部署实操:内网集群落地
运维·elasticsearch·nosql
Elastic 中国社区官方博客18 小时前
使用 Jev 作为 search reranker:基准测试与实现方法
大数据·运维·elasticsearch·全文检索
Elasticsearch21 小时前
签名、密封、交付:使用 Vault 和 cert-manager 进行 ECK 证书管理
elasticsearch
看浪的路人1 天前
第5讲:Prompt 管理与版本追踪
大数据·数据库·elasticsearch
Elastic 中国社区官方博客2 天前
Kubernetes attributes processor v1:它对 EDOT Collector 意味着什么
java·大数据·elasticsearch·搜索引擎·贪心算法·kubernetes·全文检索
Elastic 中国社区官方博客2 天前
Elasticsearch Serverless 如何通过 hollow shards 将索引节点关闭次数降低 30%
大数据·数据库·elasticsearch·搜索引擎·serverless·全文检索
w***48822 天前
SpringBoot整合easy-es
spring boot·后端·elasticsearch
guo_wen_qiang2 天前
云服务器elasticsearch环境搭建-单台
运维·elasticsearch·容器