elasticsearch 数据导出备份

安装

1.安装node

2.通过npm安装elasticdump

sh 复制代码
npm install elasticdump -g

导入导出数据

格式:elasticdump --input {protocol}://{host}:{port}/{index} --output ./test_index.json

导出当前索引的mapping结构

sh 复制代码
elasticdump --input http://ip:9200/test_index --output ./test_index_mapping.json --type=mapping

将索引中的数据导出到本地:

sh 复制代码
elasticdump --input=http://ip:9200/index --output=D:/date/test.json --type=data

将本地数据导入es中:

sh 复制代码
elasticdump --input=D:/date/test.json --output=http://ip:9200/index

将es导入另一个es:

sh 复制代码
elasticdump --input=http://ip1:9200/index --output=http://ip2:9200/index
相关推荐
武子康2 小时前
大数据-239 离线数仓 - 广告业务实战:Flume 导入日志到 HDFS,并完成 Hive ODS/DWD 分层加载
大数据·后端·apache hive
洛森唛18 小时前
Elasticsearch DSL 查询语法大全:从入门到精通
后端·elasticsearch
字节跳动数据平台1 天前
代码量减少 70%、GPU 利用率达 95%:火山引擎多模态数据湖如何释放模思智能的算法生产力
大数据
得物技术1 天前
深入剖析Spark UI界面:参数与界面详解|得物技术
大数据·后端·spark
武子康1 天前
大数据-238 离线数仓 - 广告业务 Hive分析实战:ADS 点击率、购买率与 Top100 排名避坑
大数据·后端·apache hive
武子康2 天前
大数据-237 离线数仓 - Hive 广告业务实战:ODS→DWD 事件解析、广告明细与转化分析落地
大数据·后端·apache hive
大大大大晴天2 天前
Flink生产问题排障-Kryo serializer scala extensions are not available
大数据·flink
Elasticsearch3 天前
如何使用 Agent Builder 排查 Kubernetes Pod 重启和 OOMKilled 事件
elasticsearch
Elasticsearch4 天前
通用表达式语言 ( CEL ): CEL 输入如何改进 Elastic Agent 集成中的数据收集
elasticsearch
武子康4 天前
大数据-236 离线数仓 - 会员指标验证、DataX 导出与广告业务 ODS/DWD/ADS 全流程
大数据·后端·apache hive