从远程 Elasticsearch 集群重建索引 - 7.2

Talend ESB 迁移指南

EnrichVersion
7.2
EnrichProdName
Talend ESB
task
数据治理
EnrichPlatform
Talend Activity Monitoring Console
Talend Administration Center
Talend Artifact Repository
Talend CommandLine
Talend Data Preparation
Talend Data Stewardship
Talend ESB
Talend Identity and Access Management
Talend Log Server
Talend Runtime
Talend Studio
您需要为您的 Logstash 和 Talend ESB 索引重建索引。

过程

  1. 运行以下命令查看所有现有的索引:
    curl -XGET 'oldhost9200/_cat/indices'
    oldhost 替换为在 7.1.x 中使用的 Elasticsearch 集群的 IP 地址或主机名。
  2. 从远程集群为您的 Logstash 索引重建索引,以便将文档从 7.1.x 中使用的索引转换为 7.2.x 中使用的索引:
    curl -XPOST 'localhost:9200/_reindex?pretty' -H 'Content-Type: application/json' -d'
    {
      "source": {
        "remote": {
          "host": "http://oldhost:9200"
        },
        "index": "logstash-YYYY.MM.dd"
      },
      "dest": {
        "index": "logstash-YYYY.MM.dd"
      }
    }
    '
  3. 从远程集群为您的 Talend ESB 索引重建索引,以便将文档从 6.5.x 中使用的索引转换为 7.2.x 中使用的索引:
    curl -XPOST 'localhost:9200/_reindex?pretty' -H 'Content-Type: application/json' -d'
    {
      "source": {
        "remote": {
          "host": "http://oldhost:9200"
        },
        "index": "talendesb-YYYY.MM.dd"
      },
      "dest": {
        "index": "talendesb-YYYY.MM.dd"
      }
    }
    '
    注:

    您必须逐一迁移所有 logstash-YYYY.MM.ddtalendesb-YYYY.MM.dd 索引,或仅选择您想要迁移的索引。

    "failures" : [
    {
    "index" : "logstash-*",
    "type" : "xxxxxxxx",
    "id" : "xxxxxxxxxxxxxx",
    "cause" : {
    "type" : "invalid_index_name_exception",
    "reason" : "Invalid index name [logstash-*], must not contain the following characters [ , \", *, \\, <, |, ,, >, /, ?]",
    "index_uuid" : "_na_",
    "index" : "logstash-*"
    },
    "status" : 400
    },
    {
    "index" : "logstash-*",
    "type" : "xxxxxx",
    "id" : "xxxxxxxxxxxxxxx",
    "cause" : {
    "type" : "invalid_index_name_exception",
    "reason" : "Invalid index name [logstash-*], must not contain the following characters [ , \", *, \\, <, |, ,, >, /, ?]",
    "index_uuid" : "_na_",
    "index" : "logstash-*"
    },
    "status" : 400
    }
    ]