- /* Now find all Incremental/Decremental Jobs after Full save */
- Mmsg(&rx->query, uar_inc_dec, edit_uint64(rx->JobTDate, ed1), date,
+ /* Now find most recent Differental Job after Full save, if any */
+ Mmsg(&rx->query, uar_dif, edit_uint64(rx->JobTDate, ed1), date,
+ cr.ClientId, fsr.FileSet, pool_select);
+ if (!db_sql_query(ua->db, rx->query, NULL, NULL)) {
+ bsendmsg(ua, "%s\n", db_strerror(ua->db));
+ }
+ /* Now update JobTDate to lock onto Differental, if any */
+ rx->JobTDate = 0;
+ if (!db_sql_query(ua->db, uar_sel_all_temp, last_full_handler, (void *)rx)) {
+ bsendmsg(ua, "%s\n", db_strerror(ua->db));
+ }
+ if (rx->JobTDate == 0) {
+ bsendmsg(ua, _("No Full backup before %s found.\n"), date);
+ goto bail_out;
+ }
+
+ /* Now find all Incremental Jobs after Full/dif save */
+ Mmsg(&rx->query, uar_inc, edit_uint64(rx->JobTDate, ed1), date,