src/dird/vbackup.c
bool do_vbackup_init(JCR *jcr)
{

   if (!get_or_create_fileset_record(jcr)) {
      Dmsg1(dbglevel, "JobId=%d no FileSet\n", (int)jcr->JobId);
      return false;
   }

   apply_pool_overrides(jcr);

   if (!allow_duplicate_job(jcr)) {
      return false;
   }

   jcr->jr.PoolId = get_or_create_pool_record(jcr, jcr->pool->name());
   if (jcr->jr.PoolId == 0) {
      Dmsg1(dbglevel, "JobId=%d no PoolId\n", (int)jcr->JobId);
      Jmsg(jcr, M_FATAL, 0, _("Could not get or create a Pool record.\n"));
      return false;
   }
   /*
    * Note, at this point, pool is the pool for this job.  We
    *  transfer it to rpool (read pool), and a bit later,
    *  pool will be changed to point to the write pool,
    *  which comes from pool->NextPool.
    */
   jcr->rpool = jcr->pool;            /* save read pool */
   pm_strcpy(jcr->rpool_source, jcr->pool_source);

   /* If pool storage specified, use it for virtual full */
   copy_rstorage(jcr, jcr->pool->storage, _("Pool resource"));

   Dmsg2(dbglevel, "Read pool=%s (From %s)\n", jcr->rpool->name(), jcr->rpool_source);

   jcr->start_time = time(NULL);
   jcr->jr.StartTime = jcr->start_time;
   jcr->jr.JobLevel = L_FULL;      /* we want this to appear as a Full backup */
   if (!db_update_job_start_record(jcr, jcr->db, &jcr->jr)) {
      Jmsg(jcr, M_FATAL, 0, "%s", db_strerror(jcr->db));
   }

   if (!apply_wstorage_overrides(jcr, jcr->pool)) {
      return false;
   }

   Dmsg2(dbglevel, "Write pool=%s read rpool=%s\n", jcr->pool->name(), jcr->rpool->name());

   return true;
}
/*
 * Called here before the job is run to do the job
 *   specific setup.
 */
Called here before the job is run to do the job
specific setup.
Called here before the job is run to do the job specific setup .
bool do_vbackup_init(JCR *jcr)
{
   if (!get_or_create_fileset_record(jcr)) {
      Dmsg1(dbglevel, "JobId=%d no FileSet\n", (int)jcr->JobId);
      return false;
   }
   apply_pool_overrides(jcr);
   if (!allow_duplicate_job(jcr)) {
      return false;
   }
   jcr->jr.PoolId = get_or_create_pool_record(jcr, jcr->pool->name());
   if (jcr->jr.PoolId == 0) {
      Dmsg1(dbglevel, "JobId=%d no PoolId\n", (int)jcr->JobId);
      Jmsg(jcr, M_FATAL, 0, _("Could not get or create a Pool record.\n"));
      return false;
   }
   jcr->rpool = jcr->pool;            
   pm_strcpy(jcr->rpool_source, jcr->pool_source);
   copy_rstorage(jcr, jcr->pool->storage, _("Pool resource"));
   Dmsg2(dbglevel, "Read pool=%s (From %s)\n", jcr->rpool->name(), jcr->rpool_source);
   jcr->start_time = time(NULL);
   jcr->jr.StartTime = jcr->start_time;
   jcr->jr.JobLevel = L_FULL;      
   if (!db_update_job_start_record(jcr, jcr->db, &jcr->jr)) {
      Jmsg(jcr, M_FATAL, 0, "%s", db_strerror(jcr->db));
   }
   if (!apply_wstorage_overrides(jcr, jcr->pool)) {
      return false;
   }
   Dmsg2(dbglevel, "Write pool=%s read rpool=%s\n", jcr->pool->name(), jcr->rpool->name());
   return true;
}
bool do_vbackup_init ( JCR * jcr ) { if ( ! get_or_create_fileset_record ( jcr ) ) { Dmsg1 ( dbglevel , " \n " , ( int ) jcr -> JobId ) ; return false ; } apply_pool_overrides ( jcr ) ; if ( ! allow_duplicate_job ( jcr ) ) { return false ; } jcr -> jr . PoolId = get_or_create_pool_record ( jcr , jcr -> pool -> name ( ) ) ; if ( jcr -> jr . PoolId == 0 ) { Dmsg1 ( dbglevel , " \n " , ( int ) jcr -> JobId ) ; Jmsg ( jcr , M_FATAL , 0 , _ ( " \n " ) ) ; return false ; } jcr -> rpool = jcr -> pool ; pm_strcpy ( jcr -> rpool_source , jcr -> pool_source ) ; copy_rstorage ( jcr , jcr -> pool -> storage , _ ( " " ) ) ; Dmsg2 ( dbglevel , " \n " , jcr -> rpool -> name ( ) , jcr -> rpool_source ) ; jcr -> start_time = time ( NULL ) ; jcr -> jr . StartTime = jcr -> start_time ; jcr -> jr . JobLevel = L_FULL ; if ( ! db_update_job_start_record ( jcr , jcr -> db , & jcr -> jr ) ) { Jmsg ( jcr , M_FATAL , 0 , " " , db_strerror ( jcr -> db ) ) ; } if ( ! apply_wstorage_overrides ( jcr , jcr -> pool ) ) { return false ; } Dmsg2 ( dbglevel , " \n " , jcr -> pool -> name ( ) , jcr -> rpool -> name ( ) ) ; return true ; }
Called here before the job is run to do the job
   specific setup.
Called here before the job is run to do the job specific setup .
/*
    * Note, at this point, pool is the pool for this job.  We
    *  transfer it to rpool (read pool), and a bit later,
    *  pool will be changed to point to the write pool,
    *  which comes from pool->NextPool.
    */ /* save read pool */ /* If pool storage specified, use it for virtual full */ /* we want this to appear as a Full backup */