# Elastic slm retention doesn't work

**URL:** <https://discuss.elastic.co/t/elastic-slm-retention-doesnt-work/228973>\
**Category:** Elasticsearch\
**Tags:** slm-snapshot-lifecycle-management\
**Created:** [April 21, 2020, 6:26am UTC](https://discuss.elastic.co/t/elastic-slm-retention-doesnt-work/228973 "2020-04-21T06:26:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![111321](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/111321/32/66645_2.png) [@111321](https://discuss.elastic.co/u/111321)\
**Post date:** [April 21, 2020, 6:26am UTC](https://discuss.elastic.co/t/elastic-slm-retention-doesnt-work/228973/1 "2020-04-21T06:26:58Z")

</div>

Hi,

I am trying to use the Elastic slm policy, the snapshot creation works fine, however, the delete part seems doesn't work at all:

Here is my config:  
{  
"nightly-snapshots" : {  
"version" : 13,  
"modified\_date" : "2020-04-21T06:04:41.843Z",  
"modified\_date\_millis" : 1587449081843,  
"policy" : {  
"name" : "\<nightly-snap-{now/d}\>",  
"schedule" : "0 \*/3 \* ? \* \*",  
"repository" : "my\_repository",  
"config" : {  
"indices" : [  
"test\_data3"  
]  
},  
"retention" : {  
"expire\_after" : "3m",  
"min\_count" : 1,  
"max\_count" : 2  
}  
},  
"last\_success" : {  
"snapshot\_name" : "nightly-snap-2020.04.21-a4mkpod3spyh3xjgy90vbq",  
"time\_string" : "2020-04-21T06:21:00.247Z",  
"time" : 1587450060247  
},  
"next\_execution" : "2020-04-21T06:24:00.000Z",  
"next\_execution\_millis" : 1587450240000,  
"stats" : {  
"policy" : "nightly-snapshots",  
"snapshots\_taken" : 25,  
"snapshots\_failed" : 0,  
"snapshots\_deleted" : 0,  
"snapshot\_deletion\_failures" : 0  
}  
}

However, I can see all of my snapshots are saved into the repo and none of them are deleted.  
nightly-snap-2020.04.21-fynpgcygqwkpt8cso5k2ra SUCCESS 1587447108 05:31:48 1587447108 05:31:48 200ms 1 1 0 1  
nightly-snap-2020.04.21-o6bcqd1frwmft5nnw2o2ww SUCCESS 1587448837 06:00:37 1587448837 06:00:37 200ms 1 1 0 1  
nightly-snap-2020.04.21-1ejgsxdbt0myfn3qjac-og SUCCESS 1587448839 06:00:39 1587448839 06:00:39 0s 1 1 0 1  
nightly-snap-2020.04.21-jslsez2lscgc8q-aznkdia SUCCESS 1587448839 06:00:39 1587448839 06:00:39 0s 1 1 0 1  
nightly-snap-2020.04.21-xl-z3hyetiuwxrfxtxsfva SUCCESS 1587448840 06:00:40 1587448840 06:00:40 0s 1 1 0 1  
nightly-snap-2020.04.21-zvmueyqptsmk2ppil8oidq SUCCESS 1587449159 06:05:59 1587449159 06:05:59 0s 1 1 0 1  
nightly-snap-2020.04.21-xfhz-coot3wdg4ifa\_m5la SUCCESS 1587449339 06:08:59 1587449340 06:09:00 200ms 1 1 0 1  
nightly-snap-2020.04.21-occfbueargws6rwaiibhcq SUCCESS 1587449519 06:11:59 1587449520 06:12:00 200ms 1 1 0 1  
nightly-snap-2020.04.21-nkdv4dalqeabapwm04josw SUCCESS 1587449699 06:14:59 1587449699 06:14:59 0s 1 1 0 1  
nightly-snap-2020.04.21-dcwweieorwkegolqcapjkw SUCCESS 1587449879 06:17:59 1587449880 06:18:00 200ms 1 1 0 1

Br,  
Tim

---

<div class="post-metadata">

**Author:** ![111321](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/111321/32/66645_2.png) [@111321](https://discuss.elastic.co/u/111321)\
**Post date:** [April 21, 2020, 3:47pm UTC](https://discuss.elastic.co/t/elastic-slm-retention-doesnt-work/228973/2 "2020-04-21T15:47:02Z")

</div>

I found the problem, I need enable the retention schedule time.

---

<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:** [May 19, 2020, 3:47pm UTC](https://discuss.elastic.co/t/elastic-slm-retention-doesnt-work/228973/3 "2020-05-19T15:47:02Z")

</div>

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