Code: Select all
python `find /usr/lib/python* -name curator.py` "$@"Code: Select all
python `find /usr/lib/python* -name curator.py` "$@"Code: Select all
[root@~]# curl localhost:9200/_snapshot/Repository/_all?pretty | grep indices
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
"indices" : [ "logstash-2016.08.14" ], 0 --:--:-- --:--:-- --:--:-- 0
100 "indices" : [ "logstash-2016.08.15" ],
2 "indices" : [ "logstash-2016.08.16" ],
39 "indices" : [ "logstash-2016.08.17" ],
80 "indices" : [ "logstash-2016.08.18" ],
"indices" : [ "logstash-2016.08.19" ],
1 "indices" : [ "logstash-2016.08.20" ],
00 "indices" : [ "logstash-2016.08.21" ],
2 "indices" : [ "logstash-2016.08.22" ],
39 "indices" : [ "logstash-2016.08.23" ],
80 "indices" : [ "logstash-2016.08.24" ],
"indices" : [ "logstash-2016.08.25" ],
"indices" : [ "logstash-2016.08.26" ],
0 "indices" : [ "logstash-2016.08.27" ],
"indices" : [ "logstash-2016.08.28" ],
"indices" : [ "logstash-2016.08.29" ],
0 "indices" : [ "logstash-2016.08.30" ],
"indices" : [ "logstash-2016.08.31" ],
5 "indices" : [ "logstash-2016.09.01" ],
8 "indices" : [ "logstash-2016.09.02" ],
7 "indices" : [ "logstash-2016.09.03" ],
k "indices" : [ "logstash-2016.09.04" ],
"indices" : [ "logstash-2016.09.05" ],
"indices" : [ "logstash-2016.09.06" ],
"indices" : [ "logstash-2016.09.07" ],
"indices" : [ "logstash-2016.09.08" ],
"indices" : [ "logstash-2016.09.09" ],
"indices" : [ "logstash-2016.09.10" ],
"indices" : [ "logstash-2016.09.11" ],
:- "indices" : [ "logstash-2016.09.12" ],
- - "indices" : [ "logstash-2016.09.13" ],
-: "indices" : [ "logstash-2016.09.14" ],
- "indices" : [ "logstash-2016.09.15" ],
-: "indices" : [ "logstash-2016.09.16" ],
-- "indices" : [ "logstash-2016.09.17" ],
"indices" : [ "logstash-2016.09.18" ],
- "indices" : [ "logstash-2016.09.19" ],
-: "indices" : [ "logstash-2016.09.20" ],
-- "indices" : [ "logstash-2016.09.21" ],
: "indices" : [ "logstash-2016.09.22" ],
-- "indices" : [ "logstash-2016.09.23" ],
"indices" : [ "logstash-2016.09.24" ],
6 "indices" : [ "logstash-2016.09.25" ],
1 "indices" : [ "logstash-2016.09.26" ],
6k "indices" : [ "logstash-2016.09.27" ],
"indices" : [ "logstash-2016.09.28" ],
"indices" : [ "logstash-2016.09.29" ],
"indices" : [ "logstash-2016.09.30" ],
"indices" : [ "logstash-2016.10.01" ],
"indices" : [ "logstash-2016.10.02" ],
"indices" : [ "logstash-2016.10.03" ],
"indices" : [ "logstash-2010.11.21" ],
"indices" : [ "logstash-2013.11.14" ],
"indices" : [ "logstash-2016.10.04" ],
"indices" : [ "logstash-2016.10.05" ],What I suspect is that, somehow, one of your snapshots is still referencing those indices for some reason. This is entirely possible if the maintenance settings were only changed recently. Can I see the full output of the following command without the grep?As long as the segment is referenced by any other snapshot in the system, deleting a snapshot will not delete the referenced data.
Code: Select all
curl localhost:9200/_snapshot/Repository/_all?prettyHere it is. Thanks.mcapra wrote:From the guy who developed curator:
What I suspect is that, somehow, one of your snapshots is still referencing those indices for some reason. This is entirely possible if the maintenance settings were only changed recently. Can I see the full output of the following command without the grep?As long as the segment is referenced by any other snapshot in the system, deleting a snapshot will not delete the referenced data.
Code: Select all
curl localhost:9200/_snapshot/Repository/_all?pretty
There are likely still indices in that repository that are on the previous "14 days" setting. Since those snapshots were created when "14 days" worth of indices were open, we would expect the total number of indices to be included in this repository to be 45 + 14 (45 days worth of snapshots, 14 indices max) which is 59 minus 1 for the current days index equals 58. I counted 58 total indices in that repository, which makes sense given the previous math and accounting for an exclusion of the current day's index.Previous settings: close index after 14 days / Delete after 30 days / Delete backups after 60 days.
New settings: close index after 7 days / Delete after 15 days / Delete backups after 45 days.
Every time a snapshot is created, it contains the data of every open index within elasticsearch. So a snapshot isn't really limited to a single day; It's a snapshot of the current elasticsearch system state.CFT6Server wrote:So meaning the repository setting takes into account the current indexes as well.
That's one way to look at it, yeah. I agree the language is a bit vague in terms of how most end-users understand backups.CFT6Server wrote:So if I want to retain 45 days total and keeping the current closed index settings, I should actually use 30 days instead of 45 days.