src/dird/job.c
bool apply_wstorage_overrides(JCR *jcr, POOL *opool)
{
   const char *source;

   Dmsg1(100, "Original pool=%s\n", opool->name());
   if (jcr->cmdline_next_pool_override) {
      /* Can be Command line or User input */
      source = NPRT(jcr->next_pool_source);
   } else if (jcr->run_next_pool_override) {
      pm_strcpy(jcr->next_pool_source, _("Run NextPool override"));
      pm_strcpy(jcr->pool_source, _("Run NextPool override"));
      source = _("Run NextPool override");
   } else if (jcr->job->next_pool) {
      /* Use Job Next Pool */
      jcr->next_pool = jcr->job->next_pool;
      pm_strcpy(jcr->next_pool_source, _("Job's NextPool resource"));
      pm_strcpy(jcr->pool_source, _("Job's NextPool resource"));
      source = _("Job's NextPool resource");
   } else {
      /* Default to original pool->NextPool */
      jcr->next_pool = opool->NextPool;
      Dmsg1(100, "next_pool=%p\n", jcr->next_pool);
      if (jcr->next_pool) {
         Dmsg1(100, "Original pool next Pool = %s\n", NPRT(jcr->next_pool->name()));
      }
      pm_strcpy(jcr->next_pool_source, _("Job Pool's NextPool resource"));
      pm_strcpy(jcr->pool_source, _("Job Pool's NextPool resource"));
      source = _("Pool's NextPool resource");
   }

   /*
    * If the original backup pool has a NextPool, make sure a
    * record exists in the database.
    */
   if (jcr->next_pool) {
      jcr->jr.PoolId = get_or_create_pool_record(jcr, jcr->next_pool->name());
      if (jcr->jr.PoolId == 0) {
         return false;
      }
   }

   if (!set_mac_wstorage(NULL, jcr, jcr->pool, jcr->next_pool, source)) {
      return false;
   }

   /* Set write pool and source. Not read pool is in rpool. */
   jcr->pool = jcr->next_pool;
   pm_strcpy(jcr->pool_source, source);

   return true;
}
/*
 * Apply pool overrides to get the storage properly setup.
 */
Apply pool overrides to get the storage properly setup.
Apply pool overrides to get the storage properly setup .
bool apply_wstorage_overrides(JCR *jcr, POOL *opool)
{
   const char *source;
   Dmsg1(100, "Original pool=%s\n", opool->name());
   if (jcr->cmdline_next_pool_override) {
      source = NPRT(jcr->next_pool_source);
   } else if (jcr->run_next_pool_override) {
      pm_strcpy(jcr->next_pool_source, _("Run NextPool override"));
      pm_strcpy(jcr->pool_source, _("Run NextPool override"));
      source = _("Run NextPool override");
   } else if (jcr->job->next_pool) {
      jcr->next_pool = jcr->job->next_pool;
      pm_strcpy(jcr->next_pool_source, _("Job's NextPool resource"));
      pm_strcpy(jcr->pool_source, _("Job's NextPool resource"));
      source = _("Job's NextPool resource");
   } else {
      jcr->next_pool = opool->NextPool;
      Dmsg1(100, "next_pool=%p\n", jcr->next_pool);
      if (jcr->next_pool) {
         Dmsg1(100, "Original pool next Pool = %s\n", NPRT(jcr->next_pool->name()));
      }
      pm_strcpy(jcr->next_pool_source, _("Job Pool's NextPool resource"));
      pm_strcpy(jcr->pool_source, _("Job Pool's NextPool resource"));
      source = _("Pool's NextPool resource");
   }
   if (jcr->next_pool) {
      jcr->jr.PoolId = get_or_create_pool_record(jcr, jcr->next_pool->name());
      if (jcr->jr.PoolId == 0) {
         return false;
      }
   }
   if (!set_mac_wstorage(NULL, jcr, jcr->pool, jcr->next_pool, source)) {
      return false;
   }
   jcr->pool = jcr->next_pool;
   pm_strcpy(jcr->pool_source, source);
   return true;
}
bool apply_wstorage_overrides ( JCR * jcr , POOL * opool ) { const char * source ; Dmsg1 ( 100 , " \n " , opool -> name ( ) ) ; if ( jcr -> cmdline_next_pool_override ) { source = NPRT ( jcr -> next_pool_source ) ; } else if ( jcr -> run_next_pool_override ) { pm_strcpy ( jcr -> next_pool_source , _ ( " " ) ) ; pm_strcpy ( jcr -> pool_source , _ ( " " ) ) ; source = _ ( " " ) ; } else if ( jcr -> job -> next_pool ) { jcr -> next_pool = jcr -> job -> next_pool ; pm_strcpy ( jcr -> next_pool_source , _ ( " " ) ) ; pm_strcpy ( jcr -> pool_source , _ ( " " ) ) ; source = _ ( " " ) ; } else { jcr -> next_pool = opool -> NextPool ; Dmsg1 ( 100 , " \n " , jcr -> next_pool ) ; if ( jcr -> next_pool ) { Dmsg1 ( 100 , " \n " , NPRT ( jcr -> next_pool -> name ( ) ) ) ; } pm_strcpy ( jcr -> next_pool_source , _ ( " " ) ) ; pm_strcpy ( jcr -> pool_source , _ ( " " ) ) ; source = _ ( " " ) ; } if ( jcr -> next_pool ) { jcr -> jr . PoolId = get_or_create_pool_record ( jcr , jcr -> next_pool -> name ( ) ) ; if ( jcr -> jr . PoolId == 0 ) { return false ; } } if ( ! set_mac_wstorage ( NULL , jcr , jcr -> pool , jcr -> next_pool , source ) ) { return false ; } jcr -> pool = jcr -> next_pool ; pm_strcpy ( jcr -> pool_source , source ) ; return true ; }
Apply pool overrides to get the storage properly setup.
Apply pool overrides to get the storage properly setup .
/* Can be Command line or User input */ /* Use Job Next Pool */ /* Default to original pool->NextPool */ /*
    * If the original backup pool has a NextPool, make sure a
    * record exists in the database.
    */ /* Set write pool and source. Not read pool is in rpool. */