return true;
}
- /* For incomplete Jobs, we add our own id */
- if (jcr->incomplete) {
- edit_int64(jcr->JobId, ed1);
- jobids.add(ed1);
- }
-
if (jcr->is_JobLevel(L_FULL)) {
/* On Full mode, if no previous base job, no accurate things */
- if (!get_base_jobids(jcr, &jobids) && !jcr->incomplete) {
+ if (get_base_jobids(jcr, &jobids)) {
+ jcr->HasBase = true;
+ Jmsg(jcr, M_INFO, 0, _("Using BaseJobId(s): %s\n"), jobids.list);
+ } else if (!jcr->incomplete) {
return true;
}
- jcr->HasBase = true;
- Jmsg(jcr, M_INFO, 0, _("Using BaseJobId(s): %s\n"), jobids.list);
-
} else {
/* For Incr/Diff level, we search for older jobs */
db_accurate_get_jobids(jcr, jcr->db, &jcr->jr, &jobids);
}
}
+ /* For incomplete Jobs, we add our own id */
+ if (jcr->incomplete) {
+ edit_int64(jcr->JobId, ed1);
+ jobids.add(ed1);
+ }
+
/* Don't send and store the checksum if fileset doesn't require it */
jcr->use_accurate_chksum = is_checksum_needed_by_fileset(jcr);
if (jcr->incomplete) {
edit_int64(jcr->JobId, ed1);
Mmsg(buf, "SELECT max(FileIndex) FROM File WHERE JobId=%s", ed1);
- if (!db_sql_query(jcr->db, buf.c_str(), db_int64_handler, &job)) {
+ if (db_sql_query(jcr->db, buf.c_str(), db_int64_handler, &job)) {
+ Jmsg(jcr, M_INFO, 0, _("Found %ld files from prior incomplete Job.\n"),
+ (int32_t)job.value);
+ } else {
Jmsg(jcr, M_FATAL, 0, "%s", db_strerror(jcr->db));
return false;
}
* <file-index> <stream> <info>
*/
if (!sd->fsend("%ld %d 0", jcr->JobFiles, attr_stream)) {
- if (!jcr->is_canceled()) {
+ if (!jcr->is_canceled() && !jcr->is_incomplete()) {
Jmsg1(jcr, M_FATAL, 0, _("Network send error to SD. ERR=%s\n"),
sd->bstrerror());
}