mirror of
https://github.com/fort-nix/nix-bitcoin.git
synced 2024-11-26 08:10:41 +03:00
backups: fix for nixos 24.05
This commit is contained in:
parent
69b3d5f1b3
commit
22c1424552
@ -52,7 +52,7 @@ let
|
|||||||
# Potential backup file paths are matched against filelist
|
# Potential backup file paths are matched against filelist
|
||||||
# entries from top to bottom.
|
# entries from top to bottom.
|
||||||
# The first match determines inclusion or exclusion.
|
# The first match determines inclusion or exclusion.
|
||||||
filelist = builtins.toFile "filelist.txt" ''
|
includeFileList = builtins.toFile "filelist.txt" ''
|
||||||
${builtins.concatStringsSep "\n" cfg.extraFiles}
|
${builtins.concatStringsSep "\n" cfg.extraFiles}
|
||||||
|
|
||||||
${optionalString (!cfg.with-bulk-data) ''
|
${optionalString (!cfg.with-bulk-data) ''
|
||||||
@ -95,9 +95,7 @@ in {
|
|||||||
|
|
||||||
services.duplicity = {
|
services.duplicity = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraFlags = [
|
inherit includeFileList;
|
||||||
"--include-filelist" "${filelist}"
|
|
||||||
];
|
|
||||||
fullIfOlderThan = mkDefault "1M";
|
fullIfOlderThan = mkDefault "1M";
|
||||||
targetUrl = cfg.destination;
|
targetUrl = cfg.destination;
|
||||||
frequency = cfg.frequency;
|
frequency = cfg.frequency;
|
||||||
|
@ -355,7 +355,7 @@ def _():
|
|||||||
# Files in backup and /var/lib should be identical
|
# Files in backup and /var/lib should be identical
|
||||||
assert_matches(
|
assert_matches(
|
||||||
f"{run_duplicity} verify --archive-dir /var/lib/duplicity file:///var/lib/localBackups /var/lib",
|
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
|
# Backup should include important files
|
||||||
files = {
|
files = {
|
||||||
|
Loading…
Reference in New Issue
Block a user