]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/job.c
Minor tweaks to Migration
[bacula/bacula] / bacula / src / dird / job.c
index 1da8057ab430c8f1f22dab713e47943e3867c158..b028ca95d1bc55f94a990f2e2019387792b7ecc0 100644 (file)
@@ -240,12 +240,13 @@ static void *job_thread(void *arg)
       Jmsg(jcr, M_FATAL, 0, "%s", db_strerror(jcr->db));
    }
 
+   /* Run any script BeforeJob on dird */
+   run_scripts(jcr, jcr->job->RunScripts, "BeforeJob");
+
    if (job_canceled(jcr)) {
       update_job_end_record(jcr);
-   } else {
-      /* Run any script BeforeJob on dird */
-      run_scripts(jcr, jcr->job->RunScripts, "BeforeJob");
 
+   } else {
       /*
        * We re-update the job start record so that the start
        *  time is set after the run before job.  This avoids
@@ -688,7 +689,11 @@ bool get_or_create_fileset_record(JCR *jcr)
       unsigned char digest[MD5HashSize];
       memcpy(&md5c, &jcr->fileset->md5c, sizeof(md5c));
       MD5Final(digest, &md5c);
-      bin_to_base64(fsr.MD5, sizeof(fsr.MD5), (char *)digest, MD5HashSize, true);
+      /*
+       * Keep the flag (last arg) set to false otherwise old FileSets will
+       * get new MD5 sums and the user will get Full backups on everything
+       */
+      bin_to_base64(fsr.MD5, sizeof(fsr.MD5), (char *)digest, MD5HashSize, false);
       bstrncpy(jcr->fileset->MD5, fsr.MD5, sizeof(jcr->fileset->MD5));
    } else {
       Jmsg(jcr, M_WARNING, 0, _("FileSet MD5 digest not found.\n"));