Reputation: 2243
How can one use ElasticSearch curator
to delete old index which matches a specific pattern. Using curator
like this will delete all indexes rather than the ones matching a pattern:
curator --host <ip address> delete indices --time-unit days --older-than 45 --timestring '%Y%m%d'
Assuming one wants to delete indexes from 45 days ago which matches sample_index_*
, how to go about it?
Upvotes: 0
Views: 350
Reputation: 16335
Try this:
curator --host delete indices --time-unit days --older-than 45 --timestring '%Y%m%d' --prefix sample_
In addition to the prefix option, you can also use suffix and regex
Upvotes: 1