# Snapshot restore failing

**URL:** <https://discuss.elastic.co/t/snapshot-restore-failing/272117>\
**Category:** Elasticsearch\
**Tags:** snapshot-and-restore\
**Created:** [May 4, 2021, 9:07pm UTC](https://discuss.elastic.co/t/snapshot-restore-failing/272117 "2021-05-04T21:07:48Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![kommineni24](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kommineni24/32/117038_2.png) [@kommineni24](https://discuss.elastic.co/u/kommineni24)\
**Post date:** [May 4, 2021, 9:07pm UTC](https://discuss.elastic.co/t/snapshot-restore-failing/272117/1 "2021-05-04T21:07:49Z")

</div>

Hi Team,

I am trying to migrate data from Cluster 1(Elasticsearch version-6.4) to Cluster-2(Elasticsearch version-7.12). Have taken the snapshot and trying to restore the snapshot and seeing the error shown in the attached image.

My old clusterElasticsearch version-6 has 5 shards by default and the new cluster with Elasticsearch version-7 has 1 shard by default.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/8/a/8a23291fcebea76e3abedf00d2c6c83cdd032529.png)

Do I need to make my cluster to use 5 shards similar to my old cluster? If so where can I update that? Any help/suggestions appreciated.

---

<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:** [May 5, 2021, 6:43am UTC](https://discuss.elastic.co/t/snapshot-restore-failing/272117/2 "2021-05-05T06:43:27Z")

</div>

Yes. You can't restore 5 shards into 1 shard.  
But then after the restore operation, you would be able to use the `_shrink` API to reduce the number of shards.

The other thing you can do is to perform a reindex from remote and read your 6.x 5 shards index and write to the 7.12 1 shard index.

---

<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:** [May 5, 2021, 8:13am UTC](https://discuss.elastic.co/t/snapshot-restore-failing/272117/3 "2021-05-05T08:13:31Z")

</div>

TBC the default shard count is not relevant when restoring a snapshot. The trouble you're facing is that you are trying to restore a five-shard snapshot over the top of an existing one-shard index. You can fix this by deleting the existing one-shard index first, rather than closing it.

---

<div class="post-metadata">

**Author:** ![kommineni24](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kommineni24/32/117038_2.png) [@kommineni24](https://discuss.elastic.co/u/kommineni24)\
**Post date:** [May 12, 2021, 1:14pm UTC](https://discuss.elastic.co/t/snapshot-restore-failing/272117/4 "2021-05-12T13:14:08Z")

</div>

I have moved my data successfully. Currently, my old data indexes have 5 shards allocated and the newer one has 1 shard. I want to try to reduce the shard count to 1 for my older data as well. Can we do a bulk shrink for all my old indexes with shards 5 to 1?

---

<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:** [May 13, 2021, 8:31am UTC](https://discuss.elastic.co/t/snapshot-restore-failing/272117/5 "2021-05-13T08:31:02Z")

</div>

There is no "bulk shrink" but you can shrink all the indices individually.

---

<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:** [June 10, 2021, 8:31am UTC](https://discuss.elastic.co/t/snapshot-restore-failing/272117/6 "2021-06-10T08:31:27Z")

</div>

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