Hi,
we are using a fileset that should include data that is created (or provided)
by a (client side) run script. Concretely, a virtual machine (VM) is backed
up; a run script shall create a snapshot of that machine, and the snapshot
file should be backed up (it's a little more complicated, but let's leave it
that way for now).
Unfortunately, bacula currently _first_ evaluates the file set, and runs the
file listing process ("\|script" syntax), and _then_ runs the "client before
jobs" commands.
With the attached patch (vs. a 5.0.3 that has another patch applied that I
just sent to bacula-devel to modify another call order), this behavior is
modified; _first_ the "before job" is executed, then the file list is
received.
At the first sight, my installation continues to run fine with the patch
applied; however (and again), I have not tested all possible scenarios, but
only ones that we use internally.
As a side note: the init script (which may make the job fail) will abort
further communication; receiving the file list is no longer required with this
patch. I'd regard that as an advantage.
1) Would you think that this reordering should work fine in all/other
scenarios?
2) Any chance for this patch to go upstream?
Thx & best regards
Bastian
--
Collax GmbH . Basler Str. 115a . 79115 Freiburg . Germany
p: +49 (0) 89-990 157-28 www.collax.com
Geschäftsführer: Bernd Bönte, Boris Nalbach
AG München HRB 173695. Ust.-IdNr: DE270819312
With this patch, "Client Run Before Job" scripts are executed prior to
fetching include and exclude file lists via "\|script" syntax. This makes it
possible to provide data in that script that is not yet available prior
to the backup.
diff -uNr bacula-5.0.3.ori/src/dird/backup.c bacula-5.0.3/src/dird/backup.c
--- bacula-5.0.3.ori/src/dird/backup.c 2011-08-29 13:14:06.000000000 +0200
+++ bacula-5.0.3/src/dird/backup.c 2011-08-29 13:17:03.000000000 +0200
@@ -388,14 +388,6 @@
goto bail_out;
}
- if (!send_include_list(jcr)) {
- goto bail_out;
- }
-
- if (!send_exclude_list(jcr)) {
- goto bail_out;
- }
-
/*
* send Storage daemon address to the File daemon
*/
@@ -422,6 +414,14 @@
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
------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management
Up to 160% more powerful than alternatives and 25% more efficient.
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
Bacula-devel mailing list
Bacula-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-devel