+static void start_migration_job(JCR *jcr)
+{
+ UAContext *ua = new_ua_context(jcr);
+ char ed1[50];
+ ua->batch = true;
+ Mmsg(ua->cmd, "run %s jobid=%s", jcr->job->hdr.name,
+ edit_uint64(jcr->MigrateJobId, ed1));
+ Dmsg1(000, "=============== Migration cmd=%s\n", ua->cmd);
+ parse_ua_args(ua); /* parse command */
+// int stat = run_cmd(ua, ua->cmd);
+ int stat = (int)jcr->MigrateJobId;
+ if (stat == 0) {
+ Jmsg(jcr, M_ERROR, 0, _("Could not start migration job.\n"));
+ } else {
+ Jmsg(jcr, M_INFO, 0, _("Migration JobId %d started.\n"), stat);
+ }
+ free_ua_context(ua);
+}
+