backups: exclude bitcoind, liquidd txindex data

This commit is contained in:
Erik Arvstedt 2021-10-05 21:44:57 +02:00
parent 0853dedc43
commit 0c45415c86
No known key found for this signature in database
GPG Key ID: 33312B944DD97846

View File

@ -41,13 +41,19 @@ let
cfg = config.services.backups; cfg = config.services.backups;
filelist = pkgs.writeText "filelist.txt" '' filelist = pkgs.writeText "filelist.txt" ''
${optionalString (!cfg.with-bulk-data) "- ${config.services.bitcoind.dataDir}/blocks"} ${optionalString (!cfg.with-bulk-data) ''
${optionalString (!cfg.with-bulk-data) "- ${config.services.bitcoind.dataDir}/chainstate"} - ${config.services.bitcoind.dataDir}/blocks
- ${config.services.bitcoind.dataDir}/chainstate
- ${config.services.bitcoind.dataDir}/indexes
''}
${config.services.bitcoind.dataDir} ${config.services.bitcoind.dataDir}
${config.services.clightning.dataDir} ${config.services.clightning.dataDir}
${config.services.lnd.dataDir} ${config.services.lnd.dataDir}
${optionalString (!cfg.with-bulk-data) "- ${config.services.liquidd.dataDir}/*/blocks"} ${optionalString (!cfg.with-bulk-data) ''
${optionalString (!cfg.with-bulk-data) "- ${config.services.liquidd.dataDir}/*/chainstate"} - ${config.services.liquidd.dataDir}/*/blocks
- ${config.services.liquidd.dataDir}/*/chainstate
- ${config.services.liquidd.dataDir}/*/indexes
''}
${config.services.liquidd.dataDir} ${config.services.liquidd.dataDir}
${optionalString cfg.with-bulk-data "${config.services.electrs.dataDir}"} ${optionalString cfg.with-bulk-data "${config.services.electrs.dataDir}"}
${config.services.nbxplorer.dataDir} ${config.services.nbxplorer.dataDir}