On Tue, Sep 21, 2010 at 10:10:08AM +0100, Graham Keeling wrote:
> OK, that sounds easy enough.
>
> Attached is my patch to bacula-5.0.3 (completely untested at the moment).
>
> I've made two new options:
> truncondiff
> trunconincr
> I will report on whether it works in a while.
Sorry, here is the patch...
Index: src/win32/filed/plugins/exchange-fd.c
===================================================================
RCS file: /cvs/netpilot/GPL/bacula-5.0.3/WORK/src/win32/filed/plugins/exchange-fd.c,v
retrieving revision 1.1
diff -u -r1.1 exchange-fd.c
--- src/win32/filed/plugins/exchange-fd.c 27 Aug 2010 09:53:59 -0000 1.1
+++ src/win32/filed/plugins/exchange-fd.c 21 Sep 2010 08:51:01 -0000
@@ -167,6 +167,8 @@
context->bpContext = ctx;
context->job_since = 0;
context->notrunconfull_option = false;
+ context-> truncondiff_option = false;
+ context-> trunconincr_option = false;
bfuncs->getBaculaValue(ctx, bVarJobId, (void *)&JobId);
_DebugMessage(0, "newPlugin JobId=%d\n", JobId);
bfuncs->registerBaculaEvents(ctx, 1, 2, 0);
@@ -236,10 +238,18 @@
}
break;
case 'D':
- context->truncate_logs = false;
+ if (context->truncondiff_option) {
+ context->truncate_logs = true;
+ } else {
+ context->truncate_logs = false;
+ }
break;
case 'I':
- context->truncate_logs = false;
+ if (context->trunconincr_option) {
+ context->truncate_logs = true;
+ } else {
+ context->truncate_logs = false;
+ }
break;
default:
_DebugMessage(0, "Invalid job level %c\n", context->job_level);
@@ -287,6 +297,14 @@
{
context->notrunconfull_option = true;
}
+ else if (stricmp(option, "truncondiff") == 0)
+ {
+ context->truncondiff_option = true;
+ }
+ else if (stricmp(option, "trunconincr") == 0)
+ {
+ context->trunconincr_option = true;
+ }
else
{
_JobMessage(M_WARNING, "Unknown plugin option '%s'\n", option);
Index: src/win32/filed/plugins/exchange-fd.h
===================================================================
RCS file: /cvs/netpilot/GPL/bacula-5.0.3/WORK/src/win32/filed/plugins/exchange-fd.h,v
retrieving revision 1.1
diff -u -r1.1 exchange-fd.h
--- src/win32/filed/plugins/exchange-fd.h 27 Aug 2010 09:53:59 -0000 1.1
+++ src/win32/filed/plugins/exchange-fd.h 21 Sep 2010 08:51:01 -0000
@@ -132,6 +132,8 @@
int job_level;
time_t job_since;
bool notrunconfull_option;
+ bool truncondiff_option;
+ bool trunconincr_option;
bool truncate_logs;
bool accurate;
};
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Bacula-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-devel