]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Fix #9315 Save files if accurate/checksum fileset cannot be verified
authorEric Bollengier <eric@baculasystems.com>
Tue, 12 Jul 2022 15:09:47 +0000 (17:09 +0200)
committerEric Bollengier <eric@baculasystems.com>
Thu, 14 Sep 2023 11:56:58 +0000 (13:56 +0200)
Up to now, if a checksum was not available, the file was marked as
deleted.

bacula/src/filed/accurate.c

index 447aad810e2ab2aa05ac84e28aeab3ad4a900d4e..6addf5359337b8ad08723ef07b80e62150e7db44 100644 (file)
@@ -659,8 +659,8 @@ bool accurate_check_file(JCR *jcr, FF_PKT *ff_pkt)
                stat = true;
 
             } else if (ret == -1) {
-               stat = false;
-               goto bail_out;
+               // unable to check the checksum, better to backup the file
+               stat = true;
 
             } else {
                /* Checksum hasn't changed, we can backup only meta */
@@ -675,9 +675,9 @@ bool accurate_check_file(JCR *jcr, FF_PKT *ff_pkt)
          ret = check_checksum_diff(jcr, ff_pkt, &elt);
          if (ret == 1) {
             stat = true;
+
          } else if (ret == -1){
-            stat = false;
-            goto bail_out;
+            stat = true;        // We cannot check the checksum, we need to backup the file
          }
       }
    }