# Data tiers, searcheable snapshots and the frozen tier

**URL:** <https://discuss.elastic.co/t/data-tiers-searcheable-snapshots-and-the-frozen-tier/285928>\
**Category:** Elasticsearch\
**Tags:** slm-snapshot-lifecycle-management, snapshot-and-restore, frozen-indices\
**Created:** [October 5, 2021, 1:41pm UTC](https://discuss.elastic.co/t/data-tiers-searcheable-snapshots-and-the-frozen-tier/285928 "2021-10-05T13:41:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ffknob](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ffknob/32/37008_2.png) [@ffknob](https://discuss.elastic.co/u/ffknob)\
**Post date:** [October 5, 2021, 1:41pm UTC](https://discuss.elastic.co/t/data-tiers-searcheable-snapshots-and-the-frozen-tier/285928/1 "2021-10-05T13:41:00Z")

</div>

Hello

I need some help figuring out data tiers, searcheable snapshots and the frozen tier.

Consider this:

```auto
GET _cat/nodes?v&h=name,node.role&s=name

name node.role
es01 hms
es02 mw
es03 cm
es04 fm

```

```auto
POST _snapshot/orders_snapshots_repository/orders-2020/_mount?wait_for_completion=true
{
  "index": "orders-20201231", 
  "strorage": "shared_cache",
  "index_settings": { 
    "index.number_of_replicas": 0,
    "index.routing.allocation.include._tier_preference": "data_frozen"
  },
  "ignore_index_settings": ["index.refresh_interval"] 
}

{
  "error" : {
    "root_cause" : [
      {
        "type" : "illegal_argument_exception",
        "reason" : "[data_frozen] tier can only be used for partial searchable snapshots"
      }
    ],
    "type" : "illegal_argument_exception",
    "reason" : "[data_frozen] tier can only be used for partial searchable snapshots"
  },
  "status" : 400
}

```

Why am I getting this error? My goal here is to get this snapshot mounted in my data\_frozen tier (es04). If I take out the `index.routing.allocation.include._tier_preference` index setting the index gets mounted, but in my data\_cold tier (es03).

So, what am I missing?

Thank you for your help.

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [October 5, 2021, 1:55pm UTC](https://discuss.elastic.co/t/data-tiers-searcheable-snapshots-and-the-frozen-tier/285928/2 "2021-10-05T13:55:25Z")

</div>

For frozen you need to use a partially mounted snapshot you're not providing correct API call

> **[Searchable snapshots | Elasticsearch Guide \[7.15\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/searchable-snapshots.html#partially-mounted)**

> **[Mount snapshot API | Elasticsearch Guide \[7.15\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/searchable-snapshots-api-mount-snapshot.html)**

Per the API Add the URL query parameter

`storage=shared_cache`

---

<div class="post-metadata">

**Author:** ![ffknob](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ffknob/32/37008_2.png) [@ffknob](https://discuss.elastic.co/u/ffknob)\
**Post date:** [October 5, 2021, 1:55pm UTC](https://discuss.elastic.co/t/data-tiers-searcheable-snapshots-and-the-frozen-tier/285928/3 "2021-10-05T13:55:37Z")

</div>

Managed to get to work as intended by adding the followin index setting on mounting:

```auto
POST _snapshot/orders_snapshots_repository/orders-2020/_mount?wait_for_completion=true
{
  "index": "orders-20201231", 
  "strorage": "shared_cache",
  "index_settings": { 
    "index.number_of_replicas": 0,
    **"index.store.snapshot.partial": true,**
    "index.routing.allocation.include._tier_preference": "data_frozen"
  },
  "ignore_index_settings": ["index.refresh_interval"] 
}

```

I've also tried to use the `"partial": true` setting when creating the snapshot, but that didn't help.

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [October 5, 2021, 1:56pm UTC](https://discuss.elastic.co/t/data-tiers-searcheable-snapshots-and-the-frozen-tier/285928/4 "2021-10-05T13:56:36Z")

</div>

You don't specify partial as part of the snapshot process only the restore process.

---

<div class="post-metadata">

**Author:** ![ffknob](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ffknob/32/37008_2.png) [@ffknob](https://discuss.elastic.co/u/ffknob)\
**Post date:** [October 5, 2021, 2:01pm UTC](https://discuss.elastic.co/t/data-tiers-searcheable-snapshots-and-the-frozen-tier/285928/5 "2021-10-05T14:01:48Z")

</div>

Thank you @stephenb !

My first example had two main problems:

- a typo ("strorage").
- the "storage" is a query parameter, not a body parameter

So to get things working here is my final request (for future reference, if anyone makes similar mistakes)

```auto
POST _snapshot/orders_snapshots_repository/orders-2020/_mount?wait_for_completion=true&storage=shared_cache
{
  "index": "orders-20201231",
  "index_settings": { 
    "index.number_of_replicas": 0,
    "index.routing.allocation.include._tier_preference": "data_frozen"
  },
  "ignore_index_settings": ["index.refresh_interval"] 
}

```

Now I have what I expected:

```auto
GET _cat/shards/orders*?v&s=index&h=index,node

index node
***orders-20201231 es04***
orders-20210930 es03
orders-20211013 es02
orders-20211020 es01

```

Once again, thank you @stephenb !

---

<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:** [November 2, 2021, 2:02pm UTC](https://discuss.elastic.co/t/data-tiers-searcheable-snapshots-and-the-frozen-tier/285928/6 "2021-11-02T14:02:41Z")

</div>

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