elasticdump
elasticdump备份elasticsearch里面的某个索引数据
1、 安装环境
需要node、npm、yarn
# 去官方下载最新版本的nodejs
#wget https://nodejs.org/dist/v6.10.2/node-v6.10.2-linux-x64.tar.xz --no-check-certificate
# npm install –g yarn
# yarn install –g elasticdump
2、 备份操作
!备份到文件:
# elasticdump --input=http://192.168.1.11:9200/userlog --output=/data/userlog.json --type=data
!备份到另外的索引
# elasticdump --input=http://192.168.1.11:9200/userlog --output=http://192.168.1.11:9200/userlognew --type=data
3、 恢复索引
# elasticdump --input=/data/userlog.json --output=http://192.168.1.11:9200/userlog --type=data
以下摘自https://www.npmjs.com/package/elasticdump
# Copy an index from production to staging with analyzer and mapping:
elasticdump \
--input=http://production.es.com:9200/my_index \
--output=http://staging.es.com:9200/my_index \
--type=analyzer
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"}}}'
Docker install
# docker pull taskrabbit/elasticsearch-dump
#docker run --rm -ti taskrabbit/elasticsearch-dump
you'll need to mount your file storage dir-v <your dumps dir>:<your mount point>to your docker container:挂载存储目录,存储备份数据
elasticdump的更多相关文章
- elasticdump 方法迁移数据
elasticdump -rm -ti taskrabbit/elasticsearch-dump --ignore-errors=true --offset=1000 --input=http:/ ...
- Elasticsearch数据迁移工具elasticdump工具
1. 工具安装 wget https://nodejs.org/dist/v8.11.2/node-v8.11.2-linux-x64.tar.xz tar xf node-v8.11.2-linux ...
- ELK之elasticdump迁移es数据
参考:https://www.cnblogs.com/resn/p/9082663.html elasticsearch部分查询语句 获取集群节点列表 curl "172.16.30.55: ...
- Elasticsearch的数据导出和导入操作(elasticdump工具),以及删除指定type的数据(delete-by-query插件)
Elasticseach目前作为查询搜索平台,的确非常实用方便.我们今天在这里要讨论的是如何做数据备份和type删除.我的ES的版本是2.4.1. ES的备份,可不像MySQL的mysqldump这么 ...
- elasticsearch-dump 迁移es数据 (elasticdump)
elasticsearch 部分查询语句 # 获取集群的节点列表: curl 'localhost:9200/_cat/nodes?v' # 列出所有索引: curl 'localhost:9200/ ...
- elasticsearch数据转移,elasticdump的安装使用
模拟: 将本地的my_index的products的一条document转移到http://192.168.111.130的一个es服务器上. (一)安装elasticdump 先安装node.js, ...
- elasticsearch将数据导出json文件【使用elasticdump】
1.前提准备 需要使用npm安装,还未安装的朋友可以阅读另一篇我的博客<安装使用npm>,windows环境. 2.安装es-dump 打开终端窗口PowerShell或者cmd. 输入命 ...
- 使用elasticdump导入导出数据
一.安装elasticdump 终端中输入 npm install elasticdump -g -g表示全局可用,直接在终端输入 elasticdump --version,出现版本信息即表示安装成 ...
- elasticDump的安装使用
官方地址:官方地址:https://github.com/taskrabbit/elasticsearch-dump 安装方式如下:安装NodeJS下载源码:wget http://nodejs.or ...
随机推荐
- [笔记]学习EBS建议有的知识
http://f.dataguru.cn/thread-51057-1-1.html ORACLE EBS学习的其他资源有哪四个? ORACLE OPEN WORLD大会是不是一个市场营销活动? Or ...
- Python学习-20.Python的Urllib模块
除了 Http 模块可以模拟 Http 请求外,使用 Urllib 模块也是可以模拟 Http 请求的,只不过功能相对弱一点. import urllib.request opener = urlli ...
- HLSL-高级着色语言简介【转】
HLSL-High Level Shader Language 优点 用来书写Vertex Shader和Pixel Shader程序的代码,语法类似于C/C++,在DirectX 8.x的时代,Sh ...
- ruby,gem,rails之间的关系
Q:ruby,gem,rails之间的关系? 简单点说:Ruby是一种脚本语言,Gem是基于Ruby的一些开发工具包,Rails也算是一组Gem,专门用来做网站的.不同的Gem可能会依赖不同的Ruby ...
- C#之数据类型学习
C#有以下几种数据类型: 数据类型案例以及取值范围: 界面: 选择int时: 选中long时: 选中float时: 选中double时: 选中decimal时: 选中string时: 选中char时: ...
- Openlayers地图量算功能
http://openlayers.org/en/latest/examples/measure.html?q=measure 按官网的例子来就行,新建对象时注意加上命名空间 var vect ...
- sp2010 升级sp2013 用户无法打开网站
Add-PSSnapin microsoft.sharepoint.powershell $WebAppName = "http://wtcsps99:82/" $wa = get ...
- iis部署 .net core webapi
iis部署 .net core webapi 1.修改应用程序池: IIS 发布站点,这里就不介绍 IIS 安装等.这里要修改的是应用程序池,选择“无托管代码”: 2.下载安装.net core托管捆 ...
- AI贪吃蛇前瞻——基于Dijkstra算法的最短路径问题
在贪吃蛇流程结构优化之后,我又不满足于亲自操刀控制这条蠢蠢的蛇,干脆就让它升级成AI,我来看程序自己玩,哈哈. 一.Dijkstra算法原理 作为一种广为人知的单源最短路径算法,Dijkstra用于求 ...
- Redis安装步骤 - linux系统下
https://blog.csdn.net/lzj3462144/article/details/70973368 https://www.cnblogs.com/pyyu/p/9467279.htm ...