How to copy indices from one cluster to other with settings

Hi,

I want to copy indices (with settings and everything related to that index) from one cluster to other.

But according to reindex documentation:
" Reindex does not attempt to set up the destination index. It does not copy the settings of the source index. You should set up the destination index prior to running a_reindexaction, including setting up mappings, shard counts, replicas, etc."

So how do i do that? My indices have number of fields greater than default value 1000.
So I'm getting below error while reindexing:

"cause" : {
        "type" : "illegal_argument_exception",
        "reason" : "Limit of total fields [1000] in index [my-index] has been exceeded"
      },
      "status" : 400

And i cannot create and copy settings manually for each index as there are around 100 indices to be copied.

I'm doing this to fix mapping conflicts in my indices. So copying them to different elk instance with settings and then copying back to the original instance with new mapping.

This sounds like a good use case for snapshot and restore. You may also be able to reindex into a new index with updated mappings locally and then use an alias to switch.

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