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
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));
" 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"
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,
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),
* 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 ||
}
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.
}
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,
/*
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.
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))
#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 */
+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