]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/scheduler.c
Implement MaxVirtualFullInterval
[bacula/bacula] / bacula / src / dird / scheduler.c
index f9252f809ca9b468dc4238edb14c7c6ad0a85dcd..5108142a2d3a6b11e174c063588f7ebd40278225 100644 (file)
@@ -1,17 +1,20 @@
 /*
-   Bacula® - The Network Backup Solution
+   Bacula(R) - The Network Backup Solution
 
-   Copyright (C) 2000-2014 Free Software Foundation Europe e.V.
+   Copyright (C) 2000-2015 Kern Sibbald
 
-   The main author of Bacula is Kern Sibbald, with contributions from many
-   others, a complete list can be found in the file AUTHORS.
+   The original author of Bacula is Kern Sibbald, with contributions
+   from many others, a complete list can be found in the file AUTHORS.
 
    You may use this file and others of this release according to the
    license defined in the LICENSE file, which includes the Affero General
    Public License, v3.0 ("AGPLv3") and some additional permissions and
    terms pursuant to its AGPLv3 Section 7.
 
-   Bacula® is a registered trademark of Kern Sibbald.
+   This notice must be preserved when any source code is 
+   conveyed and/or propagated.
+
+   Bacula(R) is a registered trademark of Kern Sibbald.
 */
 /*
  *
@@ -174,11 +177,11 @@ again:
    jcr = new_jcr(sizeof(JCR), dird_free_jcr);
    run = next_job->run;               /* pick up needed values */
    job = next_job->job;
-   if (job->enabled) {
-      dump_job(next_job, _("Run job"));
+   if (job->enabled && (!job->client || job->client->enabled)) {
+      dump_job(next_job, _("Run job"));  /* no client and job enabled */
    }
    free(next_job);
-   if (!job->enabled) {
+   if (!job->enabled || (job->client && !job->client->enabled)) {
       free_jcr(jcr);
       goto again;                     /* ignore this job */
    }
@@ -201,6 +204,10 @@ again:
       jcr->full_pool = run->full_pool; /* override full pool */
       jcr->run_full_pool_override = true;
    }
+   if (run->vfull_pool) {
+      jcr->vfull_pool = run->vfull_pool; /* override virtual full pool */
+      jcr->run_vfull_pool_override = true;
+   }
    if (run->inc_pool) {
       jcr->inc_pool = run->inc_pool;  /* override inc pool */
       jcr->run_inc_pool_override = true;
@@ -300,7 +307,8 @@ static void find_runs()
    LockRes();
    foreach_res(job, R_JOB) {
       sched = job->schedule;
-      if (sched == NULL || !job->enabled) { /* scheduled? or enabled? */
+      if (!sched || !job->enabled || (sched && !sched->enabled) ||
+         (job->client && !job->client->enabled)) {
          continue;                    /* no, skip this job */
       }
       Dmsg1(dbglvl, "Got job: %s\n", job->hdr.name);
@@ -434,6 +442,7 @@ static void dump_job(job_item *ji, const char *msg)
 #ifdef SCHED_DEBUG
    char dt[MAX_TIME_LENGTH];
    int64_t save_debug = debug_level;
+
    if (!chk_dbglvl(dbglvl)) {
       return;
    }