From 6c23cbb2417895e7098d67b223c0c670e6d22241 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20B=C3=BCker?= Date: Sun, 28 Jul 2024 21:54:38 +0200 Subject: [PATCH 1/3] snapshots.py: don't log tags on fictional datetime SIDs --- common/snapshots.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/snapshots.py b/common/snapshots.py index 5ecddd6e1..e074492b8 100644 --- a/common/snapshots.py +++ b/common/snapshots.py @@ -1542,7 +1542,7 @@ def smartRemoveKeepAll(self, min_id = SID(min_date, self.config) max_id = SID(max_date, self.config) - logger.debug("Keep all >= %s and < %s" %(min_id, max_id), self) + logger.debug("Keep all >= %s and < %s" %(min_id.withoutTag, max_id.withoutTag), self) return set([sid for sid in snapshots if sid >= min_id and sid < max_id]) @@ -1570,7 +1570,7 @@ def smartRemoveKeepFirst(self, min_id = SID(min_date, self.config) max_id = SID(max_date, self.config) - logger.debug("Keep first >= %s and < %s" %(min_id, max_id), self) + logger.debug("Keep first >= %s and < %s" %(min_id.withoutTag, max_id.withoutTag), self) for sid in snapshots: # try to keep the first healthy snapshot From a207fc28e68beef41101c26ac75f0a8b4d42c5b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20B=C3=BCker?= Date: Mon, 29 Jul 2024 00:08:40 +0200 Subject: [PATCH 2/3] snapshots.py: do not lose last of the "one per week" snapshots --- common/snapshots.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/snapshots.py b/common/snapshots.py index e074492b8..e8eea0058 100644 --- a/common/snapshots.py +++ b/common/snapshots.py @@ -1691,7 +1691,7 @@ def smartRemoveList(self, keep |= self.smartRemoveKeepFirst( snapshots, d, - d + datetime.timedelta(days=8), + d + datetime.timedelta(days=7), keep_healthy=True) d -= datetime.timedelta(days=7) From 4db3981029ed0b6620fe2fd0755b16d4f11c32e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20B=C3=BCker?= Date: Mon, 29 Jul 2024 22:41:15 +0200 Subject: [PATCH 3/3] Update CHANGES --- CHANGES | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index c3a9a0492..b12e25ed7 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,6 @@ Back In Time Version 1.5.2-dev (development of upcoming release) -* .. +* Fix: Smart Remove now really keeps "one snapshot per week for n weeks" according to the setting, not just n-1 (#1094) Version 1.5.1 (2024-07-27) * Fix: Use correct port to ping SSH Proxy (#1815)