# How to reindex data from 5 to six to upgrade ES to 7

**URL:** <https://discuss.elastic.co/t/how-to-reindex-data-from-5-to-six-to-upgrade-es-to-7/303386>\
**Category:** Elasticsearch\
**Tags:** reindex\
**Created:** [April 27, 2022, 10:05am UTC](https://discuss.elastic.co/t/how-to-reindex-data-from-5-to-six-to-upgrade-es-to-7/303386 "2022-04-27T10:05:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sameer\_khamkar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sameer_khamkar/32/104910_2.png) [@sameer\_khamkar](https://discuss.elastic.co/u/sameer_khamkar)\
**Post date:** [April 27, 2022, 10:05am UTC](https://discuss.elastic.co/t/how-to-reindex-data-from-5-to-six-to-upgrade-es-to-7/303386/1 "2022-04-27T10:05:09Z")

</div>

I want to do reindex data which is created in version 5 to version 6 so that we can upgrade ES to version 7

so we are following below

curl 'localhost:9200/\_cat/indices?v' -- list all  
curl -X PUT "localhost:9200/my\_index\_block/write?pretty" -- to allow clone  
curl -X POST "localhost:9200/my\_index/\_clone/cloned-my\_index?pretty" --- clone old index

then I tried below  
curl -X POST "localhost:9200/\_reindex?pretty" -H 'Content-Type: application/json' -d'

```auto
{
  "source": {
    "index": "my_index"
  },
  "dest": {
    "index": "cloned-my_index"
  }
}
'
but it gave below error 
{
  "took" : 159,
  "timed_out" : false,
  "total" : 9495,
  "updated" : 0,
  "created" : 0,
  "deleted" : 0,
  "batches" : 1,
  "version_conflicts" : 0,
  "noops" : 0,
  "retries" : {
    "bulk" : 0,
    "search" : 0
  },
  "throttled_millis" : 0,
  "requests_per_second" : -1.0,
  "throttled_until_millis" : 0,
  "failures" : [
    {
      "index" : "cloned-my_index",
      "type" : "_doc",
      "id" : "a3f73570-73a8-11ec-a9f3-0a58ac1134f5",
      "cause" : {
        "type" : "cluster_block_exception",
        "reason" : "index [cloned-my_index] blocked by: [FORBIDDEN/8/index write (api)];"
      },
      "status" : 403
    },

```

can someone help me with steps how I can reindex data from 5 to 6 ,

also I am not sure data in 5 has multiple indexes whereas data in 6 has only single index of that,

also can what does it means  
mapping types in your index and elastic 7.0 doesn't supports doc type so you have to reconfigure your data accordingly ,such that type can be removed

Please help me here I am new to ES

Regards,  
SAM

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [April 28, 2022, 12:56am UTC](https://discuss.elastic.co/t/how-to-reindex-data-from-5-to-six-to-upgrade-es-to-7/303386/2 "2022-04-28T00:56:18Z")

</div>

> [@sameer\_khamkar](#):
>
> curl -X PUT "localhost:9200/my\_index\_block/write?pretty" -- to allow clone

Did you mean `/my_index/_block/write?pretty`? If you do, that sets the index to read only - [Index blocks | Elasticsearch Guide [8.1] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/8.1/index-modules-blocks.html), which I am not sure you want.

---

<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:** [May 26, 2022, 12:56am UTC](https://discuss.elastic.co/t/how-to-reindex-data-from-5-to-six-to-upgrade-es-to-7/303386/3 "2022-05-26T00:56:53Z")

</div>

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