2 This patch should help prevent jobs from being migrated twice if
3 you happen to run two migration jobs at the same time. This should
4 fix or improve the problem reported in bug #1129.
5 Apply it to version 2.4.1 with:
8 patch -p0 <2.4.1-migration.patch
9 ./configure <your-options>
16 Index: src/dird/migrate.c
17 ===================================================================
18 --- src/dird/migrate.c (revision 7433)
19 +++ src/dird/migrate.c (working copy)
22 Bacula® - The Network Backup Solution
24 - Copyright (C) 2004-2007 Free Software Foundation Europe e.V.
25 + Copyright (C) 2004-2008 Free Software Foundation Europe e.V.
27 The main author of Bacula is Kern Sibbald, with contributions from
28 many others, a complete list can be found in the file AUTHORS.
33 + if (!db_get_job_record(jcr, jcr->db, &jcr->previous_jr)) {
34 + Jmsg(jcr, M_FATAL, 0, _("Could not get job record for JobId %s to migrate. ERR=%s"),
35 + edit_int64(jcr->previous_jr.JobId, ed1),
36 + db_strerror(jcr->db));
37 + set_jcr_job_status(jcr, JS_Terminated);
38 + migration_cleanup(jcr, jcr->JobStatus);
41 + /* Make sure this job was not already migrated */
42 + if (jcr->previous_jr.JobType != JT_BACKUP) {
43 + set_jcr_job_status(jcr, JS_Terminated);
44 + migration_cleanup(jcr, jcr->JobStatus);
48 /* Print Job Start message */
49 Jmsg(jcr, M_INFO, 0, _("Start Migration JobId %s, Job=%s\n"),
50 edit_uint64(jcr->JobId, ed1), jcr->Job);