]> 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, 24 Mar 2022 08:03:00 +0000 (09:03 +0100)
commit196ef85b1fdefe5e390c2a700f210b187f46124c
tree5dd3b1c430d97071d380f6aaee82599b9bc3d70d
parent7abebe400d035fa3b14467dd18558dd77b492f13
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