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:
ryan4yin | 二花 authored and GitHub committed 2026-10-07 15:26:57 +08:00
1 parent 3694961e74
commit f5a111c638
4 files changed
+80 -10

No files matched your search

+12
View File
@@ -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 = [