首页 > 代码库 > ElasticSearch的备份迁移方案
ElasticSearch的备份迁移方案
使用插件repository-hdfs插件进行测试
下载地址:
https://oss.sonatype.org/content/repositories/snapshots/org/elasticsearch/elasticsearch-repository-hdfs/
https://oss.sonatype.org/content/repositories/snapshots/org/elasticsearch/elasticsearch-repository-hdfs/2.3.4.BUILD-SNAPSHOT/elasticsearch-repository-hdfs-2.3.4.BUILD-20160731.045929-24-hadoop2.zip
1、需要分发到各个节点,然后进行安装
bin/plugin install file:///home/dinpay/elasticsearch-repository-hdfs-2.3.4.BUILD-20160731.045929-24-hadoop2.zip
2、将hadoop的etc/hadoop 的hdfs-site.xml和core-site.xml复制到es的每个节点的config目录下(高可用需要的操作)
3、在elasticsearch.yml配置文件后加上
# 禁用jsm,使快照能保存于hdfs security.manager.enabled: false repositories.hdfs: uri: "hdfs://bi" path: "/es" load_defaults: "true" concurrent_streams: 5 conf_location: "core-site.xml,hdfs-site.xml" compress: "true" conf.dfs.client.read.shortcircuit: "true"
4、使用kopf插件
#kopf插件
bin/plugin install lmenezes/elasticsearch-kopf
#head插件
bin/plugin install mobz/elasticsearch-head
通过hadoop的文件操作实现迁移文件操作
ElasticSearch的备份迁移方案