Succeeded to take snapshot of closed Elasticsearch index with ignore_unavailable=false

According to the Elasticsearch Create snapshot API documentation , 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).

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


    "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.

PUT https://someuri:9200/_snapshot/my_backup/snap_test?wait_for_completion=true


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

What am I missing?

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?

Sure, thanks for the replay.

1 Like

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