- /* Look up the last
- * FULL backup job to get the time/date for a
- * differential or incremental save.
- */
- jcr->stime = get_pool_memory(PM_MESSAGE);
- jcr->stime[0] = 0;
- since[0] = 0;
- switch (jcr->JobLevel) {
- case L_DIFFERENTIAL:
- case L_INCREMENTAL:
- /* Look up start time of last job */
- jcr->jr.JobId = 0;
- if (!db_find_job_start_time(jcr, jcr->db, &jcr->jr, &jcr->stime)) {
- Jmsg(jcr, M_INFO, 0, "%s", db_strerror(jcr->db));
- Jmsg(jcr, M_INFO, 0, _("No prior or suitable Full backup found. Doing FULL backup.\n"));
- bsnprintf(since, sizeof(since), " (upgraded from %s)",
- level_to_str(jcr->jr.Level));
- jcr->JobLevel = jcr->jr.Level = L_FULL;
- } else {
- bstrncpy(since, ", since=", sizeof(since));
- bstrncat(since, jcr->stime, sizeof(since));
- }
- Dmsg1(115, "Last start time = %s\n", jcr->stime);
- break;
- }