1

I have close to 400+ RED/YELLOW ES indices, the problem is its taking 5-15 mins to delete each of the indices. Can a unix find and delete work here? <find ... -exec rm ...>. Is it safe to do so?

Currently using this command:

curl -s --key /etc/elasticsearch/secret/admin-key --cert /etc/elasticsearch/secret/admin-cert --cacert /etc/elasticsearch/secret/admin-ca -XDELETE https://localhost:9200/<index name>

Will this work?

rm -rf /elasticsearch/persistent/logging-es/data/logging-es/nodes/0/indices/<corrupt index>
1
  • No, deleting indices directly from the filesystem doesn’t sound like a good idea as it may affect the integrity of data store. I am sure you can delete ES indices in bulk pretty quickly using API. Try using DELETE api from Kibana dev tools and pass list of indices. You can use wildcards too for deleting bulk indices in one go
    – ben5556
    Dec 10, 2018 at 8:12

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.