Unverified Commit 4a0ff694 authored by Donovan Glover's avatar Donovan Glover Committed by GitHub
Browse files

nixos/restic: unlock database before doing pruning (#387116)

parents 8de1cdaf 138abab4
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -195,6 +195,7 @@ in
                Extra arguments passed to restic backup.
              '';
              example = [
                "--cleanup-cache"
                "--exclude-file=/etc/nixos/restic-ignore"
              ];
            };
@@ -352,6 +353,7 @@ in
        filesFromTmpFile = "/run/restic-backups-${name}/includes";
        doBackup = (backup.dynamicFilesFrom != null) || (backup.paths != null && backup.paths != [ ]);
        pruneCmd = lib.optionals (builtins.length backup.pruneOpts > 0) [
          (resticCmd + " unlock")
          (resticCmd + " forget --prune " + (lib.concatStringsSep " " backup.pruneOpts))
        ];
        checkCmd = lib.optionals backup.runCheck [