From 1bef32dcf203f69c23b5bbff65de65626687d9fc Mon Sep 17 00:00:00 2001 From: coolneng Date: Sat, 20 Jun 2020 02:00:59 +0200 Subject: [PATCH] Enable ZFS automatic snapshotting --- modules/datasync.nix | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/modules/datasync.nix b/modules/datasync.nix index 688e8d3..d2a66f1 100644 --- a/modules/datasync.nix +++ b/modules/datasync.nix @@ -77,4 +77,33 @@ ''; }; + # ZFS automatic snapshotting + services.znapzend = { + enable = true; + autoCreation = true; + features = { + compressed = true; + recvu = true; + }; + zetup = { + "vault/backups" = { + plan = "1day=>1hour,1month=>1day,1year=>1month"; + recursive = true; + mbuffer.enable = true; + }; + + "vault/syncthing" = { + plan = "1hour=>15min,1day=>15min,1month=>1day,1year=>1month"; + recursive = true; + mbuffer.enable = true; + }; + + "vault/git" = { + plan = "1hour=>15min,1day=>1hour,1month=>1day,1year=>1month"; + recursive = true; + mbuffer.enable = true; + }; + }; + }; + }