summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/zfssnap/default.nix3
-rw-r--r--modules/zfssnap/zfssnap.py3
2 files changed, 6 insertions, 0 deletions
diff --git a/modules/zfssnap/default.nix b/modules/zfssnap/default.nix
index 1dbd7e17..451097b4 100644
--- a/modules/zfssnap/default.nix
+++ b/modules/zfssnap/default.nix
@@ -44,7 +44,10 @@ in {
44 keep = { 44 keep = {
45 within = "15m"; 45 within = "15m";
46 "5m" = "48"; 46 "5m" = "48";
47 "15m" = "32";
47 hourly = "48"; 48 hourly = "48";
49 "4h" = "24";
50 "12h" = "12";
48 daily = "62"; 51 daily = "62";
49 monthly = "-1"; 52 monthly = "-1";
50 }; 53 };
diff --git a/modules/zfssnap/zfssnap.py b/modules/zfssnap/zfssnap.py
index d524f5db..857244f1 100644
--- a/modules/zfssnap/zfssnap.py
+++ b/modules/zfssnap/zfssnap.py
@@ -115,7 +115,10 @@ def prune(config, dry_run, keep_newest):
115 ("secondly", lambda t: t.strftime('%Y-%m-%d %H:%M:%S')), 115 ("secondly", lambda t: t.strftime('%Y-%m-%d %H:%M:%S')),
116 ("minutely", lambda t: t.strftime('%Y-%m-%d %H:%M')), 116 ("minutely", lambda t: t.strftime('%Y-%m-%d %H:%M')),
117 ("5m", lambda t: (t.strftime('%Y-%m-%d %H'), floor(t.minute / 5) * 5)), 117 ("5m", lambda t: (t.strftime('%Y-%m-%d %H'), floor(t.minute / 5) * 5)),
118 ("15m", lambda t: (t.strftime('%Y-%m-%d %H'), floor(t.minute / 15) * 15)),
118 ("hourly", lambda t: t.strftime('%Y-%m-%d %H')), 119 ("hourly", lambda t: t.strftime('%Y-%m-%d %H')),
120 ("4h", lambda t: (t.strftime('%Y-%m-%d'), floor(t.hour / 4) * 4)),
121 ("12h", lambda t: (t.strftime('%Y-%m-%d'), floor(t.hour / 12) * 12)),
119 ("daily", lambda t: t.strftime('%Y-%m-%d')), 122 ("daily", lambda t: t.strftime('%Y-%m-%d')),
120 ("weekly", lambda t: t.strftime('%G-%V')), 123 ("weekly", lambda t: t.strftime('%G-%V')),
121 ("monthly", lambda t: t.strftime('%Y-%m')), 124 ("monthly", lambda t: t.strftime('%Y-%m')),