# How to Restore snapshop from 5 node cluster to single node host?

**URL:** <https://discuss.elastic.co/t/how-to-restore-snapshop-from-5-node-cluster-to-single-node-host/255761>\
**Category:** Elasticsearch\
**Created:** [November 17, 2020, 9:07pm UTC](https://discuss.elastic.co/t/how-to-restore-snapshop-from-5-node-cluster-to-single-node-host/255761 "2020-11-17T21:07:50Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![elkdummy](https://avatars.discourse-cdn.com/v4/letter/e/838e76/32.png) [@elkdummy](https://discuss.elastic.co/u/elkdummy)\
**Post date:** [November 17, 2020, 9:07pm UTC](https://discuss.elastic.co/t/how-to-restore-snapshop-from-5-node-cluster-to-single-node-host/255761/1 "2020-11-17T21:07:50Z")

</div>

Hello all,

I am trying to restore a snapshot from a 5 node v6.8 to a single v7.9 host.  
When restoring the snapshot it finishes almost instantly. So no data was imported as its 166gb snapshot. My status goes red and shows 5 unassigned shards and that's it. How can I get this to restore?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 17, 2020, 9:23pm UTC](https://discuss.elastic.co/t/how-to-restore-snapshop-from-5-node-cluster-to-single-node-host/255761/2 "2020-11-17T21:23:04Z")

</div>

Anything in logs?

---

<div class="post-metadata">

**Author:** ![elkdummy](https://avatars.discourse-cdn.com/v4/letter/e/838e76/32.png) [@elkdummy](https://discuss.elastic.co/u/elkdummy)\
**Post date:** [November 17, 2020, 9:34pm UTC](https://discuss.elastic.co/t/how-to-restore-snapshop-from-5-node-cluster-to-single-node-host/255761/3 "2020-11-17T21:34:11Z")

</div>

I do not see anything in logs. Using the kibana console I see these:  
allocate\_explanation" : "cannot allocate because allocation is not permitted to any of the nodes",  
"explanation" : "primary shard for this replica is not yet active"

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 18, 2020, 4:00am UTC](https://discuss.elastic.co/t/how-to-restore-snapshop-from-5-node-cluster-to-single-node-host/255761/4 "2020-11-18T04:00:46Z")

</div>

> [@elkdummy](#):
>
> When restoring the snapshot it finishes almost instantly.

What exact command did you use?

---

<div class="post-metadata">

**Author:** ![elkdummy](https://avatars.discourse-cdn.com/v4/letter/e/838e76/32.png) [@elkdummy](https://discuss.elastic.co/u/elkdummy)\
**Post date:** [November 18, 2020, 12:39pm UTC](https://discuss.elastic.co/t/how-to-restore-snapshop-from-5-node-cluster-to-single-node-host/255761/5 "2020-11-18T12:39:39Z")

</div>

honestly I have tried a ton I have found online, these are the latest two from my notes.

POST /\_snapshot/my\_backup/my\_snapshot20201101/\_restore

{  
"indices": "data\_stream\_1,index\_1,index\_2",  
"ignore\_unavailable": true,  
"include\_global\_state": false,  
"rename\_pattern": "index\_(.+)",  
"rename\_replacement": "restored\_index\_$1",  
"include\_aliases": false  
}

and

curl --user elastic -XPUT "localhost:9200/my\_snapshot20201101/\_settings?pretty" -H 'Content-Type: application/json' -d' { "number\_of\_replicas": 0 }'

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 19, 2020, 7:50am UTC](https://discuss.elastic.co/t/how-to-restore-snapshop-from-5-node-cluster-to-single-node-host/255761/6 "2020-11-19T07:50:45Z")

</div>

What is the output of:

```auto
GET /
GET /_cat/nodes?v
GET /_cat/health?v
GET /_cat/indices?v

```

If some outputs are too big, please share them on [gist.github.com](http://gist.github.com) and link them here.

Could you run that on both clusters?

Please format your code, logs or configuration files using `</>` icon as explained in [this guide](https://discuss.elastic.co/t/about-the-elasticsearch-category/21) and not the citation button. It will make your post more readable.

Or use markdown style like:

````
```
CODE
```

````

This is the icon to use if you are not using markdown format:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/7/e/7e6e239431ec2d71cbf1beef741f2e93e7cc762c.jpg)

There's a live preview panel for exactly this reasons.

Lots of people read these forums, and many of them will simply skip over a post that is difficult to read, because it's just too large an investment of their time to try and follow a wall of badly formatted text.  
If your goal is to get an answer to your questions, it's in your interest to make it as easy to read and understand as possible.

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [November 19, 2020, 1:42pm UTC](https://discuss.elastic.co/t/how-to-restore-snapshop-from-5-node-cluster-to-single-node-host/255761/7 "2020-11-19T13:42:35Z")

</div>

> [@elkdummy](#):
>
> When restoring the snapshot it finishes almost instantly

That's the expected behaviour, a `200 OK` just means the restore has been initialised. You can use the [index recovery API](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-recovery.html) to monitor its progress, and [cluster allocation explain](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-allocation-explain.html) to determine why any shards aren't allocated.

> [@elkdummy](#):
>
> `primary shard for this replica is not yet active`

Replicas cannot be allocated before the primary. You need to determine why the primary isn't active.

---

<div class="post-metadata">

**Author:** ![elkdummy](https://avatars.discourse-cdn.com/v4/letter/e/838e76/32.png) [@elkdummy](https://discuss.elastic.co/u/elkdummy)\
**Post date:** [November 19, 2020, 1:57pm UTC](https://discuss.elastic.co/t/how-to-restore-snapshop-from-5-node-cluster-to-single-node-host/255761/8 "2020-11-19T13:57:18Z")

</div>

Looks like after sitting there for a while this error is now also showing  
All errors posted are from using "GET /\_cluster/allocation/explain"

"explanation" : "shard has failed to be restored from the snapshot [my\_backup:my\_snapshot20201101/cztjiMTZQ\_OlZSGDADFqVg] because of [restore\_source[my\_backup/my\_snapshot20201101]] - manually close or delete the index [my\_snapshot20201101] in order to retry to restore the snapshot again or use the reroute API to force the allocation of an empty primary shard"

---

<div class="post-metadata">

**Author:** ![elkdummy](https://avatars.discourse-cdn.com/v4/letter/e/838e76/32.png) [@elkdummy](https://discuss.elastic.co/u/elkdummy)\
**Post date:** [November 19, 2020, 2:04pm UTC](https://discuss.elastic.co/t/how-to-restore-snapshop-from-5-node-cluster-to-single-node-host/255761/9 "2020-11-19T14:04:54Z")

</div>

That is the thing, the recovery API shows nothing. All it ever shows is { }. Please see my reply about new error showing using the explain command.

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [November 19, 2020, 2:13pm UTC](https://discuss.elastic.co/t/how-to-restore-snapshop-from-5-node-cluster-to-single-node-host/255761/10 "2020-11-19T14:13:52Z")

</div>

> [@elkdummy](#):
>
> `explanation" : "shard has failed to be restored from the snapshot`

I don't think this is the pertinent part of the response from `GET /_cluster/allocation/explain`. Please share the whole output.

---

<div class="post-metadata">

**Author:** ![elkdummy](https://avatars.discourse-cdn.com/v4/letter/e/838e76/32.png) [@elkdummy](https://discuss.elastic.co/u/elkdummy)\
**Post date:** [November 19, 2020, 2:16pm UTC](https://discuss.elastic.co/t/how-to-restore-snapshop-from-5-node-cluster-to-single-node-host/255761/11 "2020-11-19T14:16:16Z")

</div>

Thank you for your reply and help. I also added one reply with more info of an error about forcing a primary shard.

{  
"name" : "MY\_HOST",  
"cluster\_name" : "elasticsearch",  
"cluster\_uuid" : "Q-kDH2ZlSMmurA1HTM4r-g",  
"version" : {  
"number" : "7.9.3",  
"build\_flavor" : "default",  
"build\_type" : "rpm",  
"build\_hash" : "c4138e51121ef06a6404866cddc601906fe5c868",  
"build\_date" : "2020-10-16T10:36:16.141335Z",  
"build\_snapshot" : false,  
"lucene\_version" : "8.6.2",  
"minimum\_wire\_compatibility\_version" : "6.8.0",  
"minimum\_index\_compatibility\_version" : "6.0.0-beta1"  
},  
"tagline" : "You Know, for Search"  
}

ip heap.percent ram.percent cpu load\_1m load\_5m load\_15m node.role master name  
127.0.0.1 52 42 0 0.00 0.01 0.05 dilmrt \* MY\_HOST

epoch timestamp cluster status node.total node.data shards pri relo init unassign pending\_tasks max\_task\_wait\_time active\_shards\_percent  
1605794717 14:05:17 elasticsearch red 1 1 37 37 0 0 10 0 - 78.7%

There is a bunch of indicies with monitoring, kibana etc. I would guess this is the one you would like to see.  
red open my\_snapshot20201101 GOJmqrJhTpeB3sjNBnkQwA 5 1

The primary cluster is custom with no web. It's all command line and I would not be able to post much about it. I know this might make things difficult, but if there is something in particular that is a must I can get it out and modify what cannot be posted publicly.

---

<div class="post-metadata">

**Author:** ![elkdummy](https://avatars.discourse-cdn.com/v4/letter/e/838e76/32.png) [@elkdummy](https://discuss.elastic.co/u/elkdummy)\
**Post date:** [November 19, 2020, 2:27pm UTC](https://discuss.elastic.co/t/how-to-restore-snapshop-from-5-node-cluster-to-single-node-host/255761/12 "2020-11-19T14:27:05Z")

</div>

```auto
{
  "index" : "my_snapshot20201101",
  "shard" : 4,
  "primary" : true,
  "current_state" : "unassigned",
  "unassigned_info" : {
    "reason" : "NEW_INDEX_RESTORED",
    "at" : "2020-11-17T21:32:40.964Z",
    "details" : "restore_source[my_backup/my_snapshot20201101]",
    "last_allocation_status" : "no"
  },
  "can_allocate" : "no",
  "allocate_explanation" : "cannot allocate because allocation is not permitted to any of the nodes",
  "node_allocation_decisions" : [
    {
      "node_id" : "PkgLXJrvSFuQhV-wkw2AnA",
      "node_name" : "MY_HOST",
      "transport_address" : "127.0.0.1:9300",
      "node_attributes" : {
        "ml.machine_memory" : "33521811456",
        "xpack.installed" : "true",
        "transform.node" : "true",
        "ml.max_open_jobs" : "20"
      },
      "node_decision" : "no",
      "weight_ranking" : 1,
      "deciders" : [
        {
          "decider" : "restore_in_progress",
          "decision" : "NO",
          "explanation" : "shard has failed to be restored from the snapshot [my_backup:my_snapshot20201101/cztjiMTZQ_OlZSGDADFqVg] because of [restore_source[my_backup/my_snapshot20201101]] - manually close or delete the index [my_snapshot20201101] in order to retry to restore the snapshot again or use the reroute API to force the allocation of an empty primary shard"
        },
        {
          "decider" : "filter",
          "decision" : "NO",
          "explanation" : """node does not match index setting [index.routing.allocation.require] filters [box_type:"warm"]"""
        }
      ]
    }
  ]
}

```

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [November 19, 2020, 2:27pm UTC](https://discuss.elastic.co/t/how-to-restore-snapshop-from-5-node-cluster-to-single-node-host/255761/13 "2020-11-19T14:27:54Z")

</div>

Ok the problem is this:

> [@elkdummy](#):
>
> `node does not match index setting [index.routing.allocation.require] filters [box_type:"warm"]`

---

<div class="post-metadata">

**Author:** ![elkdummy](https://avatars.discourse-cdn.com/v4/letter/e/838e76/32.png) [@elkdummy](https://discuss.elastic.co/u/elkdummy)\
**Post date:** [November 19, 2020, 2:34pm UTC](https://discuss.elastic.co/t/how-to-restore-snapshop-from-5-node-cluster-to-single-node-host/255761/15 "2020-11-19T14:34:02Z")

</div>

The reply did not go to you, so I tried to remove it and reply but error. Hopefully this works.

How would I tell it to ignore, change, fix that? I thought it ignored this if the setting do not use global.

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [November 19, 2020, 2:39pm UTC](https://discuss.elastic.co/t/how-to-restore-snapshop-from-5-node-cluster-to-single-node-host/255761/16 "2020-11-19T14:39:54Z")

</div>

That's not a global setting so `include_global_state` has no effect. You're looking for `ignore_index_settings` instead -- see [the docs](https://www.elastic.co/guide/en/elasticsearch/reference/current/restore-snapshot-api.html#restore-snapshot-api-request-body) for further details.

---

<div class="post-metadata">

**Author:** ![elkdummy](https://avatars.discourse-cdn.com/v4/letter/e/838e76/32.png) [@elkdummy](https://discuss.elastic.co/u/elkdummy)\
**Post date:** [November 19, 2020, 2:55pm UTC](https://discuss.elastic.co/t/how-to-restore-snapshop-from-5-node-cluster-to-single-node-host/255761/17 "2020-11-19T14:55:37Z")

</div>

> [@elkdummy](#):
>
> `my_snapshot20201101`

Is this correct? It made no change to the error.

```auto
POST /_snapshot/my_backup/my_snapshot20201101/_restore

{
  "ignore_index_settings": "warm",
  "indices": "data_stream_1,index_1,index_2",
  "ignore_unavailable": true,
  "include_global_state": false,              
  "include_aliases": false
  }

```

---

<div class="post-metadata">

**Author:** ![elkdummy](https://avatars.discourse-cdn.com/v4/letter/e/838e76/32.png) [@elkdummy](https://discuss.elastic.co/u/elkdummy)\
**Post date:** [November 19, 2020, 3:03pm UTC](https://discuss.elastic.co/t/how-to-restore-snapshop-from-5-node-cluster-to-single-node-host/255761/18 "2020-11-19T15:03:14Z")

</div>

It did not respond to you again, not sure what I keep hitting. Please see my reply with settings used.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 19, 2020, 3:15pm UTC](https://discuss.elastic.co/t/how-to-restore-snapshop-from-5-node-cluster-to-single-node-host/255761/19 "2020-11-19T15:15:14Z")

</div>

There are 2 reply buttons.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/e/7/e7f45795d36e91c5d148ccbefe3162c5022169ac.png)

The red one replies to the thread where the green one replies to someone.

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [November 19, 2020, 4:09pm UTC](https://discuss.elastic.co/t/how-to-restore-snapshop-from-5-node-cluster-to-single-node-host/255761/20 "2020-11-19T16:09:16Z")

</div>

> [@elkdummy](#):
>
> Is this correct?

No, you need to list the settings to ignore under `ignore_index_settings` not their values. So `index.routing.allocation.require.box_type`.

---

<div class="post-metadata">

**Author:** ![elkdummy](https://avatars.discourse-cdn.com/v4/letter/e/838e76/32.png) [@elkdummy](https://discuss.elastic.co/u/elkdummy)\
**Post date:** [November 19, 2020, 4:24pm UTC](https://discuss.elastic.co/t/how-to-restore-snapshop-from-5-node-cluster-to-single-node-host/255761/21 "2020-11-19T16:24:00Z")

</div>

I tried the following with no luck. If this is not correct would you be willing to provide the proper code for me?

```auto
PUT /_settings
{
"settings": {
"index.routing.allocation.require.box_type": "warm"
}
}

```

[Next page](https://discuss.elastic.co/t/how-to-restore-snapshop-from-5-node-cluster-to-single-node-host/255761.md?page=2)
