Jmsg(jcr, M_FATAL, 0, _("Cannot find previous jobids.\n"));
return false;
}
- Jmsg(jcr, M_INFO, 0, _("Sending Accurate information.\n"));
-
+ if (jcr->JobId) { /* display the message only for real jobs */
+ Jmsg(jcr, M_INFO, 0, _("Sending Accurate information.\n"));
+ }
/* to be able to allocate the right size for htable */
POOLMEM *nb = get_pool_memory(PM_FNAME);
*nb = 0; /* clear buffer */
extern bool do_backup(JCR *jcr);
extern void backup_cleanup(JCR *jcr, int TermCode);
extern void update_bootstrap_file(JCR *jcr);
+extern bool send_accurate_current_files(JCR *jcr);
+
/* vbackup.c */
extern bool do_vbackup_init(JCR *jcr);
goto bail_out;
}
+ /*
+ * If the job is in accurate mode, we send the list of
+ * all files to FD.
+ */
+ jcr->accurate = job->accurate;
+ if (!send_accurate_current_files(jcr)) {
+ goto bail_out;
+ }
+
bnet_fsend(jcr->file_bsock, "estimate listing=%d\n", listing);
while (bnet_recv(jcr->file_bsock) >= 0) {
ua->send_msg("%s", jcr->file_bsock->msg);
term_find_files(ff_pkt);
bail_out:
/* TODO: clean htable when this function is not reached ? */
+ accurate_free(jcr);
+ return true;
+}
+
+void accurate_free(JCR *jcr)
+{
if (jcr->file_list) {
jcr->file_list->destroy();
free(jcr->file_list);
jcr->file_list = NULL;
}
- return true;
}
static bool accurate_add_file(JCR *jcr, char *fname, char *lstat)
if (!jcr->accurate || job_canceled(jcr) || jcr->get_JobLevel()==L_FULL) {
return true;
}
-
if (sscanf(dir->msg, "accurate files=%ld", &nb) != 1) {
dir->fsend(_("2991 Bad accurate command\n"));
return false;
set_jcr_job_status(jcr, JS_Running);
set_find_options((FF_PKT *)jcr->ff, jcr->incremental, jcr->mtime);
+ /* in accurate mode, we overwrite the find_one check function */
+ if (jcr->accurate) {
+ set_find_changed_function((FF_PKT *)jcr->ff, accurate_check_file);
+ }
+
stat = find_files(jcr, (FF_PKT *)jcr->ff, tally_file, NULL);
+ accurate_free(jcr);
return stat;
}
bool accurate_send_deleted_list(JCR *jcr);
bool accurate_check_file(JCR *jcr, FF_PKT *ff_pkt);
bool accurate_mark_file_as_seen(JCR *jcr, char *fname);
+void accurate_free(JCR *jcr);
/* from backup.c */
bool encode_and_send_attributes(JCR *jcr, FF_PKT *ff_pkt, int &data_stream);
02Jul09
kes Another fix for bug #1311 to get the correct last_full_time
+ebl Make estimate command accurate compatible. Should fix #1318
01Jul09
kes Fix bug #1317 Allow duplicate jobs = no does not work
kes Eliminate double job report when do_xxx_init() returns failure