Snapshot restore failing

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.

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.

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.

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.

2 Likes

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?

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

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