# Automatic index snapshot example doesn't work

**URL:** <https://forum.opensearch.org/t/automatic-index-snapshot-example-doesnt-work/7658>\
**Category:** Index Management\
**Created:** [November 17, 2021, 11:11am UTC](https://forum.opensearch.org/t/automatic-index-snapshot-example-doesnt-work/7658 "2021-11-17T11:11:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![amorsa](https://avatars.discourse-cdn.com/v4/letter/a/97f17d/32.png) [@amorsa](https://forum.opensearch.org/u/amorsa)\
**Post date:** [November 17, 2021, 11:11am UTC](https://forum.opensearch.org/t/automatic-index-snapshot-example-doesnt-work/7658/1 "2021-11-17T11:11:11Z")

</div>

I’m using opendistro 7.4 and I’m trying to build a a policy that have a snapshot of some indices after certain time. I have seen that there is [an example in the official develop guide](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/ism.html#ism-example):

```auto
{
  "policy": {
    "description": "Takes an index snapshot.",
    "schema_version": 1,
    "default_state": "empty",
    "states": [{
        "name": "empty",
        "actions": [],
        "transitions": [{
          "state_name": "occupied",
          "conditions": {
            "min_doc_count": 1
          }
        }]
      },
      {
        "name": "occupied",
        "actions": [{
          "snapshot": {
            "repository": "<my-repository>",
            "snapshot": "<my-snapshot>"
            }
          }],
          "transitions": []
      }
    ]
  }
}

```

Unfortunely this command returns to me an error:

`Invalid field: [snapshot] found in Action`

Could someone please help me to implement automatic snapshot?  
Thank you

---

<div class="post-metadata">

**Author:** ![mudboyzh](https://avatars.discourse-cdn.com/v4/letter/m/c68b51/32.png) [@mudboyzh](https://forum.opensearch.org/u/mudboyzh)\
**Post date:** [November 19, 2021, 2:04am UTC](https://forum.opensearch.org/t/automatic-index-snapshot-example-doesnt-work/7658/2 "2021-11-19T02:04:15Z")

</div>

Your opendistro version may not be supported for `snapshot` operation in index management.  
Check opendistro [version history](https://opendistro.github.io/for-elasticsearch-docs/version-history/).  
Opendistro adds `snapshot` operation at 1.8.0(es version 7.7).  
If you can not upgrade your opendistro version, try [curator](https://www.elastic.co/guide/en/elasticsearch/client/curator/current/index.html).
