]> git.sur5r.net Git - bacula/bacula/commitdiff
kes Remove Encryption and Accurate lines in vbackup output -- not used.
authorKern Sibbald <kern@sibbald.com>
Sat, 13 Sep 2008 16:43:03 +0000 (16:43 +0000)
committerKern Sibbald <kern@sibbald.com>
Sat, 13 Sep 2008 16:43:03 +0000 (16:43 +0000)
kes  Fix subtle bug in vbackup by not changing DEV_RECORD packet.

git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7589 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/dird/vbackup.c
bacula/src/stored/mac.c
bacula/src/stored/read.c
bacula/src/stored/read_record.c
bacula/src/version.h
bacula/technotes-2.5

index c86a4f891eb907399a09b680c23dafdb91b0fb28..389c862d79b033c3a7a6270a19e9ad7a8d183045 100644 (file)
@@ -313,6 +313,7 @@ void vbackup_cleanup(JCR *jcr, int TermCode)
       edit_uint64(jcr->JobId, ec3));
    db_sql_query(jcr->db, query.c_str(), NULL, NULL);
 
       edit_uint64(jcr->JobId, ec3));
    db_sql_query(jcr->db, query.c_str(), NULL, NULL);
 
+   /* Get the fully updated job record */
    if (!db_get_job_record(jcr, jcr->db, &jcr->jr)) {
       Jmsg(jcr, M_WARNING, 0, _("Error getting Job record for Job report: ERR=%s"),
          db_strerror(jcr->db));
    if (!db_get_job_record(jcr, jcr->db, &jcr->jr)) {
       Jmsg(jcr, M_WARNING, 0, _("Error getting Job record for Job report: ERR=%s"),
          db_strerror(jcr->db));
@@ -419,8 +420,6 @@ void vbackup_cleanup(JCR *jcr, int TermCode)
 "  SD Files Written:       %s\n"
 "  SD Bytes Written:       %s (%sB)\n"
 "  Rate:                   %.1f KB/s\n"
 "  SD Files Written:       %s\n"
 "  SD Bytes Written:       %s (%sB)\n"
 "  Rate:                   %.1f KB/s\n"
-"  Encryption:             %s\n"
-"  Accurate:               %s\n"
 "  Volume name(s):         %s\n"
 "  Volume Session Id:      %d\n"
 "  Volume Session Time:    %d\n"
 "  Volume name(s):         %s\n"
 "  Volume Session Id:      %d\n"
 "  Volume Session Time:    %d\n"
@@ -446,8 +445,6 @@ void vbackup_cleanup(JCR *jcr, int TermCode)
         edit_uint64_with_commas(jcr->jr.JobBytes, ec3),
         edit_uint64_with_suffix(jcr->jr.JobBytes, ec4),
         kbps,
         edit_uint64_with_commas(jcr->jr.JobBytes, ec3),
         edit_uint64_with_suffix(jcr->jr.JobBytes, ec4),
         kbps,
-        jcr->Encrypt?_("yes"):_("no"),
-        jcr->accurate?_("yes"):_("no"),
         jcr->VolumeName,
         jcr->VolSessionId,
         jcr->VolSessionTime,
         jcr->VolumeName,
         jcr->VolSessionId,
         jcr->VolSessionTime,
index 965a4398a3169d43d75f0734f913d74fa8ef1d6a..08a719f35740f88d07ffb008c5d34d0dad139b4a 100644 (file)
@@ -212,7 +212,7 @@ static bool record_cb(DCR *dcr, DEV_RECORD *rec)
    case EOM_LABEL:
       return true;                    /* don't write vol labels */
    }
    case EOM_LABEL:
       return true;                    /* don't write vol labels */
    }
-   if (jcr->get_JobType() == JT_BACKUP) {
+//   if (jcr->get_JobType() == JT_BACKUP) {
       /*
        * For normal migration jobs, FileIndex values are sequential because
        *  we are dealing with one job.  However, for Vbackup (consolidation),
       /*
        * For normal migration jobs, FileIndex values are sequential because
        *  we are dealing with one job.  However, for Vbackup (consolidation),
@@ -221,7 +221,7 @@ static bool record_cb(DCR *dcr, DEV_RECORD *rec)
        *  We do so by detecting a FileIndex change and incrementing the
        *  JobFiles, which we then use as the output FileIndex.
        */
        *  We do so by detecting a FileIndex change and incrementing the
        *  JobFiles, which we then use as the output FileIndex.
        */
-      if (rec->FileIndex > 0) { 
+      if (rec->FileIndex >= 0) { 
          /* If something changed, increment FileIndex */
          if (rec->VolSessionId != rec->last_VolSessionId || 
              rec->VolSessionTime != rec->last_VolSessionTime ||
          /* If something changed, increment FileIndex */
          if (rec->VolSessionId != rec->last_VolSessionId || 
              rec->VolSessionTime != rec->last_VolSessionTime ||
@@ -233,7 +233,7 @@ static bool record_cb(DCR *dcr, DEV_RECORD *rec)
          }
          rec->FileIndex = jcr->JobFiles;     /* set sequential output FileIndex */
       }
          }
          rec->FileIndex = jcr->JobFiles;     /* set sequential output FileIndex */
       }
-   }
+//   }
    /*
     * Modify record SessionId and SessionTime to correspond to
     * output.
    /*
     * Modify record SessionId and SessionTime to correspond to
     * output.
@@ -256,10 +256,13 @@ static bool record_cb(DCR *dcr, DEV_RECORD *rec)
       }
       Dmsg2(200, "===== Wrote block new pos %u:%u\n", dev->file, dev->block_num);
    }
       }
       Dmsg2(200, "===== Wrote block new pos %u:%u\n", dev->file, dev->block_num);
    }
-   jcr->JobBytes += rec->data_len;   /* increment bytes this job */
-   if (rec->FileIndex <= 0) {
+   /* Restore packet */
+   rec->VolSessionId = rec->last_VolSessionId;
+   rec->VolSessionTime = rec->last_VolSessionTime;
+   if (rec->FileIndex < 0) {
       return true;                    /* don't send LABELs to Dir */
    }
       return true;                    /* don't send LABELs to Dir */
    }
+   jcr->JobBytes += rec->data_len;   /* increment bytes this job */
    Dmsg5(500, "wrote_record JobId=%d FI=%s SessId=%d Strm=%s len=%d\n",
       jcr->JobId,
       FI_to_ascii(buf1, rec->FileIndex), rec->VolSessionId,
    Dmsg5(500, "wrote_record JobId=%d FI=%s SessId=%d Strm=%s len=%d\n",
       jcr->JobId,
       FI_to_ascii(buf1, rec->FileIndex), rec->VolSessionId,
index 3b204a4b91865ca9512a82c592daff996ea4ccbc..aa0ae705678794ce70fffa1fd48a80af06c4628c 100644 (file)
@@ -1,7 +1,7 @@
 /*
    Bacula® - The Network Backup Solution
 
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2000-2007 Free Software Foundation Europe e.V.
+   Copyright (C) 2000-2008 Free Software Foundation Europe e.V.
 
    The main author of Bacula is Kern Sibbald, with contributions from
    many others, a complete list can be found in the file AUTHORS.
 
    The main author of Bacula is Kern Sibbald, with contributions from
    many others, a complete list can be found in the file AUTHORS.
index 2072dbcefa755001b37ae14cc60818c7134347f9..a5b97b4edac6c988d97a51549059cba114e86971 100644 (file)
@@ -54,6 +54,11 @@ static char *rec_state_to_str(DEV_RECORD *rec);
 
 static const int dbglvl = 500;
 
 
 static const int dbglvl = 500;
 
+/*
+ * This subroutine reads all the records and passes them back to your
+ *  callback routine (also mount routine at EOM).
+ * You must not change any values in the DEV_RECORD packet
+ */
 bool read_records(DCR *dcr,
        bool record_cb(DCR *dcr, DEV_RECORD *rec),
        bool mount_cb(DCR *dcr))
 bool read_records(DCR *dcr,
        bool record_cb(DCR *dcr, DEV_RECORD *rec),
        bool mount_cb(DCR *dcr))
index 90e0380474a3e4a02c5f4c3cb0d763202be0a657..679e899a3e01785a1ae3f3bfcb2afa943d75c96e 100644 (file)
@@ -4,8 +4,8 @@
 
 #undef  VERSION
 #define VERSION "2.5.3"
 
 #undef  VERSION
 #define VERSION "2.5.3"
-#define BDATE   "10 September 2008"
-#define LSMDATE "10Sep08"
+#define BDATE   "13 September 2008"
+#define LSMDATE "13Sep08"
 
 #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 8af5fabb2b8c885e7d8d36a9144f4f19c2470a43..8b756a91ff260a213d0bfc5c0b7eb60f04fbd678 100644 (file)
@@ -36,6 +36,8 @@ remove reader/writer in FOPTS????
 
 General:
 13Sep08
 
 General:
 13Sep08
+kes  Remove Encryption and Accurate lines in vbackup output -- not used.
+kes  Fix subtle bug in vbackup by not changing DEV_RECORD packet.
 kes  Add host name to items printed during dump.
 kes  Make Check File Changes default on.
 11Sep08
 kes  Add host name to items printed during dump.
 kes  Make Check File Changes default on.
 11Sep08