Hi,
What is the syntax to delete all indices except a particular index
Curator version: 3.4.1
Thanks
Hi,
What is the syntax to delete all indices except a particular index
Curator version: 3.4.1
Thanks
For Curator 4, the action.yml file might look like this:
---
actions:
1:
action: delete_indices
options:
ignore_empty_list: True
filters:
- filtertype: pattern
kind: regex
value: '^MYINDEXNAME$'
exclude: True
I highly recommend running this with the --dry-run
flag before actually running it against a production environment as it will delete everything except MYINDEXNAME
.
In curator 3.4.1 there is an option called --exclude TEXT to exclude a particular index
How can I exclude a group of indices with certain pattern
Thanks
https://www.elastic.co/guide/en/elasticsearch/client/curator/3.4/exclude.html
so --exclude '^somepattern.*'
should do the trick.
You can test things out with curator --dry-run ..
thank you that helps a lot
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.