Add ZFS automatic snapshot solution

This commit is contained in:
2020-04-29 02:50:17 +02:00
parent fabf20e303
commit 0480304036
3 changed files with 42 additions and 6 deletions

33
modules/datasync.nix Normal file
View File

@@ -0,0 +1,33 @@
{ config, lib, pkgs, ... }:
{
# ZFS automatic backup solution
services.znapzend = {
enable = true;
autoCreation = true;
features = {
compressed = true;
recvu = true;
};
zetup = {
"syscea/state/root" = {
plan = "1d=>1h,1m=>1d,1y=>1m";
recursive = true;
mbuffer = true;
destinations.remote = {
host = "coolneng@zion";
dataset = "syscea/root";
};
};
"syscea/state/home" = {
plan = "1d=>1h,1m=>1d,1y=>1m";
recursive = true;
mbuffer = true;
destinations.remote = {
host = "coolneng@zion";
dataset = "syscea/home";
};
};
};
};
}