# How to copy indices from one cluster to other with settings

**URL:** https://discuss.elastic.co/t/how-to-copy-indices-from-one-cluster-to-other-with-settings/155778
**Category:** Elasticsearch
**Created:** [November 7, 2018, 7:12pm UTC](https://discuss.elastic.co/t/how-to-copy-indices-from-one-cluster-to-other-with-settings/155778 "2018-11-07T19:12:06Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![elk11](https://avatars.discourse-cdn.com/v4/letter/e/45deac/32.png) [@elk11](https://discuss.elastic.co/u/elk11)
#### Post date: [November 7, 2018, 7:12pm UTC](https://discuss.elastic.co/t/how-to-copy-indices-from-one-cluster-to-other-with-settings/155778/1 "2018-11-07T19:12:06Z")

</div>

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`\_reindex`action, 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.

---

<div class="post-metadata">

### Author: ![elk11](https://avatars.discourse-cdn.com/v4/letter/e/45deac/32.png) [@elk11](https://discuss.elastic.co/u/elk11)
#### Post date: [November 7, 2018, 7:13pm UTC](https://discuss.elastic.co/t/how-to-copy-indices-from-one-cluster-to-other-with-settings/155778/2 "2018-11-07T19:13:10Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [November 7, 2018, 7:31pm UTC](https://discuss.elastic.co/t/how-to-copy-indices-from-one-cluster-to-other-with-settings/155778/3 "2018-11-07T19:31:53Z")

</div>

This sounds like a good use case for [snapshot and restore](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/modules-snapshots.html#_snapshot). You may also be able to reindex into a new index with updated mappings locally and then use an alias to switch.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [December 5, 2018, 7:31pm UTC](https://discuss.elastic.co/t/how-to-copy-indices-from-one-cluster-to-other-with-settings/155778/4 "2018-12-05T19:31:59Z")

</div>

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