# Elasticsearch 7.4 snapshot retention not working

**URL:** <https://discuss.elastic.co/t/elasticsearch-7-4-snapshot-retention-not-working/211097>\
**Category:** Elasticsearch\
**Created:** [December 9, 2019, 11:28am UTC](https://discuss.elastic.co/t/elasticsearch-7-4-snapshot-retention-not-working/211097 "2019-12-09T11:28:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jaiganesh06](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@jaiganesh06](https://discuss.elastic.co/u/jaiganesh06)\
**Post date:** [December 9, 2019, 11:28am UTC](https://discuss.elastic.co/t/elasticsearch-7-4-snapshot-retention-not-working/211097/1 "2019-12-09T11:28:38Z")

</div>

Hi All,

I have configured daily snapshot policy without retention and it is working fine.

> {  
> "daily-snapshots" : {  
> "version" : 1,  
> "modified\_date\_millis" : 1575888007858,  
> "policy" : {  
> "name" : "\<daily-snap-{now/d}\>",  
> "schedule" : "0 30 1 \* \* ?",  
> "repository" : "dev-daily",  
> "config" : { }  
> },  
> "last\_success" : {  
> "snapshot\_name" : "daily-snap-2019.12.09-bidynlesslybklx6xjpfow",  
> "time" : 1575889231555  
> },  
> "next\_execution\_millis" : 1575941400000  
> }  
> }

However, when I delete this policy and add new one with retention, GET method doesn't show retention settings.

> PUT \_slm/policy/daily-snapshots  
> {  
> "name" : "\<daily-snap-{now/d}\>",  
> "schedule" : "0 30 1 \* \* ?",  
> "repository" : "dev-daily",  
> "config" : {},  
> "retention":  
> {  
> "expire\_after": "1d",  
> "min\_count": 1,  
> "max\_count": 2  
> }  
> }

GET method result

> {  
> "daily-snapshots" : {  
> "version" : 1,  
> "modified\_date\_millis" : 1575890608730,  
> "policy" : {  
> "name" : "\<daily-snap-{now/d}\>",  
> "schedule" : "0 30 1 \* \* ?",  
> "repository" : "dev-daily",  
> "config" : { }  
> },  
> "next\_execution\_millis" : 1575941400000  
> }  
> }

Because of which, my older snapshots are not getting deleted. Please help

---

<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 6, 2020, 11:28am UTC](https://discuss.elastic.co/t/elasticsearch-7-4-snapshot-retention-not-working/211097/2 "2020-01-06T11:28:42Z")

</div>

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