]> git.sur5r.net Git - bacula/docs/commitdiff
Update new features
authorKern Sibbald <kern@sibbald.com>
Mon, 22 Sep 2008 16:16:46 +0000 (16:16 +0000)
committerKern Sibbald <kern@sibbald.com>
Mon, 22 Sep 2008 16:16:46 +0000 (16:16 +0000)
docs/home-page/en/inc/header.php
docs/home-page/en/pages/bugs.php
docs/manuals/en/concepts/concepts.kilepr
docs/manuals/en/concepts/newfeatures.tex

index 03aa8675ba0a52d34fe2e4dd87d2839a9631fcdc..3c429d33dfbc05b07d32508ad853430c5fe6bdfc 100644 (file)
         <div class="menuItem">
            <ul class="menuitem">
            <li class="menuItem"> <a href="http://sourceforge.net/project/showfiles.php?group_id=50727"> Current Files </a> </li>
         <div class="menuItem">
            <ul class="menuitem">
            <li class="menuItem"> <a href="http://sourceforge.net/project/showfiles.php?group_id=50727"> Current Files </a> </li>
+           <li class="menuItem"> <a href="http://sourceforge.net/project/showfiles.php?group_id=50727&package_id=93946"> Patches</a> </li>
            <li class="menuItem"> <a href="http://sourceforge.net/project/showfiles.php?group_id=50727#files"> All Files </a> </li>
            <li class="menuItem"> <a href="http://sourceforge.net/svn/?group_id=50727"> SVN Repository </a> </li>
            </ul>
            <li class="menuItem"> <a href="http://sourceforge.net/project/showfiles.php?group_id=50727#files"> All Files </a> </li>
            <li class="menuItem"> <a href="http://sourceforge.net/svn/?group_id=50727"> SVN Repository </a> </li>
            </ul>
index 0e0de7292dd5ce81da588ebfa36e119c271d7153..dde276d83afa716424f5e3eacfd7e2eadf866069 100644 (file)
     <p>
     Bacula now has a Mantis bug reporting system
     implemented by Dan Langille and hosted on his computer. It is web based,
     <p>
     Bacula now has a Mantis bug reporting system
     implemented by Dan Langille and hosted on his computer. It is web based,
-    easy to use, and we recommend you give it a try. You can submit a bug
-    or review the list of open or closed bugs by visiting:
+    easy to use, and we recommend you give it a try.  However, before
+    visiting our bugs database, please carefully read the following:
 
 
-<p style="text-align: center; font-size: 24px">
-        <a href="http://bugs.bacula.org">http://bugs.bacula.org</a>
-</p>
 
 To view the bug reports, you can login as user <b>anonymous</b> and
 password <b>anonymous</b>. The advantage of actually being subscribed
 
 To view the bug reports, you can login as user <b>anonymous</b> and
 password <b>anonymous</b>. The advantage of actually being subscribed
@@ -83,5 +80,12 @@ necessary.</td>
    </td>
 </tr>
 
    </td>
 </tr>
 
+You can submit a bug or review the list of open or closed bugs by going to:
+
+<p style="text-align: center; font-size: 24px">
+        <a href="http://bugs.bacula.org">http://bugs.bacula.org</a>
+</p>
+
+
 </table>
 <? require_once("inc/footer.php"); ?>
 </table>
 <? require_once("inc/footer.php"); ?>
index c910c079acf2fa1ced8ed17541a172b7e249048a..9c3db920bcb104d79c313fc9d9af4a4e1604840e 100644 (file)
@@ -161,10 +161,10 @@ order=-1
 
 [item:newfeatures.tex]
 archive=true
 
 [item:newfeatures.tex]
 archive=true
-column=67
-encoding=
+column=30
+encoding=UTF-8
 highlight=LaTeX
 highlight=LaTeX
-line=850
+line=972
 open=true
 order=0
 
 open=true
 order=0
 
index 6ef277cce280f091e60e52ef4d09a5a3edfb3b05..b2c4e418ee2829cc2f0467fb0d5f1884cc3cc650 100644 (file)
@@ -678,6 +678,17 @@ Aside from the {\bf bc\_types.h} header, the plugin definition uses the
 minimum code from Bacula.  The bc\_types.h file is required to ensure that
 the data type defintions in arguments correspond to the Bacula core code.
 
 minimum code from Bacula.  The bc\_types.h file is required to ensure that
 the data type defintions in arguments correspond to the Bacula core code.
 
+The return codes are defined as:
+\begin{verbatim}
+typedef enum {
+  bRC_OK    = 0,                         /* OK */
+  bRC_Stop  = 1,                         /* Stop calling other plugins */
+  bRC_Error = 2,                         /* Some kind of error */
+  bRC_More  = 3,                         /* More files to backup */
+} bRC;
+\end{verbatim}
+
+
 At a future point in time, we hope to make the Bacula libbac.a into a
 shared object so that the plugin can use much more of Bacula's
 infrastructure, but for this first cut, we have tried to minimize the
 At a future point in time, we hope to make the Bacula libbac.a into a
 shared object so that the plugin can use much more of Bacula's
 infrastructure, but for this first cut, we have tried to minimize the
@@ -830,12 +841,12 @@ and their arguments.
    happens at the beginning of a Job.  If 10 Jobs are running
    simultaneously, there will be at least 10 instances of the
    plugin.
    happens at the beginning of a Job.  If 10 Jobs are running
    simultaneously, there will be at least 10 instances of the
    plugin.
-    
+
    The bpContext structure will be passed to the plugin, and
    The bpContext structure will be passed to the plugin, and
-   during this call, if the plugin needs to have any private
+   during this call, if the plugin needs to have its private
    working storage that is associated with the particular
    instance of the plugin, it should create it from the heap
    working storage that is associated with the particular
    instance of the plugin, it should create it from the heap
-   (malloc the memory).  The plugin then puts a pointer to
+   (malloc the memory) and store a pointer to
    its private working storage in the {\bf pContext} variable.
 
 \begin{verbatim}
    its private working storage in the {\bf pContext} variable.
 
 \begin{verbatim}
@@ -847,29 +858,29 @@ typedef struct s_bpContext {
 \end{verbatim}
    
   This context pointer will be passed as the first argument to all
 \end{verbatim}
    
   This context pointer will be passed as the first argument to all
-  the entry points that Bacula can call within the plugin.  Needless
+  the entry points that Bacula calls within the plugin.  Needless
   to say, the plugin should not change the bContext variable, which
   is Bacula's private context pointer for this instance of this
   plugin.
 
 \subsection{freePlugin(bpContext *ctx)}
   to say, the plugin should not change the bContext variable, which
   is Bacula's private context pointer for this instance of this
   plugin.
 
 \subsection{freePlugin(bpContext *ctx)}
-  This entry point is called when the
-   this instance of the plugin is no longer needed (the Job is
-   ending), and the plugin should release any memory it may
-   have allocated for the pContext.
+This entry point is called when the
+this instance of the plugin is no longer needed (the Job is
+ending), and the plugin should release all memory it may
+have allocated for the pContext.
 
 \subsection{getPluginValue(bpContext *ctx, pVariable var, void *value)} 
 Bacula will call this entry point to get
 
 \subsection{getPluginValue(bpContext *ctx, pVariable var, void *value)} 
 Bacula will call this entry point to get
-   a value from the plugin.  This entry point is currently not called.
+a value from the plugin.  This entry point is currently not called.
 
 \subsection{setPluginValue(bpContext *ctx, pVariable var, void *value)}
 
 \subsection{setPluginValue(bpContext *ctx, pVariable var, void *value)}
- Bacula will call this entry point to set
-   a value in the plugin.  This entry point is currently not called.
+Bacula will call this entry point to set
+a value in the plugin.  This entry point is currently not called.
  
 \subsection{handlePluginEvent(bpContext *ctx, bEvent *event, void *value)}
  
 \subsection{handlePluginEvent(bpContext *ctx, bEvent *event, void *value)}
- This entry point is called when Bacula
-   encounters certain events. Bacula passes the pointer to an event
-   structure (bEvent), which currently has one item, the eventType:
+This entry point is called when Bacula
+encounters certain events (discussed below). Bacula passes the pointer to an event
+structure (bEvent), which currently has one item, the eventType:
 
 \begin{verbatim}
 typedef struct s_bEvent {
 
 \begin{verbatim}
 typedef struct s_bEvent {
@@ -905,18 +916,34 @@ typedef enum {
 Most of which are pretty explanatory.
 
 \begin{description}
 Most of which are pretty explanatory.
 
 \begin{description}
- \item [bEventJobStart] is called whenever a Job starts.
- \item [bEventJobEnd] is called whenever a Job ends.
- \item [bEventStartBackupJob] is called when a Backup Job begins.
- \item [bEventEndBackupJob] is called when a Backup Job ends.
- \item [bEventStartRestoreJob] is called when a Restore Job starts.
- \item [bEventEndRestoreJob] is called when a Restore Job ends.
- \item [bEventStartVerifyJob] is called when a Verify Job starts.
- \item [bEventEndVerifyJob] is called when a Verify Job ends.
- \item [bEventBackupCommand]
- \item [bEventRestoreCommand]
- \item [bEventLevel] is called when the level is set for a new Job.
- \item [bEventSince] is called whent the since time is set for a new Job.
+ \item [bEventJobStart] is called whenever a Job starts. The value
+   passed is a pointer to a string that contains: "Jobid=nnn 
+   Job=job-name". Where nnn will be replaced by the JobId and job-name
+   will be replaced by the Job name. The variable is temporary so if you
+   need the values, you must copy them.
+ \item [bEventJobEnd] is called whenever a Job ends. No value is passed.
+ \item [bEventStartBackupJob] is called when a Backup Job begins. No value
+   is passed.
+ \item [bEventEndBackupJob] is called when a Backup Job ends. No value is 
+   passed.
+ \item [bEventStartRestoreJob] is called when a Restore Job starts. No value
+   is passed.
+ \item [bEventEndRestoreJob] is called when a Restore Job ends. No value is
+   passed.
+ \item [bEventStartVerifyJob] is called when a Verify Job starts. No value
+   is passed.
+ \item [bEventEndVerifyJob] is called when a Verify Job ends. No value
+   is passed.
+ \item [bEventBackupCommand] is called prior to the bEventStartBackupJob and
+   the plugin is passed the command string (everything after the equal sign
+   in "Plugin =" as the value.
+ \item [bEventRestoreCommand] is called prior to the bEventStartRestoreJob and
+   the plugin is passed the command string (everything after the equal sign
+   in "Plugin =" as the value.
+ \item [bEventLevel] is called when the level is set for a new Job. The value
+   is a 32 bit integer stored in the void*, which represents the Job Level code.
+ \item [bEventSince] is called when the since time is set for a new Job. The 
+   value is a time\_t time at which the last job was run.
 \end{description}
 
 \subsection{startBackupFile(bpContext *ctx, struct save\_pkt *sp)}
 \end{description}
 
 \subsection{startBackupFile(bpContext *ctx, struct save\_pkt *sp)}
@@ -932,33 +959,22 @@ Called when beginning the backup of a file.
   bool portable;                      /* set if data format is portable */
   char *cmd;                          /* command */
 };
   bool portable;                      /* set if data format is portable */
   char *cmd;                          /* command */
 };
-
 \end{verbatim}
 
 \end{verbatim}
 
+The second argument is a pointer to the {\bf save\_pkt} structure for the file
+to be backed up.  The plugin is responsible for filling in all the fields 
+of the {\bf save\_pkt}.  The values in the {\bf save\_pkt} are used to create a virtual file
+entry in the Bacula catalog database. The full path and filename should be
+unique on the system to avoid conflicts with real files. Example programs such
+as {\bf bpipe.c} show how to set these fields.
 
 \subsection{endBackupFile(bpContext *ctx)}
 
 \subsection{endBackupFile(bpContext *ctx)}
-Called at the end of backing up a file.
+Called at the end of backing up a file.  If the plugin's work
+is done, it should return bRC\_OK.  If the plugin wishes to create another
+file and back it up, then it must return bRC\_More.
 
 \subsection{startRestoreFile(bpContext *ctx, const char *cmd)}
 
 \subsection{startRestoreFile(bpContext *ctx, const char *cmd)}
-Called when beginning to restore a file.
-
-\begin{verbatim}
- struct restore_pkt {
-   int32_t stream;                    /* attribute stream id */
-   int32_t data_stream;               /* id of data stream to follow */
-   int32_t type;                      /* file type FT */
-   int32_t file_index;                /* file index */
-   int32_t LinkFI;                    /* file index to data if hard link */
-   uid_t uid;                         /* userid */
-   struct stat statp;                 /* decoded stat packet */
-   const char *attrEx;                /* extended attributes if any */
-   const char *ofname;                /* output filename */
-   const char *olname;                /* output link name */
-   const char *where;                 /* where */
-   const char *RegexWhere;            /* regex where */
-   int replace;                       /* replace flag */
-};
-\end{verbatim}
+Not implemented.
 
 
 \subsection{endRestoreFile(bpContext *ctx)}
 
 
 \subsection{endRestoreFile(bpContext *ctx)}
@@ -993,7 +1009,13 @@ struct io_pkt {
 
 
 \subsection{createFile(bpContext *ctx, struct restore\_pkt *rp)}
 
 
 \subsection{createFile(bpContext *ctx, struct restore\_pkt *rp)}
-Called to create a file before restoring the data.
+Called to create a file before restoring the data. The data in the 
+restore\_pkt is passed to the plugin and is based on the data that was
+originally given by the plugin during the backup and the current user
+restore settings (e.g. where, RegexWhere, replace).  This allows the
+plugin to first create a file (if necessary) so that the data can
+be transmitted to it.  The next call to the plugin will be a
+pluginIO command with a request to open the file write-only.
 
 \begin{verbatim}
  
 
 \begin{verbatim}
  
@@ -1015,8 +1037,9 @@ struct restore_pkt {
 \end{verbatim}
 
 \subsection{setFileAttributes(bpContext *ctx, struct restore\_pkt *rp)}
 \end{verbatim}
 
 \subsection{setFileAttributes(bpContext *ctx, struct restore\_pkt *rp)}
+This is call not yet implemented.
+
 \begin{verbatim}
 \begin{verbatim}
 struct restore_pkt {
    int32_t stream;                    /* attribute stream id */
    int32_t data_stream;               /* id of data stream to follow */
 struct restore_pkt {
    int32_t stream;                    /* attribute stream id */
    int32_t data_stream;               /* id of data stream to follow */