# Curator doesn't purge Data

**URL:** <https://discuss.elastic.co/t/curator-doesnt-purge-data/132505>\
**Category:** Elasticsearch\
**Created:** [May 18, 2018, 2:51pm UTC](https://discuss.elastic.co/t/curator-doesnt-purge-data/132505 "2018-05-18T14:51:12Z")\
**Posts on this page:** 8\
**Page:** 2

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [May 21, 2018, 1:09pm UTC](https://discuss.elastic.co/t/curator-doesnt-purge-data/132505/21 "2018-05-21T13:09:35Z")

</div>

Remove `--dry-run` from your command line, and the deletes will happen. `--dry-run` means to show what _would_ happen, but not actually do the changes.

---

<div class="post-metadata">

**Author:** ![asalma](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/asalma/32/32199_2.png) [@asalma](https://discuss.elastic.co/u/asalma)\
**Post date:** [May 21, 2018, 1:11pm UTC](https://discuss.elastic.co/t/curator-doesnt-purge-data/132505/22 "2018-05-21T13:11:31Z")

</div>

And I keep the DEBUG ?

Thank you it is working !!

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [May 21, 2018, 1:12pm UTC](https://discuss.elastic.co/t/curator-doesnt-purge-data/132505/23 "2018-05-21T13:12:33Z")

</div>

Keeping DEBUG logging is up to you.

---

<div class="post-metadata">

**Author:** ![asalma](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/asalma/32/32199_2.png) [@asalma](https://discuss.elastic.co/u/asalma)\
**Post date:** [May 23, 2018, 7:45am UTC](https://discuss.elastic.co/t/curator-doesnt-purge-data/132505/24 "2018-05-23T07:45:31Z")

</div>

Do I have to do every time :

```auto
curator --config ~/.curator/curator.yml ~/.curator/action.yml

```

to purge the database, there is no way to make it work automatically ?

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [May 23, 2018, 12:00pm UTC](https://discuss.elastic.co/t/curator-doesnt-purge-data/132505/25 "2018-05-23T12:00:18Z")

</div>

Use `cron` to automate.

Also, with your `curator.yml` in `~/.curator`, you don't need to specify it when running as yourself. Your command line should still work just fine as:

```auto
curator ~/.curator/action.yml

```

---

<div class="post-metadata">

**Author:** ![asalma](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/asalma/32/32199_2.png) [@asalma](https://discuss.elastic.co/u/asalma)\
**Post date:** [May 23, 2018, 12:28pm UTC](https://discuss.elastic.co/t/curator-doesnt-purge-data/132505/26 "2018-05-23T12:28:50Z")

</div>

Can you show me how to use cron with the right way to make it work correctly please ?

I did :

```auto
crontab -e

```

I write :

```auto
0 23 * * * curator ~/.curator/action.yml
```

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [May 23, 2018, 3:30pm UTC](https://discuss.elastic.co/t/curator-doesnt-purge-data/132505/27 "2018-05-23T15:30:06Z")

</div>

So long as `cron` knows the system path to the `curator` binary, it should work.

---

<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:** [June 20, 2018, 3:30pm UTC](https://discuss.elastic.co/t/curator-doesnt-purge-data/132505/28 "2018-06-20T15:30:19Z")

</div>

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

[Previous page](https://discuss.elastic.co/t/curator-doesnt-purge-data/132505.md?page=1)
