# Failed to restore snapshot to ES 5.5 with SearchGuard

**URL:** <https://discuss.elastic.co/t/failed-to-restore-snapshot-to-es-5-5-with-searchguard/113548>\
**Category:** Elasticsearch\
**Created:** [December 29, 2017, 7:35am UTC](https://discuss.elastic.co/t/failed-to-restore-snapshot-to-es-5-5-with-searchguard/113548 "2017-12-29T07:35:17Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![law](https://avatars.discourse-cdn.com/v4/letter/l/4af34b/32.png) [@law](https://discuss.elastic.co/u/law)\
**Post date:** [December 29, 2017, 7:35am UTC](https://discuss.elastic.co/t/failed-to-restore-snapshot-to-es-5-5-with-searchguard/113548/1 "2017-12-29T07:35:17Z")

</div>

hello everyone,  
I'm using elasticsearch 5.5.1 with SearchGurd. I want to backup my indices, that's ok. it's done now.  
But when i want to restore this snapshot, there is an error:

```auto
{"error":{"root_cause":[{"type":"not_x_content_exception","reason":"Compressor detection can only be called on some xcontent bytes or compressed xcontent bytes"}],"type":"not_x_content_exception","reason":"Compressor detection can only be called on some xcontent bytes or compressed xcontent bytes"},"status":500}

```

Does any one know what's wrong?  
Thanks for your time!

---

<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:** [December 29, 2017, 8:17am UTC](https://discuss.elastic.co/t/failed-to-restore-snapshot-to-es-5-5-with-searchguard/113548/2 "2017-12-29T08:17:52Z")

</div>

What is the restore command you are sending?

---

<div class="post-metadata">

**Author:** ![law](https://avatars.discourse-cdn.com/v4/letter/l/4af34b/32.png) [@law](https://discuss.elastic.co/u/law)\
**Post date:** [December 29, 2017, 8:34am UTC](https://discuss.elastic.co/t/failed-to-restore-snapshot-to-es-5-5-with-searchguard/113548/3 "2017-12-29T08:34:16Z")

</div>

hi dadoonet, here is my restore command:

```auto
curl -XPOST -uMY_USERNAME:MY_PASSWD http://127.0.0.1:19200/_snapshot/es_backup/pay-2017.12.15/_restore

```

---

<div class="post-metadata">

**Author:** ![law](https://avatars.discourse-cdn.com/v4/letter/l/4af34b/32.png) [@law](https://discuss.elastic.co/u/law)\
**Post date:** [December 29, 2017, 9:31am UTC](https://discuss.elastic.co/t/failed-to-restore-snapshot-to-es-5-5-with-searchguard/113548/4 "2017-12-29T09:31:20Z")

</div>

I think i know the reason now.  
I launched a test in my test [environment.it](http://environment.it) was fine.But when i copy my backup files to "Aliyun OSS" then download to my repo , and restore , the error occurs.  
so that's weird.

---

<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:** [December 29, 2017, 12:23pm UTC](https://discuss.elastic.co/t/failed-to-restore-snapshot-to-es-5-5-with-searchguard/113548/5 "2017-12-29T12:23:12Z")

</div>

Do you have a full stack trace? Might give more clues.  
May be there are some hidden files or searchguard is doing something bad? May be try without searchguard?

---

<div class="post-metadata">

**Author:** ![law](https://avatars.discourse-cdn.com/v4/letter/l/4af34b/32.png) [@law](https://discuss.elastic.co/u/law)\
**Post date:** [December 30, 2017, 6:24am UTC](https://discuss.elastic.co/t/failed-to-restore-snapshot-to-es-5-5-with-searchguard/113548/6 "2017-12-30T06:24:08Z")

</div>

@dadoonet I found out! My backup files were damaged when upload to OSS storage. Thanks for your advice.

---

<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:** [January 27, 2018, 6:24am UTC](https://discuss.elastic.co/t/failed-to-restore-snapshot-to-es-5-5-with-searchguard/113548/7 "2018-01-27T06:24:40Z")

</div>

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