rsync.net on zfsborg: less snapshots

This commit is contained in:
Motiejus Jakštys 2024-05-02 17:41:13 +03:00
parent 1de6593d28
commit ceec1b3412
2 changed files with 12 additions and 1 deletions

View File

@ -78,6 +78,12 @@
"- gitea/data/repo-archive/" "- gitea/data/repo-archive/"
]; ];
backup_at = "*-*-* 01:00:00 UTC"; backup_at = "*-*-* 01:00:00 UTC";
prune.keep = {
within = "1d";
daily = 1;
weekly = 0;
monthly = 0;
};
} }
{ {
mountpoint = "/var/lib"; mountpoint = "/var/lib";

View File

@ -36,6 +36,10 @@ in {
type = listOf str; type = listOf str;
default = []; default = [];
}; };
prune = lib.mkOption {
type = anything;
default = {};
};
backup_at = lib.mkOption {type = str;}; backup_at = lib.mkOption {type = str;};
}; };
}); });
@ -95,7 +99,8 @@ in {
BORG_RSH = ''ssh -i "${config.mj.base.zfsborg.sshKeyPath}"''; BORG_RSH = ''ssh -i "${config.mj.base.zfsborg.sshKeyPath}"'';
}; };
} }
// lib.optionalAttrs (attrs ? patterns) {inherit (attrs) patterns;}) // lib.optionalAttrs (attrs ? patterns) {inherit (attrs) patterns;}
// lib.optionalAttrs (attrs ? prune) {inherit (attrs) prune;})
) )
dirs dirs
); );