-/*
- *
- * Bacula Director -- backup.c -- responsible for doing backup jobs
- *
- * Kern Sibbald, March MM
- *
- * Basic tasks done here:
- * Open DB and create records for this job.
- * Open Message Channel with Storage daemon to tell him a job will be starting.
- * Open connection with File daemon and pass him commands
- * to do the backup.
- * When the File daemon finishes the job, update the DB.
- *
- * Version $Id$
- */
/*
Bacula® - The Network Backup Solution
(FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
Switzerland, email:ftf@fsfeurope.org.
*/
+/*
+ *
+ * Bacula Director -- backup.c -- responsible for doing backup jobs
+ *
+ * Kern Sibbald, March MM
+ *
+ * Basic tasks done here:
+ * Open DB and create records for this job.
+ * Open Message Channel with Storage daemon to tell him a job will be starting.
+ * Open connection with File daemon and pass him commands
+ * to do the backup.
+ * When the File daemon finishes the job, update the DB.
+ *
+ * Version $Id$
+ */
#include "bacula.h"
#include "dird.h"
set_jcr_job_status(jcr, JS_Running);
fd = jcr->file_bsock;
- if (!send_level_command(jcr)) {
- goto bail_out;
- }
-
- if (!send_runscripts_commands(jcr)) {
+ if (!send_include_list(jcr)) {
goto bail_out;
}
- if (!send_include_list(jcr)) {
+ if (!send_exclude_list(jcr)) {
goto bail_out;
}
- if (!send_exclude_list(jcr)) {
+ if (!send_level_command(jcr)) {
goto bail_out;
}
goto bail_out;
}
+ if (!send_runscripts_commands(jcr)) {
+ goto bail_out;
+ }
+
/*
* We re-update the job start record so that the start
* time is set after the run before job. This avoids
/* Pickup Job termination data */
stat = wait_for_job_termination(jcr);
-#ifdef HAVE_BATCH_FILE_INSERT
- db_create_batch_file_record(jcr); /* used by bulk batch file insert */
-#endif
+ db_write_batch_file_records(jcr); /* used by bulk batch file insert */
if (stat == JS_Terminated) {
backup_cleanup(jcr, stat);
return true;
// bmicrosleep(15, 0); /* for debugging SIGHUP */
- Jmsg(jcr, msg_type, 0, _("Bacula %s (%s): %s\n"
+ Jmsg(jcr, msg_type, 0, _("Bacula %s %s (%s): %s\n"
+" Build OS: %s %s %s\n"
" JobId: %d\n"
" Job: %s\n"
" Backup Level: %s%s\n"
" FD termination status: %s\n"
" SD termination status: %s\n"
" Termination: %s\n\n"),
- VERSION,
- LSMDATE,
- edt,
+ my_name, VERSION, LSMDATE, edt,
+ HOST_OS, DISTNAME, DISTVER,
jcr->jr.JobId,
jcr->jr.Job,
level_to_str(jcr->JobLevel), jcr->since,