删除与特定模式匹配的 ElasticSearch 索引
Delete ElasticSearch indexes which matches a specific pattern
如何使用 ElasticSearch curator
删除与特定模式匹配的旧索引。像这样使用 curator
将删除所有索引,而不是与模式匹配的索引:
curator --host <ip address> delete indices --time-unit days --older-than 45 --timestring '%Y%m%d'
假设要删除 45 天前与 sample_index_*
匹配的索引,该怎么做?
试试这个:
curator --host delete indices --time-unit days --older-than 45 --timestring '%Y%m%d' --prefix sample_
除了前缀选项,您还可以使用后缀和正则表达式
如何使用 ElasticSearch curator
删除与特定模式匹配的旧索引。像这样使用 curator
将删除所有索引,而不是与模式匹配的索引:
curator --host <ip address> delete indices --time-unit days --older-than 45 --timestring '%Y%m%d'
假设要删除 45 天前与 sample_index_*
匹配的索引,该怎么做?
试试这个:
curator --host delete indices --time-unit days --older-than 45 --timestring '%Y%m%d' --prefix sample_
除了前缀选项,您还可以使用后缀和正则表达式