Adionditsak
Adionditsak

Reputation: 185

Delete data from Elasticsearch before one month

I would like to remove data from my Elasticsearch base, so i only got data from the past month. Is this possible in a XDELETE call or similar? Could be setup with a cronjob or similar.

Upvotes: 1

Views: 1476

Answers (1)

Andrei Stefan
Andrei Stefan

Reputation: 52368

I think you need the curator feature. See here a blog post about this and another one here. And you can find various example on the web for running it as a cron job. For example here or here:

20 0 * * * /usr/local/bin/curator --host 127.0.0.1 -d 120 -c 90

Upvotes: 5

Related Questions