How to schedule auto archival of old indices?

Hi,

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 '192.168.1.1:9200/myindex-*?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.

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?

Thanks.

If you use cron, sure.

Curator can do snapshots, not restores.

Yes.

Curator 4 does, in fact, do restores: Restore | Curator Reference [8.0] | Elastic

1 Like

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