From: Eric Bollengier Date: Fri, 4 Nov 2022 10:42:05 +0000 (+0100) Subject: Fix #9614 Re-create Jobs with bscan only if the bootstrap is matching X-Git-Tag: Release-13.0.2~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=99b643ba82f11c7a8c9c04075a4ebaf209de39b6;p=thirdparty%2Fbacula.git Fix #9614 Re-create Jobs with bscan only if the bootstrap is matching --- diff --git a/bacula/src/stored/bscan.c b/bacula/src/stored/bscan.c index 21dcceee6..8811d90ec 100644 --- a/bacula/src/stored/bscan.c +++ b/bacula/src/stored/bscan.c @@ -550,6 +550,13 @@ static bool record_cb(DCR *dcr, DEV_RECORD *rec) break; case SOS_LABEL: + if (bsr && rec->match_stat < 1) { + /* Skipping record, because does not match BSR filter and we don't want to + * create job records outside of the BSR specifications + */ + break; + } + mr.VolJobs++; num_jobs++; if (ignored_msgs > 0) { @@ -629,6 +636,13 @@ static bool record_cb(DCR *dcr, DEV_RECORD *rec) break; case EOS_LABEL: + if (bsr && rec->match_stat < 1) { + /* Skipping record, because does not match BSR filter and we don't want to + * create job records outside of the BSR specifications + */ + break; + } + unser_session_label(&elabel, rec); /* Create FileSet record */