- jcr->sd_client is set when the SD is acting as a client from the point
of view of the control job that is "restoring" the job up
to the other SD. It is set only for SD <-> SD
- The control job as a different cr->getJobType()
FROM
JobId Level Files Bytes Status Finished Name
====================================================================
1 Full 3,087 49.77 M OK 13-Mar-24 16:49 MigrationJobSave
2 Full 795 5.900 M Error 13-Mar-24 16:49 migrate-job
3 Full 795 5.900 M Incomplete 13-Mar-24 16:49 MigrationJobSave
TO
1 Full 3,087 49.77 M OK 14-Mar-24 19:25 MigrationJobSave
2 Full 795 5.900 M Error 14-Mar-24 19:26 migrate-job
3 Full 795 5.900 M Error 14-Mar-24 19:26 MigrationJobSave
* We cannot mark a job Incomplete if we have already flushed
* a bad JobMedia record (i.e. one beyond the last FileIndex
* that is known to be good).
+ * Only backups of type JT_BACKUP are handled for now.
+ * Be careful MAC backups keep the type of the source job aka JT_BACKUP
+ * but have the jcr->sd_client set.
*/
if (jcr->spool_attributes && last_file_index > 10 &&
- dir->get_lastFlushIndex() < last_file_index) {
+ dir->get_lastFlushIndex() < last_file_index &&
+ jcr->getJobType() == JT_BACKUP && !jcr->sd_client) {
jcr->setJobStatus(JS_Incomplete);
}
}