]> git.sur5r.net Git - bacula/bacula/commitdiff
ebl for people like me wo want's generate include/exclude with before job commands
authorEric Bollengier <eric@eb.homelinux.org>
Tue, 20 Feb 2007 13:32:20 +0000 (13:32 +0000)
committerEric Bollengier <eric@eb.homelinux.org>
Tue, 20 Feb 2007 13:32:20 +0000 (13:32 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4220 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/patches/testing/clientrunbeforejob_can_generate_include_exclude_list.patch [new file with mode: 0644]
bacula/patches/testing/clientrunbeforejob_can_generate_include_exclude_list.readme [new file with mode: 0644]

diff --git a/bacula/patches/testing/clientrunbeforejob_can_generate_include_exclude_list.patch b/bacula/patches/testing/clientrunbeforejob_can_generate_include_exclude_list.patch
new file mode 100644 (file)
index 0000000..5e1d3d6
--- /dev/null
@@ -0,0 +1,46 @@
+--- bacula/src/dird/backup.c   2007-02-20 14:28:55.000000000 +0100
++++ bacula.org/src/dird/backup.c       2007-02-20 14:27:54.000000000 +0100
+@@ -171,18 +171,6 @@
+    set_jcr_job_status(jcr, JS_Running);
+    fd = jcr->file_bsock;
+-   if (!send_include_list(jcr)) {
+-      goto bail_out;
+-   }
+-
+-   if (!send_exclude_list(jcr)) {
+-      goto bail_out;
+-   }
+-
+-   if (!send_level_command(jcr)) {
+-      goto bail_out;
+-   }
+-
+    /*
+     * send Storage daemon address to the File daemon
+     */
+@@ -205,10 +193,24 @@
+       goto bail_out;
+    }
++   /* setup job */
++
++   if (!send_level_command(jcr)) {
++      goto bail_out;
++   }
++
+    if (!send_runscripts_commands(jcr)) {
+       goto bail_out;
+    }
++   if (!send_include_list(jcr)) {
++      goto bail_out;
++   }
++
++   if (!send_exclude_list(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 
diff --git a/bacula/patches/testing/clientrunbeforejob_can_generate_include_exclude_list.readme b/bacula/patches/testing/clientrunbeforejob_can_generate_include_exclude_list.readme
new file mode 100644 (file)
index 0000000..fae53c1
--- /dev/null
@@ -0,0 +1,16 @@
+From: Eric Bollengier <eric at homelinux dot org>
+
+This patch allow you to create include/exclude file list
+with ClientRunBeforeJob command.
+
+Job {
+...
+       ClientRunBeforeJob = "gen_exclude.pl /tmp/lst.exc"
+}
+
+FileSet {
+...
+       Include {
+               File="\\</tmp/lst.exc"
+       }
+}