src/dird/mac.c
void start_mac_job(JCR *jcr)
{
   UAContext *ua = new_ua_context(jcr);
   char ed1[50];
   char args[MAX_NAME_LENGTH + 50];

   ua->batch = true;
   Mmsg(ua->cmd, "run job=\"%s\" jobid=%s ignoreduplicatecheck=yes pool=\"%s\"",
        jcr->job->name(), edit_uint64(jcr->MigrateJobId, ed1),
        jcr->pool->name());
   if (jcr->next_pool) {
      bsnprintf(args, sizeof(args), " nextpool=\"%s\"", jcr->next_pool->name());
      pm_strcat(ua->cmd, args);
   }
   Dmsg2(dbglevel, "=============== %s cmd=%s\n", jcr->get_OperationName(), ua->cmd);
   parse_ua_args(ua);                 /* parse command */
   JobId_t jobid = run_cmd(ua, ua->cmd);
   if (jobid == 0) {
      Jmsg(jcr, M_ERROR, 0, _("Could not start migration/copy job.\n"));
   } else {
      Jmsg(jcr, M_INFO, 0, _("%s JobId %d started.\n"), jcr->get_OperationName(), (int)jobid);
   }
   free_ua_context(ua);
}
/*
 * Called from mac_sql.c for each migration/copy job to start
 */
Called from mac_sql.c for each migration/copy job to start
Called from mac_sql . c for each migration / copy job to start
void start_mac_job(JCR *jcr)
{
   UAContext *ua = new_ua_context(jcr);
   char ed1[50];
   char args[MAX_NAME_LENGTH + 50];
   ua->batch = true;
   Mmsg(ua->cmd, "run job=\"%s\" jobid=%s ignoreduplicatecheck=yes pool=\"%s\"",
        jcr->job->name(), edit_uint64(jcr->MigrateJobId, ed1),
        jcr->pool->name());
   if (jcr->next_pool) {
      bsnprintf(args, sizeof(args), " nextpool=\"%s\"", jcr->next_pool->name());
      pm_strcat(ua->cmd, args);
   }
   Dmsg2(dbglevel, "=============== %s cmd=%s\n", jcr->get_OperationName(), ua->cmd);
   parse_ua_args(ua);                 
   JobId_t jobid = run_cmd(ua, ua->cmd);
   if (jobid == 0) {
      Jmsg(jcr, M_ERROR, 0, _("Could not start migration/copy job.\n"));
   } else {
      Jmsg(jcr, M_INFO, 0, _("%s JobId %d started.\n"), jcr->get_OperationName(), (int)jobid);
   }
   free_ua_context(ua);
}
void start_mac_job ( JCR * jcr ) { UAContext * ua = new_ua_context ( jcr ) ; char ed1 [ 50 ] ; char args [ MAX_NAME_LENGTH + 50 ] ; ua -> batch = true ; Mmsg ( ua -> cmd , " \" \" \" \" " , jcr -> job -> name ( ) , edit_uint64 ( jcr -> MigrateJobId , ed1 ) , jcr -> pool -> name ( ) ) ; if ( jcr -> next_pool ) { bsnprintf ( args , sizeof ( args ) , " \" \" " , jcr -> next_pool -> name ( ) ) ; pm_strcat ( ua -> cmd , args ) ; } Dmsg2 ( dbglevel , " \n " , jcr -> get_OperationName ( ) , ua -> cmd ) ; parse_ua_args ( ua ) ; JobId_t jobid = run_cmd ( ua , ua -> cmd ) ; if ( jobid == 0 ) { Jmsg ( jcr , M_ERROR , 0 , _ ( " \n " ) ) ; } else { Jmsg ( jcr , M_INFO , 0 , _ ( " \n " ) , jcr -> get_OperationName ( ) , ( int ) jobid ) ; } free_ua_context ( ua ) ; }
Called from mac_sql.c for each migration/copy job to start
Called from mac_sql . c for each migration / copy job to start
/* parse command */