zoukankan      html  css  js  c++  java
  • ELK elasticsearch数据迁移

    因elasticsearch 集群中有需要需迁移,从A集环境迁移到B集群中,数据量不小。

    网上搜索找到几种方案,试了下这种。

    0.安装nodejs(如果已安装请忽略)
    执行

    yum install -y nodejs

    1.升级nodejs
    执行

    npm install -g n
    n latest

    2.安装elasticdump工具
    执行

    npm install elasticdump -g

    3.迁移指定索引的settings,mapping,data
    执行索引复制

    索引名称
    my_video_index

    复制到

    依次复制 :设置settings,映射mapping,数据data

    其中地址信息

    http://elastic:elastic@192.168.89.181:9200/my_video_index

    http://用户名:密码@IP地址:端口/索引
    复制到
    http://elastic:elastic@192.168.89.180:9202/my_video_index_dump
    elasticdump --input=http://elastic:elastic@192.168.89.181:9200/my_video_index --output=http://elastic:elastic@192.168.89.180:9202/my_video_index_dump --type=settings
    elasticdump --input=http://elastic:elastic@192.168.89.181:9200/my_video_index --output=http://elastic:elastic@192.168.89.180:9202/my_video_index_dump --type=mapping
    elasticdump --input=http://elastic:elastic@192.168.89.181:9200/my_video_index --output=http://elastic:elastic@192.168.89.180:9202/my_video_index_dump --type=data

    执行完成后。

    通过kibana查询到_dump的信息

  • 相关阅读:
    Python使用asyncio+aiohttp异步爬取猫眼电影专业版
    Django
    Django
    Vue 1-- ES6 快速入门、vue的基本语法、vue应用示例,vue基础语法
    Django
    Django
    Django
    Django
    django--权限(1)初识
    Django
  • 原文地址:https://www.cnblogs.com/a393060727/p/13207419.html
Copyright © 2011-2022 走看看