]> git.sur5r.net Git - bacula/docs/blobdiff - docs/manuals/en/main/dirdconf.tex
Fix description of Volume Retention -- bug 1844
[bacula/docs] / docs / manuals / en / main / dirdconf.tex
index 8909118ffe052c83d6447f4c8c2369b5ffbaf48b..2293665c1b00e7575715f2a31b30704e771b0394 100644 (file)
@@ -249,8 +249,8 @@ in the  graphical user interface. This directive is optional.
 
 \footnotesize
 \begin{verbatim}
- DirAddresses  = { 
-    ip = { addr = 1.2.3.4; port = 1205;}
+ DirAddresses  = {
+    ip = {addr = 1.2.3.4; port = 1205;}
     ipv4 = {
         addr = 1.2.3.4; port = http;}
     ipv6 = {
@@ -261,8 +261,8 @@ in the  graphical user interface. This directive is optional.
         addr = 1.2.3.4
         port = 1205
     }
-    ip = { addr = 1.2.3.4 }
-    ip = { addr = 201:220:222::2 }
+    ip = {addr = 1.2.3.4 }
+    ip = {addr = 201:220:222::2 }
     ip = {
         addr = bluedot.thun.net
     }
@@ -325,10 +325,10 @@ resource.
    Job records that are older than the specified period.
 
    Theses statistics records aren't use for restore purpose, but mainly for
-   capacity planning, billings, etc. See \ilink{Statistics chapter} for
+   capacity planning, billings, etc. See \ilink{Statistics chapter}{TO-BE-REPLACED} for
    additional information.
 
-   See the \ilink{ Configuration chapter}{Time} of this manual for additional
+   See the \ilink{Configuration chapter}{Time} of this manual for additional
    details of time specification.
 
    The default is 5 years.
@@ -550,8 +550,7 @@ For a {\bf Backup} Job, the Level may be one of the  following:
 
    However, to manage deleted files or directories changes in the
    catalog during an Incremental backup you can use \texttt{accurate}
-   mode. This is quite memory consuming process. See \ilink{Accurate
-     mode}{accuratemode} for more details.
+   mode. This is quite memory consuming process. See \ilink{Accurate mode}{accuratemode} for more details.
 
 \item [Differential]
    \index[dir]{Differential}
@@ -617,8 +616,7 @@ For a {\bf Backup} Job, the Level may be one of the  following:
 %% TODO: merge this with incremental 
    However, to manage deleted files or directories changes in the
    catalog during an Differential backup you can use \texttt{accurate}
-   mode. This is quite memory consuming process. See \ilink{Accurate
-     mode}{accuratemode} for more details.
+   mode. This is quite memory consuming process. See \ilink{Accurate mode}{accuratemode} for more details.
 
    Every once and a while, someone asks why we need Differential
    backups as long as Incremental backups pickup all changed files.
@@ -843,8 +841,7 @@ JobDefs {
 \index[dir]{Base}
 \index[dir]{Directive!Base}
 The Base directive permits to specify the list of jobs that will be used during
-Full backup as base. This directive is optional. See the \ilink{Base Job
-chapter}{basejobs} for more information.
+Full backup as base. This directive is optional. See the \ilink{Base Job chapter}{basejobs} for more information.
 
 \item [Messages = \lt{}messages-resource-name\gt{}]
 \index[dir]{Messages}
@@ -863,8 +860,7 @@ chapter}{basejobs} for more information.
    backed up.  Many Bacula installations will use only the {\bf Default}
    pool.  However, if you want to specify a different set of Volumes for
    different Clients or different Jobs, you will probably want to use
-   Pools.  For additional details, see the \ilink{Pool Resource
-   section}{PoolResource} of this chapter.  This directive is required.
+   Pools.  For additional details, see the \ilink{Pool Resource section}{PoolResource} of this chapter.  This directive is required.
 
 \item [Full Backup Pool = \lt{}pool-resource-name\gt{}]
 \index[dir]{Full Backup Pool}
@@ -900,8 +896,7 @@ chapter}{basejobs} for more information.
    many different times, and each {\bf run} directive permits overriding
    the default Job Level Pool, Storage, and Messages resources.  This gives
    considerable flexibility in what can be done with a single Job.  For
-   additional details, see the \ilink{Schedule Resource
-   Chapter}{ScheduleResource} of this manual.
+   additional details, see the \ilink{Schedule Resource Chapter}{ScheduleResource} of this manual.
           
 
 \item [Storage = \lt{}storage-resource-name\gt{}]
@@ -980,7 +975,7 @@ during working hours. We can see it like \texttt{Max Start Delay + Max Run
 
 \begin{figure}[htbp]
   \centering
-  \includegraphics[width=13cm]{\idir different_time.eps}
+  \includegraphics[width=\linewidth]{different_time}
   \caption{Job time control directives}
   \label{fig:differenttime}
 \end{figure}
@@ -1104,27 +1099,7 @@ use. The speed parameter should be specified in k/s, kb/s, m/s or mb/s.
    You can use following options may be specified in the body
    of the runscript:\\
 
-\begin{tabular}{|c|c|c|l}
-Options         & Value  & Default & Information   \\
-\hline
-\hline
-Runs On Success & Yes/No & {\it Yes} & Run command if JobStatus is successful\\
-\hline
-Runs On Failure & Yes/No & {\it No} & Run command if JobStatus isn't successful\\
-\hline
-Runs On Client  & Yes/No & {\it Yes} & Run command on client\\
-\hline
-Runs When       & Before|After|Always|\textsl{AfterVSS} & {\it Never} & When run commands\\
-\hline
-Fail Job On Error & Yes/No & {\it Yes} & Fail job if script returns 
-                                          something different from 0 \\
-\hline
-Command          &       &          & Path to your script\\
-\hline
-Console          &       &          & Console command\\
-\hline
-\end{tabular}
-   \\
+\LTXtable{\linewidth}{table_runscript}
 
    Any output sent by the command to standard output will be included in the
    Bacula job report.  The command string must be a valid program name or name
@@ -1145,6 +1120,7 @@ Console          &       &          & Console command\\
     %% = %
     %b = Job Bytes
     %c = Client's name
+    %C = If the job is a Cloned job (Only on director side)
     %d = Daemon's name (Such as host-dir or host-fd)
     %D = Director's name (Also valid on file daemon)
     %e = Job Exit Status
@@ -1185,20 +1161,7 @@ Status code \%e edits the following values:
 
 You can use these following shortcuts:\\
 
-\begin{tabular}{|c|c|c|c|c|c}
-Keyword & RunsOnSuccess & RunsOnFailure  & FailJobOnError & Runs On Client & RunsWhen  \\
-\hline
-Run Before Job         &        &       & Yes     & No     & Before \\
-\hline
-Run After Job          &  Yes   &   No  &         & No     & After  \\
-\hline
-Run After Failed Job   &  No    &  Yes  &         & No     & After  \\
-\hline
-Client Run Before Job  &        &       & Yes     & Yes    & Before \\
-\hline
-Client Run After Job   &  Yes   &   No  &         & Yes    & After  \\
-\end{tabular}
-
+\LTXtable{\linewidth}{table_runscriptshortcuts}
 Examples:
 \begin{verbatim}
 RunScript {
@@ -1443,7 +1406,7 @@ RunScript {
    substitution as described above for the {\bf RunScript} directive.
    
    An example of the use of this directive is given in the  
-   \ilink{Tips Chapter}{JobNotification} of this manual.  
+   \borgxrlink{Tips}{JobNotification}{problems}{chapter} of the \problemsman{}.
 
    See the {\bf Run After Failed Job} if you
    want to run a script after the job has terminated with any
@@ -1471,7 +1434,7 @@ RunScript {
 \end{verbatim}
 
    An example of the use of this directive is given in the  
-   \ilink{Tips Chapter}{JobNotification} of this manual.
+   \borgxrlink{Tips}{JobNotification}{problems}{chapter} of the \problemsman{}.
   
 
 \item [Client Run Before Job = \lt{}command\gt{}]
@@ -1577,8 +1540,7 @@ RunScript {
   \index[dir]{AddPrefix}
   \index[dir]{Directive!AddPrefix}
   This directive applies only to a Restore job and specifies a prefix to the
-  directory name of all files being restored.  This will use \ilink{File
-  Relocation}{filerelocation} feature implemented in Bacula 2.1.8 or later.  
+  directory name of all files being restored.  This will use \ilink{File Relocation}{filerelocation} feature implemented in Bacula 2.1.8 or later.  
 
 \item [Add Suffix = \lt{}extention\gt{}]
   \index[dir]{AddSuffix}
@@ -1613,8 +1575,7 @@ RunScript {
   \index[dir]{RegexWhere}
   \index[dir]{Directive!RegexWhere}
   This directive applies only to a Restore job and specifies a regex filename
-  manipulation of all files being restored.  This will use \ilink{File
-  Relocation}{filerelocation} feature implemented in Bacula 2.1.8 or later.
+  manipulation of all files being restored.  This will use \ilink{File Relocation}{filerelocation} feature implemented in Bacula 2.1.8 or later.
 
   For more informations about how use this option, see
   \ilink{this}{useregexwhere}.
@@ -1669,7 +1630,7 @@ RunScript {
    Director, Client, or Storage resources will also apply in addition to
    the limit specified here.  The default is set to 1, but you may set it
    to a larger number.  We strongly recommend that you read the WARNING
-   documented under \ilink{ Maximum Concurrent Jobs}{DirMaxConJobs} in the
+   documented under \ilink{Maximum Concurrent Jobs}{DirMaxConJobs} in the
    Director's resource.
 
 \item [Reschedule On Error = \lt{}yes\vb{}no\gt{}]
@@ -1689,10 +1650,10 @@ RunScript {
    \index[dir]{Directive!Reschedule Interval}
    If you have specified {\bf Reschedule On Error = yes} and the job
    terminates in error, it will be rescheduled after the interval of time
-   specified by {\bf time-specification}.  See \ilink{the time
-   specification formats}{Time} in the Configure chapter for details of
+   specified by {\bf time-specification}.  See \ilink{the time specification formats}{Time} in the Configure chapter for details of
    time specifications.  If no interval is specified, the job will not be
-   rescheduled on error.
+   rescheduled on error. The default Reschedule Interval
+   is 30 minutes (1800 seconds).
 
 \item [Reschedule Times = \lt{}count\gt{}]
    \index[dir]{Reschedule Times}
@@ -1706,7 +1667,7 @@ RunScript {
 
 \begin{figure}[htbp]
   \centering
-  \includegraphics[width=13cm]{\idir duplicate-real.eps}
+  \includegraphics[width=\linewidth]{duplicate-real}
   \caption{Allow Duplicate Jobs usage}
   \label{fig:allowduplicatejobs}
 \end{figure}
@@ -1734,7 +1695,7 @@ runs longer than expected because no tapes are available.
 
 \item [Cancel Lower Level Duplicates = \lt{}yes\vb{}no\gt{}]
 \index[general]{Cancel Lower Level Duplicates}
-  If \textbf{Allow Duplicates Jobs} is set to \textbf{no} and this
+  If \textbf{Allow Duplicate Jobs} is set to \textbf{no} and this
   directive is set to \textbf{yes}, Bacula will choose between duplicated
   jobs the one with the highest level.  For example, it will cancel a
   previous Incremental to run a Full backup.  It works only for Backup
@@ -1827,8 +1788,8 @@ runs longer than expected because no tapes are available.
    keep these points in mind:
 
 \begin{itemize}
-\item See \ilink{Running Concurrent Jobs}{ConcurrentJobs} on how to setup
-   concurrent jobs.
+\item See \borgxrlink{Running Concurrent Jobs}{ConcurrentJobs}{problems}{section} on how to setup
+   concurrent jobs in the \problemsman{}.
 
 \item Bacula concurrently runs jobs of only one priority at a time.  It
    will not simultaneously run a priority 1 and a priority 2 job.
@@ -1874,25 +1835,25 @@ correct order, and that your priority scheme will be respected.
    the running jobs finishes.  However, new priority 10 jobs will not
    be run until the priority 5 job has finished.
 
-\label{WritePartAfterJob}
-\item [Write Part After Job = \lt{}yes\vb{}no\gt{}]
-\index[dir]{Write Part After Job}
-\index[dir]{Directive!Write Part After Job}
-   This directive is only implemented in version 1.37 and later.
-   If this directive is set to {\bf yes} (default {\bf no}), a new part file
-   will be created after the job is finished.  
-
-   It should be set to {\bf yes} when writing to devices that require mount
-   (for example DVD), so you are sure that the current part, containing
-   this job's data, is written to the device, and that no data is left in
-   the temporary file on the hard disk.  However, on some media, like DVD+R
-   and DVD-R, a lot of space (about 10Mb) is lost every time a part is
-   written.  So, if you run several jobs each after another, you could set
-   this directive to {\bf no} for all jobs, except the last one, to avoid
-   wasting too much space, but to ensure that the data is written to the
-   medium when all jobs are finished.
-
-   This directive is ignored with tape and FIFO devices.  
+%% \label{WritePartAfterJob}
+%% \item [Write Part After Job = \lt{}yes\vb{}no\gt{}]
+%% \index[dir]{Write Part After Job}
+%% \index[dir]{Directive!Write Part After Job}
+%%    This directive is only implemented in version 1.37 and later.
+%%    If this directive is set to {\bf yes} (default {\bf no}), a new part file
+%%    will be created after the job is finished.  
+
+%%    It should be set to {\bf yes} when writing to devices that require mount
+%%    (for example DVD), so you are sure that the current part, containing
+%%    this job's data, is written to the device, and that no data is left in
+%%    the temporary file on the hard disk.  However, on some media, like DVD+R
+%%    and DVD-R, a lot of space (about 10Mb) is lost every time a part is
+%%    written.  So, if you run several jobs each after another, you could set
+%%    this directive to {\bf no} for all jobs, except the last one, to avoid
+%%    wasting too much space, but to ensure that the data is written to the
+%%    medium when all jobs are finished.
+
+%%    This directive is ignored with tape and FIFO devices.  
 
 \end{description}
 
@@ -2034,16 +1995,15 @@ incremental  backup.
    cases.
 
    
-\item [WritePartAfterJob=yes\vb{}no]
-   \index[dir]{WritePartAfterJob}
-   \index[dir]{Directive!WritePartAfterJob}
-   tells Bacula to request the Storage daemon to write the current part
-   file to the device when the job is finished (see \ilink{Write Part After
-   Job directive in the Job resource}{WritePartAfterJob}).  Please note,
-   this directive is implemented only in version 1.37 and later.  The
-   default is yes.  We strongly recommend that you keep this set to yes
-   otherwise, when the last job has finished one part will remain in the
-   spool file and restore may or may not work.
+%% \item [WritePartAfterJob=yes\vb{}no]
+%%    \index[dir]{WritePartAfterJob}
+%%    \index[dir]{Directive!WritePartAfterJob}
+%%    tells Bacula to request the Storage daemon to write the current part
+%%    file to the device when the job is finished (see \ilink{Write Part After Job directive in the Job resource}{WritePartAfterJob}).  Please note,
+%%    this directive is implemented only in version 1.37 and later.  The
+%%    default is yes.  We strongly recommend that you keep this set to yes
+%%    otherwise, when the last job has finished one part will remain in the
+%%    spool file and restore may or may not work.
 
 \end{description}
 
@@ -2278,7 +2238,6 @@ console run command.  This directive is required.
    process, but it is preferable for security reasons to make the text
    random.
 
-\label{FileRetention}
 \item [File Retention = \lt{}time-period-specification\gt{}]
    \label{FileRetention}
    \index[dir]{File Retention}
@@ -2287,22 +2246,21 @@ console run command.  This directive is required.
    keep File records in the Catalog database after the End time of the
    Job corresponding to the File records.
    When this time period expires, and if
-   {\bf AutoPrune} is set to  {\bf yes} Bacula will prune (remove) File records
-   that  are older than the specified File Retention period. Note, this  affects
-   only records in the catalog database. It does not  affect your archive
-   backups.  
-
-   File records  may actually be retained for a shorter period than you specify
-   on  this directive if you specify either a shorter {\bf Job Retention}  or a
-   shorter {\bf Volume Retention} period. The shortest  retention period of the
-   three takes precedence.  The time may be expressed in seconds, minutes, 
-   hours, days, weeks, months, quarters, or years. See the 
-   \ilink{ Configuration chapter}{Time} of this  manual for
-   additional details of time specification. 
+   {\bf AutoPrune} is set to {\bf yes} Bacula will prune (remove) File
+   records that are older than the specified File Retention period.  Note,
+   this affects only records in the catalog database.  It does not affect
+   your archive backups.
+
+   File records may actually be retained for a shorter period than you
+   specify on this directive if you specify either a shorter {\bf Job
+   Retention} or a shorter {\bf Volume Retention} period.  The shortest
+   retention period of the three takes precedence.  The time may be
+   expressed in seconds, minutes, hours, days, weeks, months, quarters, or
+   years.  See the \ilink{Configuration chapter}{Time} of this manual for
+   additional details of time specification.
 
    The  default is 60 days. 
 
-\label{JobRetention}
 \item [Job Retention = \lt{}time-period-specification\gt{}]
    \label{JobRetention}
    \index[dir]{Job Retention}
@@ -2325,7 +2283,7 @@ console run command.  This directive is required.
 
    The Job retention period is specified as seconds,  minutes, hours, days,
    weeks, months,  quarters, or years.  See the 
-   \ilink{ Configuration chapter}{Time} of this manual for
+   \ilink{Configuration chapter}{Time} of this manual for
    additional details of  time specification.  
 
    The default is 180 days.  
@@ -2496,8 +2454,7 @@ the Director.
    since they are found in different directories.  For this reason, you
    probably should use two different Media Types for your two disk Devices
    (even though you might think of them as both being File types).  You can
-   find more on this subject in the \ilink{Basic Volume
-   Management}{DiskChapter} chapter of this manual.
+   find more on this subject in the \ilink{Basic Volume Management}{DiskChapter} chapter of this manual.
 
    The {\bf MediaType} specified in the Director's Storage resource, {\bf
    must} correspond to the {\bf Media Type} specified in the {\bf Device}
@@ -2536,8 +2493,7 @@ the Director.
    For the autochanger to be used, you must also specify {\bf Autochanger =
    yes} in the \ilink{Device Resource}{Autochanger} in the Storage daemon's
    configuration file as well as other important Storage daemon
-   configuration information.  Please consult the \ilink{Using
-   Autochangers}{AutochangersChapter} manual of this chapter for the
+   configuration information.  Please consult the \ilink{Using Autochangers}{AutochangersChapter} manual of this chapter for the
    details of using autochangers.
 
 \item [Maximum Concurrent Jobs = \lt{}number\gt{}]
@@ -2550,10 +2506,8 @@ the Director.
    resources will also apply in addition to any limit specified here.  The
    default is set to 1, but you may set it to a larger number.  However, if
    you set the Storage daemon's number of concurrent jobs greater than one,
-   we recommend that you read the waring documented under \ilink{Maximum
-   Concurrent Jobs}{DirMaxConJobs} in the Director's resource or simply
-   turn data spooling on as documented in the \ilink{Data
-   Spooling}{SpoolingChapter} chapter of this manual.
+   we recommend that you read the waring documented under \ilink{Maximum Concurrent Jobs}{DirMaxConJobs} in the Director's resource or simply
+   turn data spooling on as documented in the \ilink{Data Spooling}{SpoolingChapter} chapter of this manual.
 
 \item [AllowCompression = \lt{}yes\vb{}no\gt{}]
   \label{AllowCompression}
@@ -2851,7 +2805,7 @@ The Pool Resource defined in the Director's configuration file
    created, changing the value  in the bacula-dir.conf file will not change what
    is stored  for the Volume. To change the value for an existing Volume  you
    must use the 
-   \ilink{\bf update volume}{UpdateCommand} command in the Console.  
+   \borgxrlink{update volume}{UpdateCommand}{console}{command} in the \consoleman{}.
 
 \item [Catalog Files = \lt{}yes\vb{}no\gt{}]
    \index[dir]{Catalog Files}
@@ -2880,27 +2834,37 @@ The Pool Resource defined in the Director's configuration file
 \item [Volume Retention = \lt{}time-period-specification\gt{}]
    \index[dir]{Volume Retention}
    \index[dir]{Directive!Volume Retention}
-   The Volume Retention directive defines the length of time that {\bf
-   Bacula} will keep records associated with the Volume in
-   the Catalog database after the End time of each Job written to the
-   Volume.  When this time period expires, and if {\bf AutoPrune} is set to
-   {\bf yes} Bacula may prune (remove) Job records that are older than the
-   specified Volume Retention period if it is necessary to free up a
-   Volume.  Recycling will not occur until it is absolutely necessary to
+   The Volume Retention directive defines the longest amount of time that
+   {\bf Bacula} will keep records associated with the Volume in the Catalog
+   database after the End time of each Job written to the Volume.  When
+   this time period expires, and if {\bf AutoPrune} is set to {\bf yes}
+   Bacula may prune (remove) Job records that are older than the specified
+   Volume Retention period if it is necessary to free up a Volume.  Note,
+   it is also possible for all the Job and File records to be pruned before
+   the Volume Retention period is reached.  In that case the Volume can
+   then be marked Pruned and subsequently recycled prior to expiration of
+   the Volume Retention period.
+
+\smallskip
+   Recycling will not occur until it is absolutely necessary to
    free up a volume (i.e. no other writable volume exists).
    All File records associated with pruned Jobs are also
    pruned.  The time may be specified as seconds, minutes, hours, days,
    weeks, months, quarters, or years.  The {\bf Volume Retention} is
    applied independently of the {\bf Job Retention} and the {\bf File
    Retention} periods defined in the Client resource.  This means that all
-   the retentions periods are applied in turn and that the shorter period
+   the retention periods are applied in turn and that the shorter period
    is the one that effectively takes precedence.  Note, that when the {\bf
    Volume Retention} period has been reached, and it is necessary to obtain
-   a new volume, Bacula will prune both the Job and the File records.  This
-   pruning could also occur during a {\bf status dir} command because it
-   uses similar algorithms for finding the next available Volume.
+   a new volume, Bacula will prune both the Job and the File records. And
+   the inverse is also true that if all the Job and File records that
+   refer to a Volume are pruned, then the Volume may be pruned and recycled
+   regardless of its retention period.  Pruning may also occur during a
+   {\bf status dir} command because it uses similar algorithms for finding
+   the next available Volume.
 
    It is important to know that when the Volume Retention period expires, 
+   or all the Job and File records have been pruned that refer to a Volume,
    Bacula does not automatically recycle a Volume. It attempts to keep the
    Volume data intact as long as possible before over writing the Volume.
    
@@ -3061,7 +3025,6 @@ Job {
    directive with care.  The default is {\bf no}.
 
 \label{PurgeOldest}
-
 \item [Purge Oldest Volume = \lt{}yes\vb{}no\gt{}]
    \index[dir]{Purge Oldest Volume}
    \index[dir]{Directive!Purge Oldest Volume}
@@ -3156,8 +3119,7 @@ Job {
    begin with a dollar sign ({\bf \$}) or a left bracket ({\bf [}).  If you
    specify variable expansion characters, you should always enclose the
    format with double quote characters ({\bf "}).  For more details on
-   variable expansion, please see the \ilink{Variable
-   Expansion}{VarsChapter} Chapter of this manual.
+   variable expansion, please see the \borgxrlink{Variable Expansion}{VarsChapter}{misc}{chapter} of the \miscman{}.
 
    If no variable expansion characters are found in the string, the Volume
    name will be formed from the {\bf format} string appended with the
@@ -3169,8 +3131,8 @@ Job {
    File-0002}, ...
 
    With the exception of Job specific variables, you can test your {\bf
-   LabelFormat} by using the \ilink{var command}{var} the Console Chapter
  of this manual.
+   LabelFormat} by using the \borgxrlink{var}{var}{console}{command} in the
\consoleman{}.
 
    In almost all cases, you should enclose the format specification (part
    after the equal sign) in double quotes.  Please note that this directive
@@ -3596,7 +3558,7 @@ An example Director configuration file might be the following:
 #   from root to your address.  See the "mail" and "operator"
 #   directives in the Messages resource.
 #
-Director {                            # define myself
+Director {                           # define myself
   Name = rufus-dir
   QueryFile = "/home/kern/bacula/bin/query.sql"
   WorkingDirectory = "/home/kern/bacula/bin/working"
@@ -3630,7 +3592,7 @@ Job {
 FileSet {
   Name = "Full Set"
   Include {
-    Options { signature=SHA1}
+    Options {signature=SHA1}
 #
 #  Put your list of files here, one per line or include an
 #    external list with: