backups: fix for nixos 24.05

This commit is contained in:
Erik Arvstedt 2024-07-18 20:56:48 +02:00
parent 69b3d5f1b3
commit 22c1424552
No known key found for this signature in database
GPG Key ID: 33312B944DD97846
2 changed files with 3 additions and 5 deletions

View File

@ -52,7 +52,7 @@ let
# Potential backup file paths are matched against filelist
# entries from top to bottom.
# The first match determines inclusion or exclusion.
filelist = builtins.toFile "filelist.txt" ''
includeFileList = builtins.toFile "filelist.txt" ''
${builtins.concatStringsSep "\n" cfg.extraFiles}
${optionalString (!cfg.with-bulk-data) ''
@ -95,9 +95,7 @@ in {
services.duplicity = {
enable = true;
extraFlags = [
"--include-filelist" "${filelist}"
];
inherit includeFileList;
fullIfOlderThan = mkDefault "1M";
targetUrl = cfg.destination;
frequency = cfg.frequency;

View File

@ -355,7 +355,7 @@ def _():
# Files in backup and /var/lib should be identical
assert_matches(
f"{run_duplicity} verify --archive-dir /var/lib/duplicity file:///var/lib/localBackups /var/lib",
"0 differences found",
"no sync needed",
)
# Backup should include important files
files = {