diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2022-02-23 10:03:05 +0100 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2022-02-23 10:03:05 +0100 |
commit | 2af0a1d88f73c8cd05ed071f47b5d3cdc6223051 (patch) | |
tree | 4b46f38bd0aeed7a24e51a17d5448b5261ed926c | |
parent | 33ebaa92113bfff2182c49db31537fd846f1ba98 (diff) | |
download | nixos-2af0a1d88f73c8cd05ed071f47b5d3cdc6223051.tar nixos-2af0a1d88f73c8cd05ed071f47b5d3cdc6223051.tar.gz nixos-2af0a1d88f73c8cd05ed071f47b5d3cdc6223051.tar.bz2 nixos-2af0a1d88f73c8cd05ed071f47b5d3cdc6223051.tar.xz nixos-2af0a1d88f73c8cd05ed071f47b5d3cdc6223051.zip |
zfssnap: retain weekly
-rw-r--r-- | modules/zfssnap/default.nix | 2 | ||||
-rw-r--r-- | modules/zfssnap/zfssnap.py | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/modules/zfssnap/default.nix b/modules/zfssnap/default.nix index 451097b4..d1080e8a 100644 --- a/modules/zfssnap/default.nix +++ b/modules/zfssnap/default.nix | |||
@@ -49,6 +49,8 @@ in { | |||
49 | "4h" = "24"; | 49 | "4h" = "24"; |
50 | "12h" = "12"; | 50 | "12h" = "12"; |
51 | daily = "62"; | 51 | daily = "62"; |
52 | halfweekly = "32"; | ||
53 | weekly = "24"; | ||
52 | monthly = "-1"; | 54 | monthly = "-1"; |
53 | }; | 55 | }; |
54 | }; | 56 | }; |
diff --git a/modules/zfssnap/zfssnap.py b/modules/zfssnap/zfssnap.py index 857244f1..6d9bc6de 100644 --- a/modules/zfssnap/zfssnap.py +++ b/modules/zfssnap/zfssnap.py | |||
@@ -120,6 +120,7 @@ def prune(config, dry_run, keep_newest): | |||
120 | ("4h", lambda t: (t.strftime('%Y-%m-%d'), floor(t.hour / 4) * 4)), | 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)), | 121 | ("12h", lambda t: (t.strftime('%Y-%m-%d'), floor(t.hour / 12) * 12)), |
122 | ("daily", lambda t: t.strftime('%Y-%m-%d')), | 122 | ("daily", lambda t: t.strftime('%Y-%m-%d')), |
123 | ("halfweekly", lambda t: (t.strftime('%G-%V'), floor(int(t.strftime('%u')) / 4) * 4)), | ||
123 | ("weekly", lambda t: t.strftime('%G-%V')), | 124 | ("weekly", lambda t: t.strftime('%G-%V')), |
124 | ("monthly", lambda t: t.strftime('%Y-%m')), | 125 | ("monthly", lambda t: t.strftime('%Y-%m')), |
125 | ("yearly", lambda t: t.strftime('%Y')), | 126 | ("yearly", lambda t: t.strftime('%Y')), |