# How to move data from cold to warm tier

**URL:** https://discuss.elastic.co/t/how-to-move-data-from-cold-to-warm-tier/311767
**Category:** Elasticsearch
**Created:** [August 9, 2022, 5:57pm UTC](https://discuss.elastic.co/t/how-to-move-data-from-cold-to-warm-tier/311767 "2022-08-09T17:57:31Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![INS](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ins/32/92827_2.png) [@INS](https://discuss.elastic.co/u/INS)
#### Post date: [August 9, 2022, 5:57pm UTC](https://discuss.elastic.co/t/how-to-move-data-from-cold-to-warm-tier/311767/1 "2022-08-09T17:57:31Z")

</div>

Hi  
I need to remove cold data tiers, then in this action I thought about shifting data tier from cold to warm? How I can handle such case?

---

<div class="post-metadata">

### Author: ![INS](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ins/32/92827_2.png) [@INS](https://discuss.elastic.co/u/INS)
#### Post date: [August 9, 2022, 6:25pm UTC](https://discuss.elastic.co/t/how-to-move-data-from-cold-to-warm-tier/311767/2 "2022-08-09T18:25:25Z")

</div>

is the only one way to re-locate such data index ? when I need to remove data cold?

change from:

```auto
{
...
    "routing": {
        "allocation": {
            "include": {
                "_tier_preference": "data_cold,data_warm,data_hot"
            }
        }
    }
...
}

```

```auto
PUT /my-index/_settings
{
    "routing": {
      "allocation": {
        "include": {
            "_tier_preference": "data_warm,data_hot"
        }
      }
    }
}

```

---

<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: [August 9, 2022, 11:39pm UTC](https://discuss.elastic.co/t/how-to-move-data-from-cold-to-warm-tier/311767/3 "2022-08-09T23:39:22Z")

</div>

Yep, that should work.

---

<div class="post-metadata">

### Author: ![INS](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ins/32/92827_2.png) [@INS](https://discuss.elastic.co/u/INS)
#### Post date: [August 10, 2022, 9:44am UTC](https://discuss.elastic.co/t/how-to-move-data-from-cold-to-warm-tier/311767/4 "2022-08-10T09:44:28Z")

</div>

and after that I need to reroute that index for relocate?

---

<div class="post-metadata">

### Author: ![INS](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ins/32/92827_2.png) [@INS](https://discuss.elastic.co/u/INS)
#### Post date: [August 10, 2022, 10:42am UTC](https://discuss.elastic.co/t/how-to-move-data-from-cold-to-warm-tier/311767/5 "2022-08-10T10:42:00Z")

</div>

then I've also triggered

```auto
PUT my-index*/_settings
{
  "index.routing.allocation.require.data": "warm"
}

```

but when I'm checking through dev tool

`GET /_cat/recovery?active_only=true`

It doesn't work as I expected?

---

<div class="post-metadata">

### Author: ![INS](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ins/32/92827_2.png) [@INS](https://discuss.elastic.co/u/INS)
#### Post date: [August 10, 2022, 12:00pm UTC](https://discuss.elastic.co/t/how-to-move-data-from-cold-to-warm-tier/311767/6 "2022-08-10T12:00:45Z")

</div>

for example this index exists on data cold tier

```auto
{
  "logstash-data-2022.05.14" : {
    "settings" : {
      "index" : {
        "lifecycle" : {
          "name" : "data_policy"
        },
        "routing" : {
          "allocation" : {
            "include" : {
              "_tier_preference" : "data_warm,data_hot"
            },
            "require" : {
              "data" : "warm"
            }
          }
        },
        "refresh_interval" : "15s",
        "number_of_shards" : "15",
        "translog" : {
          "sync_interval" : "15s",
          "durability" : "async"
        },
        "provided_name" : "logstash-hss40-2022.05.14",
        "creation_date" : "1652486556519",
        "priority" : "0",
        "number_of_replicas" : "0",
        "uuid" : "WtbatoheRgm85R8Ax0hvvg",
        "version" : {
          "created" : "8010099"
        }
      }
    }
  }
}

```

---

<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: [August 12, 2022, 1:43am UTC](https://discuss.elastic.co/t/how-to-move-data-from-cold-to-warm-tier/311767/7 "2022-08-12T01:43:11Z")

</div>

> [@INS](#):
>
> `"_tier_preference" : "data_warm,data_hot"`

Are you sure `warm` is right and not `data_warm`?

---

<div class="post-metadata">

### Author: ![INS](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ins/32/92827_2.png) [@INS](https://discuss.elastic.co/u/INS)
#### Post date: [August 12, 2022, 6:35am UTC](https://discuss.elastic.co/t/how-to-move-data-from-cold-to-warm-tier/311767/8 "2022-08-12T06:35:22Z")

</div>

You can check [Implementing Hot-Warm-Cold in Elasticsearch with Index Lifecycle Management | Elastic Blog](https://www.elastic.co/blog/implementing-hot-warm-cold-in-elasticsearch-with-index-lifecycle-management)

In this request I’m referring to tier so “warm” “hot” “cold” should be right

---

<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: [September 9, 2022, 6:35am UTC](https://discuss.elastic.co/t/how-to-move-data-from-cold-to-warm-tier/311767/9 "2022-09-09T06:35:44Z")

</div>

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