How to schedule auto archival of old indices?



I use elastic stack 5.0 GA, and I know (and I use) how to delete old indices using curl like;

curl --user elastic:elasticpassword -XDELETE '*?pretty'

I have named my indices in the pattern name-yyyy-mm-dd like myindex-2016-11-10. Deleting old indices manually works fine. But I want to automate this.

I have indices like myindex-2016-11-01, myindex-2016-11-02 etc. I want to do an automated process, which backups old indices (say, older than 5 days), as a file, so that I can move that to my external HDD in case if its needed in future, and thereby freeing up my PC's HDD. Is this possible, or any workaround?

Thank you.

(David Pilato) #2

Did you try curator ?


@dadoonet I tried curator, to delete old indices using custom index name pattern. But I have doubts;

  • Can I make curator work as per schedule? I mean, every day in a specific time, curator run automatically?
  • Can I backup my archived indices to another location (like external HDD) and restore them later?
  • Will it work with ES 5.0 GA?


(Mark Walkom) #4

If you use cron, sure.

Curator can do snapshots, not restores.


(Aaron Mildenstein) #5

Curator 4 does, in fact, do restores:

(system) #6

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