]> git.ipfire.org Git - thirdparty/bacula.git/commit
Fix copy/migration job selection
authorEric Bollengier <eric@baculasystems.com>
Wed, 3 Feb 2021 15:37:37 +0000 (16:37 +0100)
committerEric Bollengier <eric@baculasystems.com>
Thu, 4 Feb 2021 14:53:35 +0000 (15:53 +0100)
commitc79970929dc00265c8a097009e44d8416199c106
treebaf3daafdc6e0f6087e6d5fe2ba95f0f62c0db28
parentc161ac8ba1dc04d59c1d41d5961675fe9cb38956
Fix copy/migration job selection

Description:
-----------

The Copy/Migration job selection with a Job name was selecting
Jobs that are already migrated. It is leading to a situation where
a new catalog record is created for the new job, but the job is not
used at the end. JobFiles=0 JobBytes=0.

In some conditions, the accurate code selects the incorrect job
record.

In the catalog, both Job records have the same attributes
(same JobTDate, same StartTime). So the selection process
was returning one or the other depending on the weather cast.

We no longer try to copy/migrate a job that is not a valid
Backup job, and we check that the Job status is T.
bacula/src/dird/mac.c
bacula/src/dird/mac_sql.c