summaryrefslogtreecommitdiff
path: root/modules/zfssnap/zfssnap.py
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-02-23 09:34:00 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2022-02-23 09:34:00 +0100
commit33ebaa92113bfff2182c49db31537fd846f1ba98 (patch)
tree2b9d19edfba9b34e6cca8134d31a5f030b5247c5 /modules/zfssnap/zfssnap.py
parent8d26c87292538f6f2b6ecc9e186926922d878cce (diff)
downloadnixos-33ebaa92113bfff2182c49db31537fd846f1ba98.tar
nixos-33ebaa92113bfff2182c49db31537fd846f1ba98.tar.gz
nixos-33ebaa92113bfff2182c49db31537fd846f1ba98.tar.bz2
nixos-33ebaa92113bfff2182c49db31537fd846f1ba98.tar.xz
nixos-33ebaa92113bfff2182c49db31537fd846f1ba98.zip
zfssnap: smoother frequency transition
Diffstat (limited to 'modules/zfssnap/zfssnap.py')
-rw-r--r--modules/zfssnap/zfssnap.py3
1 files changed, 3 insertions, 0 deletions
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')),