]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/backup.c
ebl Commit file relocation
[bacula/bacula] / bacula / src / dird / backup.c
index 1927103ffe46ba2fb0fff026a99b1a5a0c9213da..233074af87d4236174f09c3fa458c879915312b0 100644 (file)
@@ -1,22 +1,7 @@
-/*
- *
- *   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
 
-   Copyright (C) 2000-2006 Free Software Foundation Europe e.V.
+   Copyright (C) 2000-2007 Free Software Foundation Europe e.V.
 
    The main author of Bacula is Kern Sibbald, with contributions from
    many others, a complete list can be found in the file AUTHORS.
    (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"
@@ -171,19 +171,15 @@ bool do_backup(JCR *jcr)
    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;
    }
 
@@ -209,6 +205,10 @@ bool do_backup(JCR *jcr)
       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 
@@ -233,6 +233,7 @@ bool do_backup(JCR *jcr)
 
    /* Pickup Job termination data */
    stat = wait_for_job_termination(jcr);
+   db_write_batch_file_records(jcr);    /* used by bulk batch file insert */
    if (stat == JS_Terminated) {
       backup_cleanup(jcr, stat);
       return true;
@@ -437,7 +438,8 @@ void backup_cleanup(JCR *jcr, int TermCode)
 
 // 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"
@@ -467,9 +469,8 @@ void backup_cleanup(JCR *jcr, int TermCode)
 "  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,