backups: allow extraFiles to override default settings
By moving them to the top they take precedence over the remaining filelist entries.
This commit is contained in:
parent
0c45415c86
commit
6d694a6269
@ -40,7 +40,12 @@ let
|
||||
|
||||
cfg = config.services.backups;
|
||||
|
||||
filelist = pkgs.writeText "filelist.txt" ''
|
||||
# Potential backup file paths are are matched against filelist
|
||||
# entries from top to bottom.
|
||||
# The first match determines inclusion or exclusion.
|
||||
filelist = builtins.toFile "filelist.txt" ''
|
||||
${builtins.concatStringsSep "\n" cfg.extraFiles}
|
||||
|
||||
${optionalString (!cfg.with-bulk-data) ''
|
||||
- ${config.services.bitcoind.dataDir}/blocks
|
||||
- ${config.services.bitcoind.dataDir}/chainstate
|
||||
@ -65,9 +70,6 @@ let
|
||||
|
||||
${builtins.concatStringsSep "\n" postgresqlBackupPaths}
|
||||
|
||||
# Extra files
|
||||
${builtins.concatStringsSep "\n" cfg.extraFiles}
|
||||
|
||||
# Exclude all unspecified files and directories
|
||||
- /
|
||||
'';
|
||||
|
Loading…
Reference in New Issue
Block a user