# Succeeded to take snapshot of closed Elasticsearch index with ignore\_unavailable=false

**URL:** <https://discuss.elastic.co/t/succeeded-to-take-snapshot-of-closed-elasticsearch-index-with-ignore-unavailable-false/309853>\
**Category:** Elasticsearch\
**Tags:** snapshot-and-restore\
**Created:** [July 18, 2022, 7:30am UTC](https://discuss.elastic.co/t/succeeded-to-take-snapshot-of-closed-elasticsearch-index-with-ignore-unavailable-false/309853 "2022-07-18T07:30:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![amirmono](https://avatars.discourse-cdn.com/v4/letter/a/57b2e6/32.png) [@amirmono](https://discuss.elastic.co/u/amirmono)\
**Post date:** [July 18, 2022, 7:30am UTC](https://discuss.elastic.co/t/succeeded-to-take-snapshot-of-closed-elasticsearch-index-with-ignore-unavailable-false/309853/1 "2022-07-18T07:30:56Z")

</div>

According to the [Elasticsearch Create snapshot API documentation](https://www.elastic.co/guide/en/elasticsearch/reference/8.2/create-snapshot-api.html#create-snapshot-api) , when creating a manual snapshot of a closed index with `ignore_unavailable = false` - the snapshot should fail:

> ignore\_unavailable (Optional, Boolean) If false, the snapshot fails if any data stream or index in indices is missing or closed.

I'm using elasicsearch 8.2 and closed one of my indices (e.g. "index\_1000\_6\_1" - I validated it is actualy close).

```auto
POST https://someuri:9200/index_1000_6_1/_close

```

Response:

```auto
{
    "acknowledged": true,
    "shards_acknowledged": true,
    "indices": {
        "index_1000_6_1": {
            "closed": true
        }
    }
}

```

I'm taking a snapshot of this index with `"ignore_unavailable":"false"` but the request scceeded, nothing fails and the snapshot is being created.

```auto
PUT https://someuri:9200/_snapshot/my_backup/snap_test?wait_for_completion=true
{
"indices":"index_1000_6_1",
"ignore_unavailable":"false"
}

```

Response:

```auto
{ 
  "snapshot": { 
      "snapshot": "snap_test_X", 
      "uuid": "iihDBPjoS2mdjaBnzRaGrA", 
      "repository": "my_backup", 
      "version_id": 8020299, 
      "version": "8.2.2", 
      "indices": [ 
          ".geoip_databases", 
          "index_1000_6_1", ".security-7" 
        ], 
       "data_streams": [], 
       "include_global_state": true, 
       "state": "SUCCESS",
        ...... 
       "failures": [],
         ....

```

What am I missing?

---

<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:** [July 18, 2022, 8:21am UTC](https://discuss.elastic.co/t/succeeded-to-take-snapshot-of-closed-elasticsearch-index-with-ignore-unavailable-false/309853/2 "2022-07-18T08:21:11Z")

</div>

Hi @amirmono, I think this is a mistake in the docs because snapshotting a closed index should work just fine. Would you report it on Github so we can fix it?

---

<div class="post-metadata">

**Author:** ![amirmono](https://avatars.discourse-cdn.com/v4/letter/a/57b2e6/32.png) [@amirmono](https://discuss.elastic.co/u/amirmono)\
**Post date:** [July 18, 2022, 9:19am UTC](https://discuss.elastic.co/t/succeeded-to-take-snapshot-of-closed-elasticsearch-index-with-ignore-unavailable-false/309853/3 "2022-07-18T09:19:48Z")

</div>

Sure, thanks for the replay.

> <https://github.com/elastic/elasticsearch/issues/88582>
>
> \### Elasticsearch Version
> 
> 8.2.2
> 
> \### Installed Plugins
> 
> \_No response\_
> 
> \### Java… Version
> 
> 18.0.1.1
> 
> \### OS Version
> 
> Windows Server 2019 Datacenter
> 
> \### Problem Description
> 
> According to the \[Elasticsearch Create snapshot API documentation\](https://www.elastic.co/guide/en/elasticsearch/reference/8.2/create-snapshot-api.html#create-snapshot-api), when creating a manual snapshot of a closed index with ignore\_unavailable = false - the snapshot should fail, but it succeeded.
> 
> More detailed information:
> https://discuss.elastic.co/t/succeeded-to-take-snapshot-of-closed-elasticsearch-index-with-ignore-unavailable-false/309853
> https://stackoverflow.com/questions/73010199/succeeded-to-take-snapshot-of-closed-elasticsearch-index-with-ignore-unavailable
> 
> \### Steps to Reproduce
> 
> 1. Create an index
> 2. Close this index - POST https://someuri:9200/index1/\_close
> 3. take a snapshot of this index with property "ignore\_unavailable" set to false :
> PUT https://someuri:9200/\_snapshot/my\_backup/snap\_test?wait\_for\_completion=true
> {
> "indices":"index1",
> "ignore\_unavailable":"false"
> }
> 
> \### Logs (if relevant)
> 
> \_No response\_

---

<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:** [August 15, 2022, 9:20am UTC](https://discuss.elastic.co/t/succeeded-to-take-snapshot-of-closed-elasticsearch-index-with-ignore-unavailable-false/309853/4 "2022-08-15T09:20:00Z")

</div>

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