================
Checking done, in total 9!
The number of data dir to keep: 8
production-2024.09.11
production-2024.09.10
production-2024.09.09
production-2024.03.01
production-2023.10.16
production-2023.05.18
production-2023.02.20
production-2022.11.16
================
================
Delete data directory production-2024.01.20
Delete ES index for production-2024.01.20
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 21 100 21 {"acknowledged":true} 0 0 15086 0 --:--:-- --:--:-- --:--:-- 21000
================
In total 1 data directories are deleted!
I have updated the script on the VM to delete the old index data on ES server.
The only problem is that the index data list is based on the data on the disk not on the ES server.
If you manually delete the data on disk, you also need to delete the data on ES server.
I could do another query
curl -s 'es1:9200/_cat/indices?v'
but for now it should be fine.I have manually clean the old data on ES server and currently only 8 days left there:
This is the output from the clean_data script: