# Problem with index restoration

**URL:** <https://discuss.elastic.co/t/problem-with-index-restoration/183813>\
**Category:** Elasticsearch\
**Created:** [June 1, 2019, 7:33am UTC](https://discuss.elastic.co/t/problem-with-index-restoration/183813 "2019-06-01T07:33:57Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arkadiusz\_Porada](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arkadiusz_porada/32/47274_2.png) [@Arkadiusz\_Porada](https://discuss.elastic.co/u/Arkadiusz_Porada)\
**Post date:** [June 1, 2019, 7:33am UTC](https://discuss.elastic.co/t/problem-with-index-restoration/183813/1 "2019-06-01T07:33:57Z")

</div>

Hello,  
Today, I've noticed a strange behaviour of my elasticsearch server (7.1.0). When I tried to restore an index from a tar archive nothing happened. Later I noticed that my index didn't exist at elasticearch repository because after server restart it was removed. And I don't know why. Moreover, I can find any useful information about what happened with my index after server restart.  
When I use elasticsearch 6.6.1 everything works fine.  
So where can I find a couse of that situation?

Regards,  
Arek

---

<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:** [June 1, 2019, 8:43am UTC](https://discuss.elastic.co/t/problem-with-index-restoration/183813/2 "2019-06-01T08:43:14Z")

</div>

Was this index created with a previous version of elasticsearch like 5.x or 2.x?

---

<div class="post-metadata">

**Author:** ![Arkadiusz\_Porada](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arkadiusz_porada/32/47274_2.png) [@Arkadiusz\_Porada](https://discuss.elastic.co/u/Arkadiusz_Porada)\
**Post date:** [June 1, 2019, 9:04am UTC](https://discuss.elastic.co/t/problem-with-index-restoration/183813/3 "2019-06-01T09:04:49Z")

</div>

Index was created with 7.1.0. elasticsearch....

---

<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:** [June 1, 2019, 9:54am UTC](https://discuss.elastic.co/t/problem-with-index-restoration/183813/4 "2019-06-01T09:54:47Z")

</div>

So I don't understand what you did.

Start a 7.1 new cluster  
Create an index  
Snapshot it  
Delete it  
Restore it

Is that what you did?

---

<div class="post-metadata">

**Author:** ![Arkadiusz\_Porada](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arkadiusz_porada/32/47274_2.png) [@Arkadiusz\_Porada](https://discuss.elastic.co/u/Arkadiusz_Porada)\
**Post date:** [June 1, 2019, 11:26am UTC](https://discuss.elastic.co/t/problem-with-index-restoration/183813/5 "2019-06-01T11:26:10Z")

</div>

Cluster (in fact standalone server) was created with 6.6.1 elasticsearch version.  
All indices I backup by my own script in tar archive (I do not use snapshot feature)  
And as I said before, restore procedure worked perfect. Then I upgraded server to 7.1.0 and all indices were properly reindexed to version 7.1.0 or ,since upgrade, created with version 7.1.0.  
And, yes, I delete unused indices. But now I have to restore one of deleted ones from my archive and I can't do that because that restored index (its folder) disapears shortly after server restarts.

---

<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:** [June 1, 2019, 11:52am UTC](https://discuss.elastic.co/t/problem-with-index-restoration/183813/6 "2019-06-01T11:52:55Z")

</div>

> But now I have to restore one of deleted ones from my archive

Which archive? An archive that has been created with 6.6.1 or 7.1.0?

> I can't do that because that restored index (its folder) disapears shortly after server restarts.

Doing manual stuff in the `data` dir is not supported. You should always use the APIs we are providing. Here the snapshot and restore API.

---

<div class="post-metadata">

**Author:** ![Arkadiusz\_Porada](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arkadiusz_porada/32/47274_2.png) [@Arkadiusz\_Porada](https://discuss.elastic.co/u/Arkadiusz_Porada)\
**Post date:** [June 1, 2019, 1:21pm UTC](https://discuss.elastic.co/t/problem-with-index-restoration/183813/7 "2019-06-01T13:21:51Z")

</div>

> Which archive? An archive that has been created with 6.6.1 or 7.1.0?

7.1.0

> Doing manual stuff in the `data` dir is not supported. You should always use the APIs we are providing. Here the snapshot and restore API.

OK. I understand, however in previous version such data manipulation works ok.  
So, is it possible to restore any folder with data into elasticsearch? If not, I have a huge problem...

---

<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:** [June 1, 2019, 1:37pm UTC](https://discuss.elastic.co/t/problem-with-index-restoration/183813/8 "2019-06-01T13:37:35Z")

</div>

You can save and restore probably the full data dir. I don't know if you can do it partially. @DavidTurner probably knows.

---

<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:** [June 1, 2019, 2:13pm UTC](https://discuss.elastic.co/t/problem-with-index-restoration/183813/9 "2019-06-01T14:13:14Z")

</div>

> [@Arkadiusz\_Porada](#):
>
> I understand, however in previous version such data manipulation works ok.

It might have appeared to work ok but I don't know that this has ever really worked, and there's a big warning [in the 6.6 docs](https://www.elastic.co/guide/en/elasticsearch/reference/6.6/modules-snapshots.html) saying specifically not to do this:

> Attempts to restore a cluster from such a backup may fail, reporting corruption and/or missing files, or may appear to have succeeded having silently lost some of its data. **The only reliable way to back up a cluster is by using the snapshot and restore functionality.**

Although you say that this has changed in 7.1.0, I think you would have seen the same behaviour in 6.6.1 too. It might work to restore it into a new cluster instead, but really we can't guarantee anything about this process. There are no user-serviceable parts inside the data directory.

---

<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:** [June 1, 2019, 2:21pm UTC](https://discuss.elastic.co/t/problem-with-index-restoration/183813/10 "2019-06-01T14:21:59Z")

</div>

I should add that even if you manage to get it to work now, you should expect this kind of process to stop working in some future version, without warning. It may start completely failing, or may work intermittently, or may silently lose some of your data.

---

<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 29, 2019, 2:22pm UTC](https://discuss.elastic.co/t/problem-with-index-restoration/183813/11 "2019-06-29T14:22:08Z")

</div>

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