mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-11-20 14:31:28 +01:00
feat(backup): hourly read-only snapshots and per-backup integrity checks (#402)
* feat(restic): verify the repository after each backup * feat(youko): snapshot the restic store hourly * docs(backup): document the snapshot and check layers
This commit is contained in:
1 parent
3694961e74
commit
f5a111c638
4 files changed
+80
-10
No files matched your search
@@ -133,6 +133,17 @@ in
|
||||
after uploading).
|
||||
'';
|
||||
};
|
||||
|
||||
checkOpts = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = [ "--read-data-subset=1/20" ];
|
||||
description = ''
|
||||
Arguments for `restic check`, run after each backup. Non-empty enables
|
||||
the check. The default reads 5% of the pack data as a fraction rather
|
||||
than `5%`, so systemd does not treat the percent as a specifier; set
|
||||
to `[ ]` to disable, or `--read-data` for a full read.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
@@ -168,6 +179,7 @@ in
|
||||
};
|
||||
|
||||
inherit (cfg) pruneOpts;
|
||||
inherit (cfg) checkOpts;
|
||||
}
|
||||
// lib.optionalAttrs (cfg.excludeLargerThan != null) {
|
||||
extraBackupArgs = [
|
||||
|
||||
Reference in new issue
Block a user