Can I use rsync tool to migrate closed index on a running elasticsearch cluster?

I have many closed indices to migrate.But I do not want to open them,then use node tag attribute to migrate them dynamicly.

[root@test ~]# curl -s 'localhost:9200/my_index/_settings?pretty'
{
  "my_index" : {
    "settings" : {
      "index" : {
        "routing" : {
          "allocation" : {
            "require" : {
              "tag" : "new"
            }
          }
        },
        "number_of_shards" : "8",
        "provided_name" : "my_index",
        "creation_date" : "1554289841101",
        "number_of_replicas" : "0",
        "uuid" : "h-czpwf0S9y5re8XYWHWtA",
        "version" : {
          "created" : "6030299"
        }
      }
    }
  }
}

I can get the uuid of the closed index by above command,and I found the 8 shards are staying several old es nodes.

Can i directly rsync the /path.data/nodes/0/indices/h-czpwf0S9y5re8XYWHWtA/ files to the same directory on the new es nodes(it looks like forcing to rebalance the shards )?

I know this operation will make the shards meta data missing.But is it possiblely to use the moved file recovery directly?

No. Moving things around within the data folder is completely unsupported and risks data loss.

It's you too. Handsome David.

Got it ,I have more than 200TB data(exclude replications) to migrate.But can not stop the cluster. So the only way is using the tag attribute to migrate....

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.