the plugin gets control, it can interact with Bacula by getting and setting
Bacula variables. In this way, it behaves much like a RunScript. Currently
very few Bacula variables are defined, but they will be implemented as the need
the plugin gets control, it can interact with Bacula by getting and setting
Bacula variables. In this way, it behaves much like a RunScript. Currently
very few Bacula variables are defined, but they will be implemented as the need
We plan to have plugins register to receive events that they normally would
not receive, such as an event for each file examined for backup or restore.
We plan to have plugins register to receive events that they normally would
not receive, such as an event for each file examined for backup or restore.
both these external entry points to the shared object are defined as C entry
points to avoid name mangling complications with C++. However, the shared
both these external entry points to the shared object are defined as C entry
points to avoid name mangling complications with C++. However, the shared
that it follows C language calling conventions.
The definitions for {\bf bRC} and the arguments are {\bf
that it follows C language calling conventions.
The definitions for {\bf bRC} and the arguments are {\bf
Aside from the {\bf bc\_types.h} and {\bf confit.h} headers, the plugin
definition uses the minimum code from Bacula. The bc\_types.h file is required
Aside from the {\bf bc\_types.h} and {\bf confit.h} headers, the plugin
definition uses the minimum code from Bacula. The bc\_types.h file is required
(malloc the memory) and store a pointer to
its private working storage in the {\bf pContext} variable.
Note: since Bacula is a multi-threaded program, you must not
(malloc the memory) and store a pointer to
its private working storage in the {\bf pContext} variable.
Note: since Bacula is a multi-threaded program, you must not
to apply globally to the whole plugin. In addition, you must
be aware that except the first and last call to the plugin
(loadPlugin and unloadPlugin) all the other calls will be
made by threads that correspond to a Bacula job. The
bpContext that will be passed for each thread will remain the
to apply globally to the whole plugin. In addition, you must
be aware that except the first and last call to the plugin
(loadPlugin and unloadPlugin) all the other calls will be
made by threads that correspond to a Bacula job. The
bpContext that will be passed for each thread will remain the
When actually writing your own plugin, you may use the example-plugin-fd.c
code as a template for your code.
When actually writing your own plugin, you may use the example-plugin-fd.c
code as a template for your code.