nixos/restic: Use cat config command in pre-start command for repo initialization
check, per upstream recommendation in https://github.com/restic/restic/issues/1690 This is to prevent logs from becoming unwieldy with large repo listings.
This commit is contained in:
@@ -346,7 +346,7 @@ in
|
||||
${pkgs.writeScript "backupPrepareCommand" backup.backupPrepareCommand}
|
||||
''}
|
||||
${optionalString (backup.initialize) ''
|
||||
${resticCmd} snapshots || ${resticCmd} init
|
||||
${resticCmd} cat config > /dev/null || ${resticCmd} init
|
||||
''}
|
||||
${optionalString (backup.paths != null && backup.paths != []) ''
|
||||
cat ${pkgs.writeText "staticPaths" (concatStringsSep "\n" backup.paths)} >> ${filesFromTmpFile}
|
||||
|
||||
Reference in New Issue
Block a user