<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!--Converted with LaTeX2HTML 2008 (1.71) original version by: Nikos Drakos, CBLU, University of Leeds * revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan * with significant contributions from: Jens Lippmann, Marek Rouchal, Martin Wilck and others --> <HTML> <HEAD> <TITLE>Bacula FD Plugin API</TITLE> <META NAME="description" CONTENT="Bacula FD Plugin API"> <META NAME="keywords" CONTENT="developers"> <META NAME="resource-type" CONTENT="document"> <META NAME="distribution" CONTENT="global"> <META NAME="Generator" CONTENT="LaTeX2HTML v2008"> <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> <LINK REL="STYLESHEET" HREF="developers.css"> <LINK REL="next" HREF="Platform_Support.html"> <LINK REL="previous" HREF="Bacula_Git_Usage.html"> <LINK REL="up" HREF="Developer_s_Guide.html"> <LINK REL="next" HREF="Normal_vs_Command_Plugins.html"> </HEAD> <BODY > <!--Navigation Panel--> <A NAME="tex2html616" HREF="Normal_vs_Command_Plugins.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> <A NAME="tex2html610" HREF="Developer_s_Guide.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> <A NAME="tex2html604" HREF="Forcing_Changes.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> <A NAME="tex2html612" HREF="Contents.html"> <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> <A NAME="tex2html614" HREF="GNU_Free_Documentation_Lice.html"> <IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> <BR> <B> Next:</B> <A NAME="tex2html617" HREF="Normal_vs_Command_Plugins.html">Normal vs Command Plugins</A> <B> Up:</B> <A NAME="tex2html611" HREF="Developer_s_Guide.html">Developer's Guide</A> <B> Previous:</B> <A NAME="tex2html605" HREF="Forcing_Changes.html">Forcing Changes</A> <B> <A NAME="tex2html613" HREF="Contents.html">Contents</A></B> <B> <A NAME="tex2html615" HREF="GNU_Free_Documentation_Lice.html">Index</A></B> <BR> <BR> <!--End of Navigation Panel--> <H1><A NAME="SECTION00400000000000000000"> Bacula FD Plugin API</A> </H1> To write a Bacula plugin, you create a dynamic shared object program (or dll on Win32) with a particular name and two exported entry points, place it in the <B>Plugins Directory</B>, which is defined in the <B>bacula-fd.conf</B> file in the <B>Client</B> resource, and when the FD starts, it will load all the plugins that end with <B>-fd.so</B> (or <B>-fd.dll</B> on Win32) found in that directory. <P> <BR><HR> <!--Table of Child-Links--> <A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A> <UL> <LI><A NAME="tex2html618" HREF="Normal_vs_Command_Plugins.html">Normal vs Command Plugins</A> <LI><A NAME="tex2html619" HREF="Loading_Plugins.html">Loading Plugins</A> <LI><A NAME="tex2html620" HREF="loadPlugin.html">loadPlugin</A> <LI><A NAME="tex2html621" HREF="Plugin_Entry_Points.html">Plugin Entry Points</A> <UL> <LI><A NAME="tex2html622" HREF="Plugin_Entry_Points.html#SECTION00441000000000000000">newPlugin(bpContext *ctx)</A> <LI><A NAME="tex2html623" HREF="Plugin_Entry_Points.html#SECTION00442000000000000000">freePlugin(bpContext *ctx)</A> <LI><A NAME="tex2html624" HREF="Plugin_Entry_Points.html#SECTION00443000000000000000">getPluginValue(bpContext *ctx, pVariable var, void *value)</A> <LI><A NAME="tex2html625" HREF="Plugin_Entry_Points.html#SECTION00444000000000000000">setPluginValue(bpContext *ctx, pVariable var, void *value)</A> <LI><A NAME="tex2html626" HREF="Plugin_Entry_Points.html#SECTION00445000000000000000">handlePluginEvent(bpContext *ctx, bEvent *event, void *value)</A> <LI><A NAME="tex2html627" HREF="Plugin_Entry_Points.html#SECTION00446000000000000000">startBackupFile(bpContext *ctx, struct save_pkt *sp)</A> <LI><A NAME="tex2html628" HREF="Plugin_Entry_Points.html#SECTION00447000000000000000">endBackupFile(bpContext *ctx)</A> <LI><A NAME="tex2html629" HREF="Plugin_Entry_Points.html#SECTION00448000000000000000">startRestoreFile(bpContext *ctx, const char *cmd)</A> <LI><A NAME="tex2html630" HREF="Plugin_Entry_Points.html#SECTION00449000000000000000">createFile(bpContext *ctx, struct restore_pkt *rp)</A> <LI><A NAME="tex2html631" HREF="Plugin_Entry_Points.html#SECTION004410000000000000000">setFileAttributes(bpContext *ctx, struct restore_pkt *rp)</A> <LI><A NAME="tex2html632" HREF="Plugin_Entry_Points.html#SECTION004411000000000000000">endRestoreFile(bpContext *ctx)</A> <LI><A NAME="tex2html633" HREF="Plugin_Entry_Points.html#SECTION004412000000000000000">pluginIO(bpContext *ctx, struct io_pkt *io)</A> <LI><A NAME="tex2html634" HREF="Plugin_Entry_Points.html#SECTION004413000000000000000">bool checkFile(bpContext *ctx, char *fname)</A> </UL> <BR> <LI><A NAME="tex2html635" HREF="Bacula_Plugin_Entrypoints.html">Bacula Plugin Entrypoints</A> <UL> <LI><A NAME="tex2html636" HREF="Bacula_Plugin_Entrypoints.html#SECTION00451000000000000000">bRC registerBaculaEvents(bpContext *ctx, ...)</A> <LI><A NAME="tex2html637" HREF="Bacula_Plugin_Entrypoints.html#SECTION00452000000000000000">bRC getBaculaValue(bpContext *ctx, bVariable var, void *value)</A> <LI><A NAME="tex2html638" HREF="Bacula_Plugin_Entrypoints.html#SECTION00453000000000000000">bRC setBaculaValue(bpContext *ctx, bVariable var, void *value)</A> <LI><A NAME="tex2html639" HREF="Bacula_Plugin_Entrypoints.html#SECTION00454000000000000000">bRC JobMessage(bpContext *ctx, const char *file, int line, int type, utime_t mtime, const char *fmt, ...)</A> <LI><A NAME="tex2html640" HREF="Bacula_Plugin_Entrypoints.html#SECTION00455000000000000000">bRC DebugMessage(bpContext *ctx, const char *file, int line, int level, const char *fmt, ...)</A> <LI><A NAME="tex2html641" HREF="Bacula_Plugin_Entrypoints.html#SECTION00456000000000000000">void baculaMalloc(bpContext *ctx, const char *file, int line, size_t size)</A> <LI><A NAME="tex2html642" HREF="Bacula_Plugin_Entrypoints.html#SECTION00457000000000000000">void baculaFree(bpContext *ctx, const char *file, int line, void *mem)</A> </UL> <BR> <LI><A NAME="tex2html643" HREF="Building_Bacula_Plugins.html">Building Bacula Plugins</A> </UL> <!--End of Table of Child-Links--> <BR><HR> <ADDRESS> 2010-06-14 </ADDRESS> </BODY> </HTML>