# Restore a snapshot Error not\_x\_content\_exception

**URL:** <https://discuss.elastic.co/t/restore-a-snapshot-error-not-x-content-exception/180989>\
**Category:** Elasticsearch\
**Created:** [May 14, 2019, 11:26am UTC](https://discuss.elastic.co/t/restore-a-snapshot-error-not-x-content-exception/180989 "2019-05-14T11:26:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![fim](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fim/32/90645_2.png) [@fim](https://discuss.elastic.co/u/fim)\
**Post date:** [May 14, 2019, 11:26am UTC](https://discuss.elastic.co/t/restore-a-snapshot-error-not-x-content-exception/180989/1 "2019-05-14T11:26:18Z")

</div>

I've created the repo "restore".

When I call:

> POST /\_snapshot/restore/connect/\_restore

I'll get the following error:

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

```

The source index snapshot is from ESv6.7.0 and restore environment is ESv7.0.1.

Is there anything I need to consider?

---

<div class="post-metadata">

**Author:** ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)\
**Post date:** [May 17, 2019, 8:08pm UTC](https://discuss.elastic.co/t/restore-a-snapshot-error-not-x-content-exception/180989/2 "2019-05-17T20:08:26Z")

</div>

This typically happen when one of the files in the snapshot getting truncated or the request body contains something that confuses the x content parser. Do you see a stack trace for this error in the log file? Can you list the files with their lengths in the snapshot directory? Are you using Kibana to execute restore or send this command in some other way?

---

<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 14, 2019, 8:08pm UTC](https://discuss.elastic.co/t/restore-a-snapshot-error-not-x-content-exception/180989/3 "2019-06-14T20:08:32Z")

</div>

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