return true; /* no work */
}
- create_restore_bootstrap_file(jcr);
+ if (create_restore_bootstrap_file(jcr) < 0) {
+ Jmsg(jcr, M_FATAL, 0, _("Create bootstrap file failed.\n"));
+ return false;
+ }
if (jcr->previous_jr.JobId == 0 || jcr->ExpectedFiles == 0) {
set_jcr_job_status(jcr, JS_Terminated);
{
idpkt *ids = (idpkt *)ctx;
+ /* Sanity check */
+ if (!row || !row[0]) {
+ Dmsg0(dbglevel, "dbid_hdlr error empty row\n");
+ return 1; /* stop calling us */
+ }
+
add_unique_id(ids, row[0]);
Dmsg3(dbglevel, "dbid_hdlr count=%d Ids=%p %s\n", ids->count, ids->list, ids->list);
return 0;
JobId = 0;
stat = get_next_jobid_from_list(&p, &JobId);
Dmsg3(dbglevel, "get_jobid_no=%d stat=%d JobId=%u\n", i, stat, JobId);
- jcr->MigrateJobId = JobId;
- start_migration_job(jcr);
- Dmsg0(dbglevel, "Back from start_migration_job\n");
if (stat < 0) {
Jmsg(jcr, M_FATAL, 0, _("Invalid JobId found.\n"));
goto bail_out;
Jmsg(jcr, M_INFO, 0, _("No JobIds found to %s.\n"), jcr->get_ActionName(0));
goto ok_out;
}
+ jcr->MigrateJobId = JobId;
+ start_migration_job(jcr);
+ Dmsg0(dbglevel, "Back from start_migration_job\n");
}
/* Now get the last JobId and handle it in the current job */
UAContext *ua = new_ua_context(jcr);
char ed1[50];
ua->batch = true;
- Mmsg(ua->cmd, "run %s jobid=%s", jcr->job->hdr.name,
+ Mmsg(ua->cmd, "run job=\"%s\" jobid=%s", jcr->job->name(),
edit_uint64(jcr->MigrateJobId, ed1));
Dmsg2(dbglevel, "=============== %s cmd=%s\n", jcr->get_OperationName(), ua->cmd);
parse_ua_args(ua); /* parse command */