From 45267a6a1bd2ba3fc82449fa27d6fd8b6893c91a Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sat, 13 Sep 2008 16:43:03 +0000 Subject: [PATCH] kes Remove Encryption and Accurate lines in vbackup output -- not used. 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 | 5 +---- bacula/src/stored/mac.c | 13 ++++++++----- bacula/src/stored/read.c | 2 +- bacula/src/stored/read_record.c | 5 +++++ bacula/src/version.h | 4 ++-- bacula/technotes-2.5 | 2 ++ 6 files changed, 19 insertions(+), 12 deletions(-) diff --git a/bacula/src/dird/vbackup.c b/bacula/src/dird/vbackup.c index c86a4f891e..389c862d79 100644 --- a/bacula/src/dird/vbackup.c +++ b/bacula/src/dird/vbackup.c @@ -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); + /* 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)); @@ -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" -" Encryption: %s\n" -" Accurate: %s\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, - jcr->Encrypt?_("yes"):_("no"), - jcr->accurate?_("yes"):_("no"), jcr->VolumeName, jcr->VolSessionId, jcr->VolSessionTime, diff --git a/bacula/src/stored/mac.c b/bacula/src/stored/mac.c index 965a4398a3..08a719f357 100644 --- a/bacula/src/stored/mac.c +++ b/bacula/src/stored/mac.c @@ -212,7 +212,7 @@ static bool record_cb(DCR *dcr, DEV_RECORD *rec) 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), @@ -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. */ - if (rec->FileIndex > 0) { + if (rec->FileIndex >= 0) { /* 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 */ } - } +// } /* * 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); } - 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 */ } + 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, diff --git a/bacula/src/stored/read.c b/bacula/src/stored/read.c index 3b204a4b91..aa0ae70567 100644 --- a/bacula/src/stored/read.c +++ b/bacula/src/stored/read.c @@ -1,7 +1,7 @@ /* 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. diff --git a/bacula/src/stored/read_record.c b/bacula/src/stored/read_record.c index 2072dbcefa..a5b97b4eda 100644 --- a/bacula/src/stored/read_record.c +++ b/bacula/src/stored/read_record.c @@ -54,6 +54,11 @@ static char *rec_state_to_str(DEV_RECORD *rec); 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)) diff --git a/bacula/src/version.h b/bacula/src/version.h index 90e0380474..679e899a3e 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -4,8 +4,8 @@ #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 */ diff --git a/bacula/technotes-2.5 b/bacula/technotes-2.5 index 8af5fabb2b..8b756a91ff 100644 --- a/bacula/technotes-2.5 +++ b/bacula/technotes-2.5 @@ -36,6 +36,8 @@ remove reader/writer in FOPTS???? 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 -- 2.39.5