]> git.sur5r.net Git - bacula/bacula/commitdiff
Apply Max Full Age patch submitted by Scott Bailey
authorKern Sibbald <kern@sibbald.com>
Sun, 17 Feb 2008 12:33:42 +0000 (12:33 +0000)
committerKern Sibbald <kern@sibbald.com>
Sun, 17 Feb 2008 12:33:42 +0000 (12:33 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6437 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/AUTHORS
bacula/ReleaseNotes
bacula/src/dird/dird_conf.c
bacula/src/dird/dird_conf.h
bacula/src/dird/fd_cmds.c
bacula/src/version.h
bacula/technotes-2.3

index 79964805d0fefcd28800dbb5870f784326b0ace0..20218a0852adef16071917634ff8e3e0c6f37a6a 100644 (file)
@@ -81,6 +81,7 @@ Richard Mortimer
 Robert Nelson
 Rudolf Cejka
 Russel Howe
 Robert Nelson
 Rudolf Cejka
 Russel Howe
+Scott Bailey
 Sergey Svishchev
 Thomas Glatthor                          
 Thorsten Enge
 Sergey Svishchev
 Thomas Glatthor                          
 Thorsten Enge
index 7be316919feeafcb20d2d81bed306860401d4b2a..2a434bb4dc339c814bd6c40c7f991a924350dc42 100644 (file)
@@ -1,7 +1,7 @@
 
           Release Notes for Bacula 2.2.2 
 
 
           Release Notes for Bacula 2.2.2 
 
-  Bacula code: Total files = 520 Total lines = 195,550 (*.h *.c *.in)
+  Bacula code: Total files = 506 Total lines = 190,209 (*.h *.c *.in)
   82 new files, 41,221 new lines of code, 208,380 lines of change from 2.0.3
 
 This Director and Storage daemon must be upgraded at the same time,
   82 new files, 41,221 new lines of code, 208,380 lines of change from 2.0.3
 
 This Director and Storage daemon must be upgraded at the same time,
index b9d5ab159171a66edf3278899ca80e3b8120e742..e85d1895613e624e9fbd60c462b998e4c2a7d4f7 100644 (file)
@@ -293,6 +293,7 @@ RES_ITEM job_items[] = {
    {"differentialmaxwaittime",  store_time, ITEM(res_job.DiffMaxWaitTime), 0, 0, 0},
    {"maxwaittime",  store_time, ITEM(res_job.MaxWaitTime), 0, 0, 0},
    {"maxstartdelay",store_time, ITEM(res_job.MaxStartDelay), 0, 0, 0},
    {"differentialmaxwaittime",  store_time, ITEM(res_job.DiffMaxWaitTime), 0, 0, 0},
    {"maxwaittime",  store_time, ITEM(res_job.MaxWaitTime), 0, 0, 0},
    {"maxstartdelay",store_time, ITEM(res_job.MaxStartDelay), 0, 0, 0},
+   {"maxfullage",  store_time, ITEM(res_job.MaxFullAge), 0, 0, 0},
    {"jobretention", store_time, ITEM(res_job.JobRetention),  0, 0, 0},
    {"prefixlinks", store_bool, ITEM(res_job.PrefixLinks), 0, ITEM_DEFAULT, false},
    {"prunejobs",   store_bool, ITEM(res_job.PruneJobs), 0, ITEM_DEFAULT, false},
    {"jobretention", store_time, ITEM(res_job.JobRetention),  0, 0, 0},
    {"prefixlinks", store_bool, ITEM(res_job.PrefixLinks), 0, ITEM_DEFAULT, false},
    {"prunejobs",   store_bool, ITEM(res_job.PruneJobs), 0, ITEM_DEFAULT, false},
index cdd0f0e87122dbcaff29e726579f0c90354d4418..dc7be31305cadac0f46f0c8a42a3666a7ebec828 100644 (file)
@@ -385,6 +385,7 @@ public:
    utime_t MaxStartDelay;             /* max start delay in seconds */
    utime_t RescheduleInterval;        /* Reschedule interval */
    utime_t JobRetention;              /* job retention period in seconds */
    utime_t MaxStartDelay;             /* max start delay in seconds */
    utime_t RescheduleInterval;        /* Reschedule interval */
    utime_t JobRetention;              /* job retention period in seconds */
+   utime_t MaxFullAge;                /* Max age of full to avoid upgrade */
    uint32_t MaxConcurrentJobs;        /* Maximum concurrent jobs */
    int64_t spool_size;                /* Size of spool file for this job */
    int RescheduleTimes;               /* Number of times to reschedule job */
    uint32_t MaxConcurrentJobs;        /* Maximum concurrent jobs */
    int64_t spool_size;                /* Size of spool file for this job */
    int RescheduleTimes;               /* Number of times to reschedule job */
index ffe312c16d7ddaf070ace2c2f5d624af82cce50c..cdb1632562ad6909f4e11f91c02a712600046deb 100644 (file)
@@ -161,6 +161,8 @@ int connect_to_file_daemon(JCR *jcr, int retry_interval, int max_retry_time,
 void get_level_since_time(JCR *jcr, char *since, int since_len)
 {
    int JobLevel;
 void get_level_since_time(JCR *jcr, char *since, int since_len)
 {
    int JobLevel;
+   bool FullOk;
+   utime_t now, LastFull;
 
    since[0] = 0;
    /* If job cloned and a since time already given, use it */
 
    since[0] = 0;
    /* If job cloned and a since time already given, use it */
@@ -182,8 +184,15 @@ void get_level_since_time(JCR *jcr, char *since, int since_len)
    case L_INCREMENTAL:
       /* Look up start time of last job */
       jcr->jr.JobId = 0;     /* flag for db_find_job_start time */
    case L_INCREMENTAL:
       /* Look up start time of last job */
       jcr->jr.JobId = 0;     /* flag for db_find_job_start time */
-      if (!db_find_job_start_time(jcr, jcr->db, &jcr->jr, &jcr->stime)) {
-         /* No job found, so upgrade this one to Full */
+      FullOk = db_find_job_start_time(jcr, jcr->db, &jcr->jr, &jcr->stime);
+      /* If there was a successful job, make sure it is recent enough */
+      if (FullOk && jcr->job->MaxFullAge > 0) {
+         now = btime_to_utime(get_current_btime());
+         LastFull = str_to_utime(jcr->stime);
+         FullOk = ((now - LastFull) < jcr->job->MaxFullAge);
+      }
+      if (!FullOk) {
+         /* No recent job found, so upgrade this one to Full */
          Jmsg(jcr, M_INFO, 0, "%s", db_strerror(jcr->db));
          Jmsg(jcr, M_INFO, 0, _("No prior or suitable Full backup found in catalog. Doing FULL backup.\n"));
          bsnprintf(since, since_len, _(" (upgraded from %s)"),
          Jmsg(jcr, M_INFO, 0, "%s", db_strerror(jcr->db));
          Jmsg(jcr, M_INFO, 0, _("No prior or suitable Full backup found in catalog. Doing FULL backup.\n"));
          bsnprintf(since, since_len, _(" (upgraded from %s)"),
index 0d9c0aa918ddeb55216121731d5d0e8662212a88..b905abc8105039d98b107d4b02df8a412cc84e2d 100644 (file)
@@ -4,8 +4,8 @@
 
 #undef  VERSION
 #define VERSION "2.3.10"
 
 #undef  VERSION
 #define VERSION "2.3.10"
-#define BDATE   "14 February 2008"
-#define LSMDATE "14Feb08"
+#define BDATE   "16 February 2008"
+#define LSMDATE "16Feb08"
 
 #define PROG_COPYRIGHT "Copyright (C) %d-2008 Free Software Foundation Europe e.V.\n"
 #define BYEAR "2008"       /* year for copyright messages in progs */
 
 #define PROG_COPYRIGHT "Copyright (C) %d-2008 Free Software Foundation Europe e.V.\n"
 #define BYEAR "2008"       /* year for copyright messages in progs */
index f5a2d068016e6d6ab7bd203bef32c6295028c568..98179c93343075bae4049927946ce880dc10ec8f 100644 (file)
@@ -3,6 +3,9 @@
 General:
 17Feb08
 kes  Plugin debug code + tweak a couple bat dialog layouts
 General:
 17Feb08
 kes  Plugin debug code + tweak a couple bat dialog layouts
+16Feb08
+kes  Apply Max Full Age patch submitted by Scott Bailey 
+     <scott dot bailey at eds dot com>
 14Feb08
 kes  Fix creating first JobMedia record during Migration to include
      proper index. This caused slow restores of migrated jobs.
 14Feb08
 kes  Fix creating first JobMedia record during Migration to include
      proper index. This caused slow restores of migrated jobs.