Elasticsearch必备技能之索引迁移
将ES中的索引拷贝到其他ES中,是不是很重要呢?
长话短说,推荐一个工具:
一、elasticsearch-dump
安装:
#yum install epel-release
#yum install nodejs
#yum install npm
#npm install elasticdump
#cd node_modules/elasticdump/bin
# pwd
/home/tp/node_modules/elasticdump
# ls -al
total 388
drwxr-xr-x 2 root root 4096 Mar 21 15:46 bin
-rw-r--r-- 1 root root 174 Mar 18 2016 Dockerfile
-rw-r--r-- 1 root root 299251 Mar 15 2014 elasticdump.jpg
-rw-r--r-- 1 root root 6172 Feb 2 23:47 elasticdump.js
drwxr-xr-x 2 root root 4096 Jul 13 2016 .github
drwxr-xr-x 3 root root 4096 Mar 21 15:46 lib
-rw-r--r-- 1 root root 11356 May 22 2014 LICENSE.txt
drwxr-xr-x 10 root root 4096 Mar 21 15:46 node_modules
-rw-r--r-- 1 root root 44 May 22 2014 .npmignore
-rw-r--r-- 1 root root 15135 Mar 21 15:46 package.json
-rw-r--r-- 1 root root 13335 Dec 14 06:20 README.md
drwxr-xr-x 3 root root 4096 Mar 21 15:46 test
-rw-r--r-- 1 root root 1150 Dec 2 07:54 .travis.yml
使用:
#拷贝analyzer如分词
elasticdump \
--input=http://production.es.com:9200/old_index \
--output=http://staging.es.com:9200/new_index \
--type=analyzer
#拷贝映射
elasticdump \
--input=http://production.es.com:9200/old_index \
--output=http://staging.es.com:9200/new_index \
--type=mapping
#拷贝数据
elasticdump \
--input=http://production.es.com:9200/lod_index \
--output=http://staging.es.com:9200/new_index \
--type=data
OK ! 迁移成功。
推荐阅读:
Elasticsearch必备技能之索引迁移的更多相关文章
- 自动化部署必备技能—部署yum仓库、定制rpm包
部署yum仓库.定制rpm包 目录 第1章 扩展 - yum缓存 1.1 yum缓存使用步骤... 1 1.1.1 导言... 1 1.1.2 修改配置文件... 1 1.1.3 使用缓存... 1 ...
- Android高工必备技能
转载:http://www.jianshu.com/p/d791bbede02c Step 1. 玩转RxJava 使用RxJava处理异步极其方便,各种操作符可以对数据做流水线式操作,再加上与Ret ...
- 详解linux运维工程师入门级必备技能
详解linux运维工程师入门级必备技能 | 浏览:659 | 更新:2013-12-24 23:23 | 标签:linux it自动化运维就是要很方便的运用各种工具进行管理维护,有效的实施服务器保护 ...
- 【转帖】系统软件工程师必备技能-进程内存的working set size(WSS)测量
系统软件工程师必备技能-进程内存的working set size(WSS)测量 2018年12月28日 18:43:01 Linuxer_ 阅读数:145 https://blog.csdn.net ...
- SQL Server管理员必备技能之性能优化
SQL Server管理员必备技能之性能优化 高文龙关注1人评论1171人阅读2017-09-22 08:27:41 SQL Server 作为企业必不可少的服务之一,所以对于管理员的日常运维是一个极 ...
- Mysql 索引迁移策略
Mysql 索引迁移策略 近日在核查项目中的一些慢sql时发现一个很鸡仔儿的问题,本地开发库表中索引跟生产上差距很大,又因为生产库登录各种麻烦,需要各种验证码,那么多的慢sql分给好些个人,不可能让大 ...
- 高级Linux运维工程师必备技能(扫盲篇)
高级Linux运维工程师必备技能(扫盲篇) 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 在了解文件系统之前,我们要学习一下磁盘存储数据的方式,大家都知道文件从内存若要持久化存储的 ...
- 百度Hr分享,一个合格的数据工程师简历中必备技能?
如果你是一名数据科学方面的求职者,你肯定想知道在简历上写些什么才能获得面试的机会:如果你想进入这个领域,你一定想知道具备哪些技术才能成为一名有竞争力的求职者. 在本文中,我们对Indeed中一千份数据 ...
- 第三百六十二节,Python分布式爬虫打造搜索引擎Scrapy精讲—elasticsearch(搜索引擎)基本的索引和文档CRUD操作、增、删、改、查
第三百六十二节,Python分布式爬虫打造搜索引擎Scrapy精讲—elasticsearch(搜索引擎)基本的索引和文档CRUD操作.增.删.改.查 elasticsearch(搜索引擎)基本的索引 ...
随机推荐
- Document APIs
本节首先简要介绍Elasticsearch的数据复制模型,然后详细描述以下CRUD API: Single document APIs Index API Get API Delete API Upd ...
- Mybatis Mapper文件中的一小坑
前几天来一需求,实现过程中需要修改一个底层的查询接口,具体修改就是在where中添加一个条件,由于这个底层SQL使用的地方太多,所以就想着是用if加一标识符做个判断,传一个只有我会使用的参数,然后动态 ...
- node.js搭建Web服务器
Node.js 博客搭建 一. 学习需求 Node 的安装运行 会安装node,搭建node环境 会运行node. 基础模块的使用 Buffer:二进制数据处理模块 Event:事件模块 fs:文件系 ...
- 微服务架构-选择Spring Cloud,放弃Dubbo
Spring Cloud 在国内中小型公司能用起来吗?从 2016 年初一直到现在,我们在这条路上已经走了一年多. 在使用 Spring Cloud 之前,我们对微服务实践是没有太多的体会和经验的.从 ...
- [Swift]LeetCode90. 子集 II | Subsets II
Given a collection of integers that might contain duplicates, nums, return all possible subsets (the ...
- [Swift]LeetCode211. 添加与搜索单词 - 数据结构设计 | Add and Search Word - Data structure design
Design a data structure that supports the following two operations: void addWord(word) bool search(w ...
- [Swift]LeetCode374. 猜数字大小 | Guess Number Higher or Lower
We are playing the Guess Game. The game is as follows: I pick a number from 1 to n. You have to gues ...
- [Swift]LeetCode409. 最长回文串 | Longest Palindrome
Given a string which consists of lowercase or uppercase letters, find the length of the longest pali ...
- [Swift]LeetCode719. 找出第 k 小的距离对 | Find K-th Smallest Pair Distance
Given an integer array, return the k-th smallest distance among all the pairs. The distance of a pai ...
- Spark MLlib
MLlib 数据挖掘与机器学习 数据挖掘体系 数据挖掘:也就是data mining,是一个很宽泛的概念,也是一个新兴学科,旨在如何从海量数据中挖掘出有用的信息来. ...