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
run_scripts(jcr, jcr->job->RunScripts, "AfterJob");
/* Send off any queued messages */
- if (jcr->msg_queue->size() > 0) {
+ if (jcr->msg_queue && jcr->msg_queue->size() > 0) {
dequeue_messages(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"));