ES数据备份找了一些方法,发现elasticdump 这个工具不错

elasticdump --input=http://192.168.0.92:9200/hs2840 --output ./hs2840_data_201905.json --type=data

type:可以导出数据或者mapping

Examples:

# Copy an index from production to staging with mappings:
elasticdump \
--input=http://production.es.com:9200/my_index \
--output=http://staging.es.com:9200/my_index \
--type=mapping
elasticdump \
--input=http://production.es.com:9200/my_index \
--output=http://staging.es.com:9200/my_index \
--type=data

# Backup index data to a file:
elasticdump \
--input=http://production.es.com:9200/my_index \
--output=/data/my_index_mapping.json \
--type=mapping
elasticdump \
--input=http://production.es.com:9200/my_index \
--output=/data/my_index.json \
--type=data

# Backup and index to a gzip using stdout:
elasticdump \
--input=http://production.es.com:9200/my_index \
--output=$ \
| gzip > /data/my_index.json.gz

# Backup the results of a query to a file
elasticdump \
--input=http://production.es.com:9200/my_index \
--output=query.json \
--searchBody '{"query":{"term":{"username": "admin"}}}'

elasticsearch 数据备份的更多相关文章

  1. elasticsearch数据备份还原

    elasticsearch数据备份还原 1.在浏览器中运行http://XXX.XXX.XXX.XXX:9200/_flush,确保索引数据能保存到硬盘中. 2.原数据的备份.主要是elasticse ...

  2. elasticsearch数据备份与sshfs建立共享文件

    1.背景: 最近公司为了适应业务的发展,利用elasticsearch搜索引擎搭建了两个节点.为了防止数据丢失的特殊情况,需要定时做数据备份,而由于elasticsearch为两个节点分别在不同的服务 ...

  3. ElasticSearch 集群 & 数据备份 & 优化

    ElasticSearch 集群相关概念 ES 集群颜色状态 ①. - 红色:数据都不完整 ②. - 黄色:数据完整,但是副本有问题 ③. - 绿色:数据和副本全都没有问题 ES 集群节点类型 ①. ...

  4. 【原创】MapReduce备份Elasticsearch数据到HDFS(JAVA)

    一.环境:JAVA8,Elasticsearch-5.6.2,Hadoop-2.8.1二.实现功能:mapreduce读elasticsearch数据.输出parquet文件.多输出路径三.主要依赖 ...

  5. Elasticsearch snapshot 备份的使用方法 【备忘】

    常见的数据库都会提供备份的机制,以解决在数据库无法使用的情况下,可以开启新的实例,然后通过备份来恢复数据减少损失.虽然 Elasticsearch 有良好的容灾性,但由于以下原因,其依然需要备份机制. ...

  6. 【ELK】Elasticsearch的备份和恢复

    非原创,只是留作自己查询使用,转自http://keenwon.com/1393.html Elasticsearch的备份和恢复 备份 Elasticsearch的一大特点就是使用简单,api也比较 ...

  7. 大数据学习[16]--使用scroll实现Elasticsearch数据遍历和深度分页[转]

    题目:使用scroll实现Elasticsearch数据遍历和深度分页 作者:星爷 出处: http://lxWei.github.io/posts/%E4%BD%BF%E7%94%A8scroll% ...

  8. 数据备份的OSS接口

    最近在做一个新的项目,从RDS备份到OSS,进行数据备份以及后续的还原.这边对阿里云的OSS数据上传接口进行说明,先做下笔记先简单介绍下OSS: ①Object 在OSS中,用户操作的基本数据单元是O ...

  9. 两种适用于中小量数据的mysql数据备份

    近来项目的业务量开始大了,感觉如果数据不周期性地备份一下,很可能会出现问题,虽然我每天都有阿里云的自动快照,上网找了一下方法,找到两种相对简单而又适合中小项目或者中小公司的数据备份策略,以下都是数据库 ...

随机推荐

  1. python基础--字符串、元组

    字符串方法 注:字符串和元组一样都是不可变的,以下函数不会改变原来字符串的值,可以将其赋给一个新的变量 st='a b c d,f,g' st_list=st.split()#字符串分割,参数不写,按 ...

  2. 插件之一:Epplus

    从策划配置文件导入项目实际使用,为提高效率总会使用一些转换工具,据同事介绍Epplus更强大一些,我自己试了下,发现api非常全面且强大.记录下所学. 一.插件来源 https://github.co ...

  3. vue知识点积累

    vue中 列表组件写key,起作用是什么? <ul> <li v-for="item in items" :key="item.id"> ...

  4. 实现base标签中有绝对路径

    1.首先在jsp页面中写一段神奇的JAVA代码 <% String path = request.getContextPath(); String basePath = request.getS ...

  5. .Net WebApi接口之Swagger集成详解

    本文详细的介绍了.net从一个新的项目中创建api后集成swagger调试接口的流程! 1.首先我们创建一个MVC项目(VS2012): 2.然后在项目中的Controllers文件夹中添加API接口 ...

  6. Kali基础

    1.Kali Linux 2.0 发布下载,基于 Debian 的 Linux 发行版  http://www.linuxidc.com/Linux/2015-08/121549.htm 2. Kal ...

  7. python的u,r,b分别什么意思?

      我们经常在python当中看到以下内容: print(u'hi\thi\thi') print(b'hi\thi\thi') print(r'hi\thi\thi') 在其他语言里没见过类似的,所 ...

  8. Python基础总结之第十天开始【认识模块、包和库】(新手可相互督促)

    每天都有一种备课的赶脚~~~ 什么是模块? 在实际的开发过程中,代码量肯定有成千上万行的代码,甚至十几万行代码也很正常吧... 那么这么多的代码如果放在一个文件中,肯定是很不合适的,为了以后程序的编写 ...

  9. url-pattern / 与/* 的区别

    其中/和/*的区别:< url-pattern>/</url-pattern> 会匹配到/login这样的路径型url 不会匹配到模式为*.jsp这样的后缀型url,即:*.j ...

  10. CentOS7下使用Harbor搭建Docker私有仓库

    相关资料: Harbor官方网站:https://goharbor.io/ Harbor Github地址:https://github.com/goharbor/harbor ⒈安装Docker(必 ...