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
相关推荐
Francek Chen16 分钟前
【大数据存储与管理】NoSQL数据库:01 NoSQL简介
大数据·数据库·分布式·nosql
Henb92917 分钟前
# 云原生大数据平台搭建
大数据·云原生
Project_Observer32 分钟前
为您的项目选择最合适的Zoho Projects自动化巧能
大数据·运维·人工智能·深度学习·机器学习·自动化·编辑器
RD_daoyi1 小时前
新手小白独立站运营实操手册:从0到1跑通流量-转化-留存闭环
搜索引擎
IT观测1 小时前
选高低温环境试验箱,品牌、生产商、厂家哪个维度更可靠?
大数据·人工智能
isNotNullX1 小时前
BI如何落地?BI平台如何搭建?
大数据·数据库·人工智能
k8s容器运维大佬1 小时前
‌原油拉升、黄金白银走低,通常利好能源与工业板块,利空贵金属与部分成长型科技股‌。
大数据·人工智能
talen_hx2962 小时前
《零基础入门Spark》学习笔记 Day 14
大数据·笔记·学习·spark
老纪的技术唠嗑局2 小时前
告别OpenClaw配置丢失——Mindkeeper内测版邀测
大数据·elasticsearch·搜索引擎