/*
Bacula® - The Network Backup Solution
- Copyright (C) 2002-2007 Free Software Foundation Europe e.V.
+ Copyright (C) 2002-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.
if (!set_migration_wstorage(jcr, jcr->pool)) {
return false;
}
+ jcr->pool = jcr->pool->NextPool;
pm_strcpy(jcr->pool_source, _("Job Pool's NextPool resource"));
Dmsg2(dbglevel, "Write pool=%s read rpool=%s\n", jcr->pool->name(), jcr->rpool->name());
((STORE *)jcr->rstorage->first())->name(),
((STORE *)jcr->wstorage->first())->name());
/* ***FIXME*** we really should simply verify that the pools are different */
+#ifdef xxx
if (((STORE *)jcr->rstorage->first())->name() == ((STORE *)jcr->wstorage->first())->name()) {
Jmsg(jcr, M_FATAL, 0, _("Read storage \"%s\" same as write storage.\n"),
((STORE *)jcr->rstorage->first())->name());
return false;
}
+#endif
/* Print Job Start message */
Jmsg(jcr, M_INFO, 0, _("Start Virtual Backup JobId %s, Job=%s\n"),
if (!unpack_attributes_record(jcr, rctx.stream, sd->msg, attr)) {
goto bail_out;
}
+#ifdef xxx
if (file_index != attr->file_index) {
Jmsg(jcr, M_FATAL, 0, _("Record header file index %ld not equal record index %ld\n"),
file_index, attr->file_index);
Dmsg0(200, "File index error\n");
goto bail_out;
}
+#endif
Dmsg3(200, "File %s\nattrib=%s\nattribsEx=%s\n", attr->fname,
attr->attr, attr->attrEx);
case L_VERIFY_DATA:
str = _("Verify Data");
break;
+ case L_VIRTUAL_FULL:
+ str = _("Virtual Full");
+ break;
case L_NONE:
str = " ";
break;
dcr->StartBlock, dcr->EndBlock,
dcr->Copy, dcr->Stripe,
edit_uint64(dcr->VolMediaId, ed1));
- Dmsg1(100, ">dird %s", dir->msg);
+ Dmsg1(100, ">dird %s", dir->msg);
if (dir->recv() <= 0) {
Dmsg0(190, "create_jobmedia error bnet_recv\n");
Jmsg(jcr, M_FATAL, 0, _("Error creating JobMedia record: ERR=%s\n"),
jcr->run_time = time(NULL);
set_start_vol_position(jcr->dcr);
+ jcr->JobFiles = 0;
ok = read_records(jcr->read_dcr, record_cb, mount_next_read_volume);
goto ok_out;
DEVICE *dev = jcr->dcr->dev;
char buf1[100], buf2[100];
int32_t stream;
- uint32_t last_VolSessionId = 0;
- uint32_t last_VolSessionTime = 0;
- int32_t last_FileIndex = 0;
+#ifdef xxx
+ Dmsg5(000, "on entry JobId=%d FI=%s SessId=%d Strm=%s len=%d\n",
+ jcr->JobId,
+ FI_to_ascii(buf1, rec->FileIndex), rec->VolSessionId,
+ stream_to_ascii(buf2, rec->Stream, rec->FileIndex), rec->data_len);
+#endif
/* If label and not for us, discard it */
if (rec->FileIndex < 0 && rec->match_stat <= 0) {
return true;
* We do so by detecting a FileIndex change and incrementing the
* JobFiles, which we then use as the output FileIndex.
*/
- if (rec->VolSessionId != last_VolSessionId ||
- rec->VolSessionTime != last_VolSessionTime ||
- (rec->FileIndex > 0 && rec->FileIndex != last_FileIndex)) {
- jcr->JobFiles++;
- last_VolSessionId = rec->VolSessionId;
- last_VolSessionTime = rec->VolSessionTime;
- last_FileIndex = rec->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 ||
+ rec->FileIndex != rec->last_FileIndex) {
+ jcr->JobFiles++;
+ rec->last_VolSessionId = rec->VolSessionId;
+ rec->last_VolSessionTime = rec->VolSessionTime;
+ rec->last_FileIndex = rec->FileIndex;
+ }
rec->FileIndex = jcr->JobFiles; /* set sequential output FileIndex */
}
}
*/
rec->VolSessionId = jcr->VolSessionId;
rec->VolSessionTime = jcr->VolSessionTime;
- Dmsg5(200, "before write_rec JobId=%d FI=%s SessId=%d Strm=%s len=%d\n",
+ Dmsg5(200, "before write JobId=%d FI=%s SessId=%d Strm=%s len=%d\n",
jcr->JobId,
FI_to_ascii(buf1, rec->FileIndex), rec->VolSessionId,
- stream_to_ascii(buf1, rec->Stream,rec->FileIndex), rec->data_len);
-
+ stream_to_ascii(buf2, rec->Stream, rec->FileIndex), rec->data_len);
while (!write_record_to_block(jcr->dcr->block, rec)) {
Dmsg4(200, "!write_record_to_block blkpos=%u:%u len=%d rem=%d\n",
dev->file, dev->block_num, rec->data_len, rec->remainder);
BSOCK *fd = jcr->file_bsock;
bool ok = true;
POOLMEM *save_msg;
+ char ec1[50], ec2[50];
if (rec->FileIndex < 0) {
return true;
}
- Dmsg5(400, "Send to FD: SessId=%u SessTim=%u FI=%d Strm=%d, len=%d\n",
- rec->VolSessionId, rec->VolSessionTime, rec->FileIndex, rec->Stream,
+ Dmsg5(400, "Send to FD: SessId=%u SessTim=%u FI=%s Strm=%s, len=%d\n",
+ rec->VolSessionId, rec->VolSessionTime,
+ FI_to_ascii(ec1, rec->FileIndex),
+ stream_to_ascii(ec2, rec->Stream, rec->FileIndex),
rec->data_len);
/* Send record header to File daemon */
#undef VERSION
#define VERSION "2.5.3"
-#define BDATE "29 Aug 2008"
-#define LSMDATE "29Aug08"
+#define BDATE "30 Aug 2008"
+#define LSMDATE "30Aug08"
#define PROG_COPYRIGHT "Copyright (C) %d-2008 Free Software Foundation Europe e.V.\n"
#define BYEAR "2008" /* year for copyright messages in progs */
General:
+30Aug08
+kes Another try at fixing Vbackup. It looks much better this time.
+ Disable file index sanity check in FD with value stored in
+ attributes record because with Vbackup the File Index gets
+ changed, but not the attributes record.
+ Enhance some debug code.
+ Fix handling of re-indexing records that are copied in Vbackup.
29Aug08
+kes Made level_to_str() know about Virtual backup.
+kes Set correct Virtual backup write pool.
kes Fix compile warning in new dbcheck port code.
kes Fix migration code broken by previous virtual backup fix.
28Aug08