]> git.sur5r.net Git - bacula/docs/blob - docs/manuals/en/main/newfeatures.tex
Add %C to newfeatures
[bacula/docs] / docs / manuals / en / main / newfeatures.tex
1 \chapter{New Features in 5.2.x}
2 This chapter presents the new features that have been added to the next
3 Community version of Bacula that is not yet released.
4
5 \section{New Features in 5.2.14}
6 \subsection{Additions to RunScript variables}
7 The following variables are now available in runscripts:
8 \begin{itemize}
9 \item current PID using \%P
10 \item if the job is a clone job using \%C
11 \end{itemize}
12
13 \begin{verbatim}
14 RunAfterJob = "/bin/echo Pid=%P isCloned=%C" 
15 \end{verbatim}
16
17 \section{New Features in 5.2.2}
18 This chapter presents the new features that have been added to the current
19 Community version of Bacula that is now released.
20
21 \subsection{Additions to RunScript variables}
22 You can have access to Director name using \%D in your runscript
23 command.
24
25 \begin{verbatim}
26 RunAfterJob = "/bin/echo Director=%D 
27 \end{verbatim}
28
29 \section{New Features in 5.2.1}
30 This chapter presents the new features were added in the
31 Community release version 5.2.1.
32
33 There are additional features (plugins) available in the Enterprise version
34 that are described in another chapter. A subscription to Bacula Systems
35 is required for the Enterprise version.
36
37 \subsection{LZO Compression}
38
39 LZO compression has been to the File daemon. From the user's point of view,
40 it works like the GZIP compression (just replace {\bf compression=GZIP} with
41 {\bf compression=LZO}).
42
43 For example:
44 \begin{verbatim}
45 Include {
46    Options { compression=LZO }
47    File = /home
48    File = /data
49 }
50 \end{verbatim}
51
52 LZO provides a much faster compression and decompression speed but lower
53 compression ratio than GZIP. It is a good option when you backup to disk. For
54 tape, the hardware compression is almost always a better option.
55
56 LZO is a good alternative for GZIP1 when you don't want to slow down your
57 backup. With a modern CPU it should be able to run almost as fast as:
58
59 \begin{itemize}
60 \item your client can read data from disk. Unless you have very fast disks like
61   SSD or large/fast RAID array.
62 \item the data transfers between the file daemon and the storage daemon even on
63   a 1Gb/s link.
64 \end{itemize}
65
66 Note, Bacula uses compression level LZO1X-1.
67
68 \medskip
69 The code for this feature was contributed by Laurent Papier.
70
71 \subsection{New Tray Monitor}
72
73 Since the old integrated Windows tray monitor doesn't work with
74 recent Windows versions, we have written a new Qt Tray Monitor that is available
75 for both Linux and Windows.  In addition to all the previous features,
76 this new version allows you to run Backups from 
77 the tray monitor menu.
78
79 \begin{figure}[htbp]
80   \centering
81   \includegraphics[width=10cm]{\idir tray-monitor}
82   \label{fig:traymonitor}
83   \caption{New tray monitor}
84 \end{figure}
85
86 \begin{figure}[htbp]
87   \centering
88   \includegraphics[width=10cm]{\idir tray-monitor1}
89   \label{fig:traymonitor1}
90   \caption{Run a Job through the new tray monitor}
91 \end{figure}
92
93
94 To be able to run a job from the tray monitor, you need to
95 allow specific commands in the Director monitor console:
96 \begin{verbatim}
97 Console {
98     Name = win2003-mon
99     Password = "xxx"
100     CommandACL = status, .clients, .jobs, .pools, .storage, .filesets, .messages, run
101     ClientACL = *all*               # you can restrict to a specific host
102     CatalogACL = *all*
103     JobACL = *all*
104     StorageACL = *all*
105     ScheduleACL = *all*
106     PoolACL = *all*
107     FileSetACL = *all*
108     WhereACL = *all*
109 }
110 \end{verbatim}
111
112 \medskip
113 This project was funded by Bacula Systems and is available with Bacula
114 the Enterprise Edition and the Community Edition.
115
116 \subsection{Purge Migration Job}
117
118 The new {\bf Purge Migration Job} directive may be added to the Migration
119 Job definition in the Director's configuration file. When it is enabled 
120 the Job that was migrated during a migration will be purged at
121 the end of the migration job.
122
123 For example:
124 \begin{verbatim}
125 Job {
126   Name = "migrate-job"
127   Type = Migrate
128   Level = Full
129   Client = localhost-fd
130   FileSet = "Full Set"
131   Messages = Standard
132   Storage = DiskChanger
133   Pool = Default
134   Selection Type = Job
135   Selection Pattern = ".*Save"
136 ...
137   Purge Migration Job = yes
138 }
139 \end{verbatim}
140
141 \medskip
142
143 This project was submitted by Dunlap Blake; testing and documentation was funded
144 by Bacula Systems.
145
146 \subsection{Changes in Bvfs (Bacula Virtual FileSystem)}
147
148 Bat has now a bRestore panel that uses Bvfs to display files and
149 directories.
150
151 \begin{figure}[htbp]
152   \centering
153   \includegraphics[width=12cm]{\idir bat-brestore}
154   \label{fig:batbrestore}
155   \caption{Bat Brestore Panel}
156 \end{figure}
157
158 the Bvfs module works correctly with BaseJobs, Copy and Migration jobs.
159
160 \medskip
161 This project was funded by Bacula Systems.
162
163 \subsubsection*{General notes}
164
165 \begin{itemize}
166 \item All fields are separated by a tab
167 \item You can specify \texttt{limit=} and \texttt{offset=} to list smoothly
168   records in very big directories
169 \item All operations (except cache creation) are designed to run instantly
170 \item At this time, Bvfs works faster on PostgreSQL than MySQL catalog. If you
171   can contribute new faster SQL queries we will be happy, else don't complain
172   about speed.
173 \item The cache creation is dependent of the number of directories. As Bvfs
174   shares information across jobs, the first creation can be slow
175 \item All fields are separated by a tab
176 \item Due to potential encoding problem, it's advised to always use pathid in
177   queries.
178 \end{itemize}
179
180 \subsubsection*{Get dependent jobs from a given JobId}
181
182 Bvfs allows you to query the catalog against any combination of jobs. You
183 can combine all Jobs and all FileSet for a Client in a single session.
184
185 To get all JobId needed to restore a particular job, you can use the
186 \texttt{.bvfs\_get\_jobids} command.
187
188 \begin{verbatim}
189 .bvfs_get_jobids jobid=num [all]
190 \end{verbatim}
191
192 \begin{verbatim}
193 .bvfs_get_jobids jobid=10
194 1,2,5,10
195 .bvfs_get_jobids jobid=10 all
196 1,2,3,5,10
197 \end{verbatim}
198
199 In this example, a normal restore will need to use JobIds 1,2,5,10 to
200 compute a complete restore of the system.
201
202 With the \texttt{all} option, the Director will use all defined FileSet for
203 this client.
204
205 \subsubsection*{Generating Bvfs cache}
206
207 The \texttt{.bvfs\_update} command computes the directory cache for jobs
208 specified in argument, or for all jobs if unspecified.
209
210 \begin{verbatim}
211 .bvfs_update [jobid=numlist]
212 \end{verbatim}
213
214 Example:
215 \begin{verbatim}
216 .bvfs_update jobid=1,2,3
217 \end{verbatim}
218
219 You can run the cache update process in a RunScript after the catalog backup.
220
221 \subsubsection*{Get all versions of a specific file}
222
223 Bvfs allows you to find all versions of a specific file for a given Client with
224 the \texttt{.bvfs\_version} command. To avoid problems with encoding, this
225 function uses only PathId and FilenameId. The jobid argument is mandatory but
226 unused.
227
228 \begin{verbatim}
229 .bvfs_versions client=filedaemon pathid=num filenameid=num jobid=1
230 PathId FilenameId FileId JobId LStat Md5 VolName Inchanger
231 PathId FilenameId FileId JobId LStat Md5 VolName Inchanger
232 ...
233 \end{verbatim}
234
235 Example:
236
237 \begin{verbatim}
238 .bvfs_versions client=localhost-fd pathid=1 fnid=47 jobid=1
239 1  47  52  12  gD HRid IGk D Po Po A P BAA I A   /uPgWaxMgKZlnMti7LChyA  Vol1  1
240 \end{verbatim}
241
242 \subsubsection*{List directories}
243
244 Bvfs allows you to list directories in a specific path.
245 \begin{verbatim}
246 .bvfs_lsdirs pathid=num path=/apath jobid=numlist limit=num offset=num
247 PathId  FilenameId  FileId  JobId  LStat  Path
248 PathId  FilenameId  FileId  JobId  LStat  Path
249 PathId  FilenameId  FileId  JobId  LStat  Path
250 ...
251 \end{verbatim}
252
253 You need to \texttt{pathid} or \texttt{path}. Using \texttt{path=""} will list
254 ``/'' on Unix and all drives on Windows.  If FilenameId is 0, the record
255 listed is a directory.
256
257 \begin{verbatim}
258 .bvfs_lsdirs pathid=4 jobid=1,11,12
259 4       0       0       0       A A A A A A A A A A A A A A     .
260 5       0       0       0       A A A A A A A A A A A A A A     ..
261 3       0       0       0       A A A A A A A A A A A A A A     regress/
262 \end{verbatim}
263
264 In this example, to list directories present in \texttt{regress/}, you can use
265 \begin{verbatim}
266 .bvfs_lsdirs pathid=3 jobid=1,11,12
267 3       0       0       0       A A A A A A A A A A A A A A     .
268 4       0       0       0       A A A A A A A A A A A A A A     ..
269 2       0       0       0       A A A A A A A A A A A A A A     tmp/
270 \end{verbatim}
271
272 \subsubsection*{List files}
273
274 Bvfs allows you to list files in a specific path.
275 \begin{verbatim}
276 .bvfs_lsfiles pathid=num path=/apath jobid=numlist limit=num offset=num
277 PathId  FilenameId  FileId  JobId  LStat  Path
278 PathId  FilenameId  FileId  JobId  LStat  Path
279 PathId  FilenameId  FileId  JobId  LStat  Path
280 ...
281 \end{verbatim}
282
283 You need to \texttt{pathid} or \texttt{path}. Using \texttt{path=""} will list
284 ``/'' on Unix and all drives on Windows. If FilenameId is 0, the record listed
285 is a directory.
286
287 \begin{verbatim}
288 .bvfs_lsfiles pathid=4 jobid=1,11,12
289 4       0       0       0       A A A A A A A A A A A A A A     .
290 5       0       0       0       A A A A A A A A A A A A A A     ..
291 1       0       0       0       A A A A A A A A A A A A A A     regress/
292 \end{verbatim}
293
294 In this example, to list files present in \texttt{regress/}, you can use
295 \begin{verbatim}
296 .bvfs_lsfiles pathid=1 jobid=1,11,12
297 1   47   52   12    gD HRid IGk BAA I BMqcPH BMqcPE BMqe+t A     titi
298 1   49   53   12    gD HRid IGk BAA I BMqe/K BMqcPE BMqe+t B     toto
299 1   48   54   12    gD HRie IGk BAA I BMqcPH BMqcPE BMqe+3 A     tutu
300 1   45   55   12    gD HRid IGk BAA I BMqe/K BMqcPE BMqe+t B     ficheriro1.txt
301 1   46   56   12    gD HRie IGk BAA I BMqe/K BMqcPE BMqe+3 D     ficheriro2.txt
302 \end{verbatim}
303
304 \subsubsection*{Restore set of files}
305
306 Bvfs allows you to create a SQL table that contains files that you want to
307 restore. This table can be provided to a restore command with the file option.
308
309 \begin{verbatim}
310 .bvfs_restore fileid=numlist dirid=numlist hardlink=numlist path=b2num
311 OK
312 restore file=?b2num ...
313 \end{verbatim}
314
315 To include a directory (with \texttt{dirid}), Bvfs needs to run a query to
316 select all files. This query could be time consuming.
317
318 \texttt{hardlink} list is always composed of a series of two numbers (jobid,
319 fileindex). This information can be found in the LinkFI field of the LStat
320 packet.
321
322 The \texttt{path} argument represents the name of the table that Bvfs will
323 store results. The format of this table is \texttt{b2[0-9]+}. (Should start by
324 b2 and followed by digits).
325
326 Example:
327
328 \begin{verbatim}
329 .bvfs_restore fileid=1,2,3,4 hardlink=10,15,10,20 jobid=10 path=b20001
330 OK
331 \end{verbatim}
332
333 \subsubsection*{Cleanup after Restore}
334
335 To drop the table used by the restore command, you can use the
336 \texttt{.bvfs\_cleanup} command.
337
338 \begin{verbatim}
339 .bvfs_cleanup path=b20001
340 \end{verbatim}
341
342 \subsubsection*{Clearing the BVFS Cache}
343
344 To clear the BVFS cache, you can use the \texttt{.bvfs\_clear\_cache} command.
345
346 \begin{verbatim}
347 .bvfs_clear_cache yes
348 OK
349 \end{verbatim}
350
351 \subsection{Changes in the Pruning Algorithm}
352
353 We rewrote the job pruning algorithm in this version. Previously, in some users
354 reported that the pruning process at the end of jobs was very long. It should
355 not be longer the case. Now, Bacula won't prune automatically a Job if this
356 particular Job is needed to restore data. Example:
357
358 \begin{verbatim}
359 JobId: 1  Level: Full
360 JobId: 2  Level: Incremental
361 JobId: 3  Level: Incremental
362 JobId: 4  Level: Differential
363 .. Other incrementals up to now
364 \end{verbatim}
365
366 In this example, if the Job Retention defined in the Pool or in the Client
367 resource causes that Jobs with Jobid in 1,2,3,4 can be pruned, Bacula will
368 detect that JobId 1 and 4 are essential to restore data at the current state
369 and will prune only JobId 2 and 3.
370
371 \texttt{Important}, this change affect only the automatic pruning step after a
372 Job and the \texttt{prune jobs} Bconsole command. If a volume expires after the
373 \texttt{VolumeRetention} period, important jobs can be pruned.
374
375 \subsection{Ability to Verify any specified Job}
376 You now have the ability to tell Bacula which Job should verify instead of
377 automatically verify just the last one.
378
379 This feature can be used with VolumeToCatalog, DiskToCatalog and Catalog level.
380
381 To verify a given job, just specify the Job jobid in argument when starting the
382 job.
383 \begin{verbatim}
384 *run job=VerifyVolume jobid=1 level=VolumeToCatalog
385 Run Verify job
386 JobName:     VerifyVolume
387 Level:       VolumeToCatalog
388 Client:      127.0.0.1-fd
389 FileSet:     Full Set
390 Pool:        Default (From Job resource)
391 Storage:     File (From Job resource)
392 Verify Job:  VerifyVol.2010-09-08_14.17.17_03
393 Verify List: /tmp/regress/working/VerifyVol.bsr
394 When:        2010-09-08 14:17:31
395 Priority:    10
396 OK to run? (yes/mod/no):
397 \end{verbatim}
398
399 \medskip
400 This project was funded by Bacula Systems and is available with Bacula
401 Enterprise Edition and Community Edition.
402
403 \subsection{Additions to RunScript variables}
404 You can have access to JobBytes and JobFiles using \%b and \%F in your runscript
405 command. The Client address is now available through \%h.
406
407 \begin{verbatim}
408 RunAfterJob = "/bin/echo Job=%j JobBytes=%b JobFiles=%F ClientAddress=%h"
409 \end{verbatim}
410
411 %\subsection{Changes in drivetype.exe}
412 %
413 %Now the \texttt{drivetype.exe} program allows you to list all local hard
414 %drives. It can help to build dynamic FileSet on Windows.
415 %
416 %\begin{verbatim}
417 %File = "\\|\"c:/program files/bacula/bin32/drivetype\" -l -a"
418 %\end{verbatim}
419 %
420
421 \subsection{Additions to the Plugin API}
422 The bfuncs structure has been extended to include a number of
423 new entrypoints.
424
425 \subsubsection{bfuncs}
426 The bFuncs structure defines the callback entry points within Bacula
427 that the plugin can use register events, get Bacula values, set
428 Bacula values, and send messages to the Job output or debug output.
429
430 The exact definition as of this writing is:
431 \begin{verbatim}
432 typedef struct s_baculaFuncs {
433    uint32_t size;
434    uint32_t version;
435    bRC (*registerBaculaEvents)(bpContext *ctx, ...);
436    bRC (*getBaculaValue)(bpContext *ctx, bVariable var, void *value);
437    bRC (*setBaculaValue)(bpContext *ctx, bVariable var, void *value);
438    bRC (*JobMessage)(bpContext *ctx, const char *file, int line,
439        int type, utime_t mtime, const char *fmt, ...);
440    bRC (*DebugMessage)(bpContext *ctx, const char *file, int line,
441        int level, const char *fmt, ...);
442    void *(*baculaMalloc)(bpContext *ctx, const char *file, int line,
443        size_t size);
444    void (*baculaFree)(bpContext *ctx, const char *file, int line, void *mem);
445    
446    /* New functions follow */
447    bRC (*AddExclude)(bpContext *ctx, const char *file);
448    bRC (*AddInclude)(bpContext *ctx, const char *file);
449    bRC (*AddIncludeOptions)(bpContext *ctx, const char *opts);
450    bRC (*AddRegex)(bpContext *ctx, const char *item, int type);
451    bRC (*AddWild)(bpContext *ctx, const char *item, int type);
452    bRC (*checkChanges)(bpContext *ctx, struct save_pkt *sp);
453
454 } bFuncs;
455 \end{verbatim}
456
457 \begin{description}
458 \item [AddExclude] can be called to exclude a file. The file
459   string passed may include wildcards that will be interpreted by
460   the {\bf fnmatch} subroutine. This function can be called 
461   multiple times, and each time the file specified will be added
462   to the list of files to be excluded. Note, this function only
463   permits adding excludes of specific file or directory names,
464   or files matched by the rather simple fnmatch mechanism.
465   See below for information on doing wild-card and regex excludes.
466
467 \item [NewPreInclude] can be called to create a new Include block. This
468   block will be added after the current defined Include block. This
469   function can be called multiple times, but each time, it will create
470   a new Include section (not normally needed). This function should
471   be called only if you want to add an entirely new Include block.
472
473 \item [NewInclude] can be called to create a new Include block. This
474   block will be added before any user defined Include blocks. This
475   function can be called multiple times, but each time, it will create
476   a new Include section (not normally needed). This function should
477   be called only if you want to add an entirely new Include block.
478
479 \item [AddInclude] can be called to add new files/directories to
480   be included.  They are added to the current Include block. If
481   NewInclude has not been included, the current Include block is
482   the last one that the user created. This function
483   should be used only if you want to add totally new files/directories
484   to be included in the backup. 
485
486 \item [NewOptions] adds a new Options block to the current Include
487   in front of any other Options blocks. This permits the plugin to
488   add exclude directives (wild-cards and regexes) in front of the
489   user Options, and thus prevent certain files from being backed up.
490   This can be useful if the plugin backs up files, and they should
491   not be also backed up by the main Bacula code.  This function
492   may be called multiple times, and each time, it creates a new
493   prepended Options block. Note: normally you want to call this 
494   entry point prior to calling AddOptions, AddRegex, or AddWild.
495   
496 \item [AddOptions] allows the plugin it set options in
497   the current Options block, which is normally created with the
498   NewOptions call just prior to adding Include Options.
499   The permitted options are passed as a character string, where
500   each character has a specific meaning as defined below:
501
502   \begin{description}
503   \item [a] always replace files (default).
504   \item [e] exclude rather than include.
505   \item [h] no recursion into subdirectories.
506   \item [H] do not handle hard links.
507   \item [i] ignore case in wildcard and regex matches.
508   \item [M] compute an MD5 sum.
509   \item [p] use a portable data format on Windows (not recommended).
510   \item [R] backup resource forks and Findr Info.
511   \item [r] read from a fifo
512   \item [S1] compute an SHA1 sum.
513   \item [S2] compute an SHA256 sum.
514   \item [S3] comput an SHA512 sum.
515   \item [s] handle sparse files.
516   \item [m] use st\_mtime only for file differences.
517   \item [k] restore the st\_atime after accessing a file.
518   \item [A] enable ACL backup.
519   \item [Vxxx:] specify verify options. Must terminate with :
520   \item [Cxxx:] specify accurate options. Must terminate with :
521   \item [Jxxx:] specify base job Options. Must terminate with :
522   \item [Pnnn:] specify integer nnn paths to strip. Must terminate with :
523   \item [w] if newer
524   \item [Zn] specify gzip compression level n.
525   \item [K] do not use st\_atime in backup decision.
526   \item [c] check if file changed during backup.
527   \item [N] honor no dump flag.
528   \item [X] enable backup of extended attributes.
529   \end{description}
530
531 \item [AddRegex] adds a regex expression to the current Options block.
532   The following options are permitted:
533   \begin{description}
534   \item [ ] (a blank) regex applies to whole path and filename.
535   \item [F] regex applies only to the filename (directory or path stripped).
536   \item [D] regex applies only to the directory (path) part of the name.
537   \end{description}
538
539 \item [AddWild] adds a wildcard expression to the current Options block.
540   The following options are permitted:
541   \begin{description}
542   \item [ ] (a blank) regex applies to whole path and filename.
543   \item [F] regex applies only to the filename (directory or path stripped).
544   \item [D] regex applies only to the directory (path) part of the name.
545   \end{description}
546
547 \item [checkChanges] call the \texttt{check\_changes()} function in Bacula code
548   that can use Accurate code to compare the file information in argument with
549   the previous file information. The \texttt{delta\_seq} attribute of the
550   \texttt{save\_pkt} will be updated, and the call will return
551   \texttt{bRC\_Seen} if the core code wouldn't decide to backup it.
552   
553 \end{description}
554   
555
556 \subsubsection{Bacula events}
557 The list of events has been extended to include:
558
559 \begin{verbatim}
560 typedef enum {
561   bEventJobStart        = 1,
562   bEventJobEnd          = 2,
563   bEventStartBackupJob  = 3,
564   bEventEndBackupJob    = 4,
565   bEventStartRestoreJob = 5,
566   bEventEndRestoreJob   = 6,
567   bEventStartVerifyJob  = 7,
568   bEventEndVerifyJob    = 8,
569   bEventBackupCommand   = 9,
570   bEventRestoreCommand  = 10,
571   bEventLevel           = 11,
572   bEventSince           = 12,
573    
574   /* New events */
575   bEventCancelCommand                   = 13,
576   bEventVssBackupAddComponents          = 14,
577   bEventVssRestoreLoadComponentMetadata = 15,
578   bEventVssRestoreSetComponentsSelected = 16,
579   bEventRestoreObject                   = 17,
580   bEventEndFileSet                      = 18,
581   bEventPluginCommand                   = 19,
582   bEventVssBeforeCloseRestore           = 20,
583   bEventVssPrepareSnapshot              = 21
584
585 } bEventType;
586 \end{verbatim}
587
588 \begin{description}
589 \item [bEventCancelCommand] is called whenever the currently
590   running Job is canceled */
591
592 \item [bEventVssBackupAddComponents] 
593
594 \item [bEventVssPrepareSnapshot] is called before creating VSS snapshots, it
595   provides a char[27] table where the plugin can add Windows drives that will
596   be used during the Job. You need to add them without duplicates, and you can
597   use in \texttt{fd\_common.h} \texttt{add\_drive()} and \texttt{copy\_drives()}
598   for this purpose.
599 \end{description}
600
601 \subsection{ACL enhancements}
602
603 The following enhancements are made to the Bacula Filed with regards to
604 Access Control Lists (ACLs)
605
606 \begin{itemize}
607 \item Added support for AIX 5.3 and later new aclx\_get interface which supports
608   POSIX and NFSv4 ACLs.
609 \item Added support for new acl types on FreeBSD 8.1 and later which supports
610   POSIX and NFSv4 ACLs.
611 \item Some generic cleanups for internal ACL handling.
612 \item Fix for acl storage on OSX
613 \item Cleanup of configure checks for ACL detection, now configure only
614   tests for a certain interface type based on the operating system
615   this should give less false positives on detection. Also when ACLs
616   are detected no other acl checks are performed anymore.
617 \end{itemize}
618
619 \medskip
620 This project was funded by Planets Communications B.V. and ELM Consultancy B.V.
621 and is available with Bacula Enterprise Edition and Community Edition.
622
623 \subsection{XATTR enhancements}
624
625 The following enhancements are made to the Bacula Filed with regards to
626 Extended Attributes (XATTRs)
627
628 \begin{itemize}
629 \item Added support for IRIX extended attributes using the attr\_get interface.
630 \item Added support for Tru64 (OSF1) extended attributes using the
631   getproplist interface.
632 \item Added support for AIX extended attributes available in AIX 6.x
633   and higher using the listea/getea/setea interface.
634 \item Added some debugging to generic xattr code so it easier to
635   debug.
636 \item Cleanup of configure checks for XATTR detection, now configure only
637   tests for a certain interface type based on the operating system
638   this should give less false positives on detection. Also when xattrs
639   are detected no other xattr checks are performed anymore.
640 \end{itemize}
641
642 \medskip
643 This project was funded by Planets Communications B.V. and ELM Consultancy B.V.
644 and is available with Bacula Enterprise Edition and Community Edition.
645
646 \subsection{Class Based Database Backend Drivers}
647
648 The main Bacula Director code is independent of the SQL backend
649 in version 5.2.0 and greater.  This means that the Bacula Director can be
650 packaged by itself, then each of the different SQL backends supported can
651 be packaged separately.  It is possible to build all the DB backends at the
652 same time by including multiple database options at the same time.
653
654 ./configure can be run with multiple database configure options.
655 \begin{verbatim}
656    --with-sqlite3
657    --with-mysql
658    --with-postgresql
659 \end{verbatim}
660
661 Order of testing for databases is:
662 \begin{itemize}
663 \item postgresql
664 \item mysql
665 \item sqlite3
666 \end{itemize}
667
668 Each configured backend generates a file named:
669 \verb+libbaccats-<sql_backend_name>-<version>.so+
670 A dummy catalog library is created named libbaccats-version.so
671
672 At configure time the first detected backend is used as the so called
673 default backend and at install time the dummy
674 \verb+libbaccats-<version>.so+ is replaced with the default backend type.
675
676 If you configure all three backends you get three backend libraries and the
677 postgresql gets installed as the default.
678
679 When you want to switch to another database, first save any old catalog you
680 may have then you can copy one of the three backend libraries over the
681 \verb+libbaccats-<version>.so+ e.g.
682
683 An actual command, depending on your Bacula version might be:
684 \begin{verbatim}
685    cp libbaccats-postgresql-5.2.2.so libbaccats-5.2.2.so
686 \end{verbatim}
687
688 where the \verb+5.2.2+ must be replaced by the Bacula release
689 version number.
690
691 Then you must update the default backend in the following files:
692
693 \begin{verbatim}
694   create_bacula_database
695   drop_bacula_database
696   drop_bacula_tables
697   grant_bacula_privileges
698   make_bacula_tables
699   make_catalog_backup
700   update_bacula_tables
701 \end{verbatim}
702
703 And re-run all the above scripts.  Please note, this means
704 you will have a new empty database and if you had a previous
705 one it will be lost.
706
707 All current database backend drivers for catalog information are rewritten
708 to use a set of multi inherited C++ classes which abstract the specific
709 database specific internals and make sure we have a more stable generic
710 interface with the rest of SQL code.  From now on there is a strict
711 boundary between the SQL code and the low-level database functions.  This
712 new interface should also make it easier to add a new backend for a
713 currently unsupported database.  As part of the rewrite the SQLite 2 code
714 was removed (e.g.  only SQLite 3 is now supported).  An extra bonus of the
715 new code is that you can configure multiple backends in the configure and
716 build all backends in one compile session and select the correct database
717 backend at install time.  This should make it a lot easier for packages
718 maintainers.
719
720
721
722 \medskip
723 We also added cursor support for PostgreSQL backend, this improves memory
724 usage for large installation.
725
726 \medskip
727 This project was implemented by Planets Communications B.V. and ELM
728 Consultancy B.V. and Bacula Systems and is available with both the Bacula
729 Enterprise Edition and the Community Edition.
730
731 \subsection{Hash List Enhancements}
732
733 The htable hash table class has been extended with extra hash functions for
734 handling next to char pointer hashes also 32 bits and 64 bits hash keys.
735 Also the hash table initialization routines have been enhanced with
736 support for passing a hint as to the number of initial pages to use
737 for the size of the hash table. Until now the hash table always used
738 a fixed value of 10 Mb. The private hash functions of the mountpoint entry
739 cache have been rewritten to use the new htable class with a small memory
740 footprint.
741
742 \medskip
743 This project was funded by Planets Communications B.V. and ELM Consultancy B.V.
744 and Bacula Systems and is available with Bacula Enterprise Edition and
745 Community Edition.
746
747 %%
748 %%
749 %%% =====================================================================
750 %%
751 %%
752
753
754 \section{Release Version 5.0.3}
755
756 There are no new features in version 5.0.2.  This version simply fixes a
757 number of bugs found in version 5.0.1 during the ongoing development
758 process.
759
760 \section{Release Version 5.0.2}
761
762 There are no new features in version 5.0.2.  This version simply fixes a
763 number of bugs found in version 5.0.1 during the ongoing development
764 process.
765
766 %%
767 %%
768
769 \section{New Features in 5.0.1}
770
771 This chapter presents the new features that are in the released Bacula version
772 5.0.1. This version mainly fixes a number of bugs found in version 5.0.0 during
773 the ongoing development process.
774
775 \subsection{Truncate Volume after Purge}
776 \label{sec:actiononpurge}
777
778 The Pool directive \textbf{ActionOnPurge=Truncate} instructs Bacula to truncate
779 the volume when it is purged with the new command \texttt{purge volume
780   action}. It is useful to prevent disk based volumes from consuming too much
781 space.
782
783 \begin{verbatim}
784 Pool {
785   Name = Default
786   Action On Purge = Truncate
787   ...
788 }
789 \end{verbatim}
790
791 As usual you can also set this property with the \texttt{update volume} command
792 \begin{verbatim}
793 *update volume=xxx ActionOnPurge=Truncate
794 *update volume=xxx actiononpurge=None
795 \end{verbatim}
796
797 To ask Bacula to truncate your \texttt{Purged} volumes, you need to use the
798 following command in interactive mode or in a RunScript as shown after:
799 \begin{verbatim}
800 *purge volume action=truncate storage=File allpools
801 # or by default, action=all
802 *purge volume action storage=File pool=Default
803 \end{verbatim}
804
805 This is possible to specify the volume name, the media type, the pool, the
806 storage, etc\dots (see \texttt{help purge}) Be sure that your storage device is
807 idle when you decide to run this command.
808
809 \begin{verbatim}
810 Job {
811  Name = CatalogBackup
812  ...
813  RunScript {
814    RunsWhen=After
815    RunsOnClient=No
816    Console = "purge volume action=all allpools storage=File"
817  }
818 }
819 \end{verbatim}
820
821 \textbf{Important note}: This feature doesn't work as
822 expected in version 5.0.0. Please do not use it before version 5.0.1.
823
824 \subsection{Allow Higher Duplicates}
825 This directive did not work correctly and has been depreciated
826 (disabled) in version 5.0.1. Please remove it from your bacula-dir.conf
827 file as it will be removed in a future release.
828
829 \subsection{Cancel Lower Level Duplicates}
830 This directive was added in Bacula version 5.0.1.  It compares the
831 level of a new backup job to old jobs of the same name, if any,
832 and will kill the job which has a lower level than the other one.
833 If the levels are the same (i.e. both are Full backups), then 
834 nothing is done and the other Cancel XXX Duplicate directives
835 will be examined.
836
837 \section{New Features in 5.0.0}
838
839 \subsection{Maximum Concurrent Jobs for Devices}
840 \label{sec:maximumconcurrentjobdevice}
841
842 {\bf Maximum Concurrent Jobs} is a new Device directive in the Storage
843 Daemon configuration permits setting the maximum number of Jobs that can
844 run concurrently on a specified Device.  Using this directive, it is
845 possible to have different Jobs using multiple drives, because when the
846 Maximum Concurrent Jobs limit is reached, the Storage Daemon will start new
847 Jobs on any other available compatible drive.  This facilitates writing to
848 multiple drives with multiple Jobs that all use the same Pool.
849
850 This project was funded by Bacula Systems.
851
852 \subsection{Restore from Multiple Storage Daemons}
853 \index[general]{Restore}
854
855 Previously, you were able to restore from multiple devices in a single Storage
856 Daemon. Now, Bacula is able to restore from multiple Storage Daemons. For
857 example, if your full backup runs on a Storage Daemon with an autochanger, and
858 your incremental jobs use another Storage Daemon with lots of disks, Bacula
859 will switch automatically from one Storage Daemon to an other within the same
860 Restore job.
861
862 You must upgrade your File Daemon to version 3.1.3 or greater to use this
863 feature.
864
865 This project was funded by Bacula Systems with the help of Equiinet.
866
867 \subsection{File Deduplication using Base Jobs}
868 A base job is sort of like a Full save except that you will want the FileSet to
869 contain only files that are unlikely to change in the future (i.e.  a snapshot
870 of most of your system after installing it).  After the base job has been run,
871 when you are doing a Full save, you specify one or more Base jobs to be used.
872 All files that have been backed up in the Base job/jobs but not modified will
873 then be excluded from the backup.  During a restore, the Base jobs will be
874 automatically pulled in where necessary.
875
876 This is something none of the competition does, as far as we know (except
877 perhaps BackupPC, which is a Perl program that saves to disk only).  It is big
878 win for the user, it makes Bacula stand out as offering a unique optimization
879 that immediately saves time and money.  Basically, imagine that you have 100
880 nearly identical Windows or Linux machine containing the OS and user files.
881 Now for the OS part, a Base job will be backed up once, and rather than making
882 100 copies of the OS, there will be only one.  If one or more of the systems
883 have some files updated, no problem, they will be automatically restored.
884
885 See the \ilink{Base Job Chapter}{basejobs} for more information.
886
887 This project was funded by Bacula Systems.
888
889 \subsection{AllowCompression = \lt{}yes\vb{}no\gt{}}
890 \index[dir]{AllowCompression}
891
892 This new directive may be added to Storage resource within the Director's
893 configuration to allow users to selectively disable the client compression for
894 any job which writes to this storage resource.
895
896 For example:
897 \begin{verbatim}
898 Storage {
899   Name = UltriumTape
900   Address = ultrium-tape
901   Password = storage_password # Password for Storage Daemon
902   Device = Ultrium
903   Media Type = LTO 3
904   AllowCompression = No # Tape drive has hardware compression
905 }
906 \end{verbatim}
907 The above example would cause any jobs running with the UltriumTape storage
908 resource to run without compression from the client file daemons.  This
909 effectively overrides any compression settings defined at the FileSet level.
910
911 This feature is probably most useful if you have a tape drive which supports
912 hardware compression.  By setting the \texttt{AllowCompression = No} directive
913 for your tape drive storage resource, you can avoid additional load on the file
914 daemon and possibly speed up tape backups.
915
916 This project was funded by Collaborative Fusion, Inc.
917
918 \subsection{Accurate Fileset Options}
919 \label{sec:accuratefileset}
920
921 In previous versions, the accurate code used the file creation and modification
922 times to determine if a file was modified or not. Now you can specify which
923 attributes to use (time, size, checksum, permission, owner, group, \dots),
924 similar to the Verify options.
925
926 \begin{verbatim}
927 FileSet {
928   Name = Full
929   Include = {
930     Options {
931        Accurate = mcs
932        Verify   = pin5
933     }
934     File = /
935   }
936 }
937 \end{verbatim}
938
939 \begin{description}  
940 \item {\bf i}  compare the inodes  
941 \item {\bf p}  compare the permission bits  
942 \item {\bf n}  compare the number of links  
943 \item {\bf u}  compare the user id  
944 \item {\bf g}  compare the group id  
945 \item {\bf s}  compare the size  
946 \item {\bf a}  compare the access time  
947 \item {\bf m}  compare the modification time (st\_mtime)  
948 \item {\bf c}  compare the change time (st\_ctime)  
949 \item {\bf d}  report file size decreases  
950 \item {\bf 5}  compare the MD5 signature  
951 \item {\bf 1}  compare the SHA1 signature  
952 \end{description}
953
954 \textbf{Important note:} If you decide to use checksum in Accurate jobs,
955 the File Daemon will have to read all files even if they normally would not
956 be saved.  This increases the I/O load, but also the accuracy of the
957 deduplication.  By default, Bacula will check modification/creation time
958 and size.
959
960 This project was funded by Bacula Systems.
961
962 \subsection{Tab-completion for Bconsole}
963 \label{sec:tabcompletion}
964
965 If you build \texttt{bconsole} with readline support, you will be able to use
966 the new auto-completion mode. This mode supports all commands, gives help
967 inside command, and lists resources when required. It works also in the restore
968 mode.
969
970 To use this feature, you should have readline development package loaded on
971 your system, and use the following option in configure.
972 \begin{verbatim}
973 ./configure --with-readline=/usr/include/readline --disable-conio ...
974 \end{verbatim}
975
976 The new bconsole won't be able to tab-complete with older directors.
977
978 This project was funded by Bacula Systems.
979
980 \subsection{Pool File and Job Retention}
981 \label{sec:poolfilejobretention}
982
983 We added two new Pool directives, \texttt{FileRetention} and
984 \texttt{JobRetention}, that take precedence over Client directives of the same
985 name. It allows you to control the Catalog pruning algorithm Pool by Pool. For
986 example, you can decide to increase Retention times for Archive or OffSite Pool.
987
988 It seems obvious to us, but apparently not to some users, that given the
989 definition above that the Pool File and Job Retention periods is a global
990 override for the normal Client based pruning, which means that when the
991 Job is pruned, the pruning will apply globally to that particular Job.
992
993 Currently, there is a bug in the implementation that causes any Pool 
994 retention periods specified to apply to {\bf all} Pools for that
995 particular Client.  Thus we suggest that you avoid using these two
996 directives until this implementation problem is corrected.
997
998 \subsection{Read-only File Daemon using capabilities}
999 \label{sec:fdreadonly}
1000 This feature implements support of keeping \textbf{ReadAll} capabilities after
1001 UID/GID switch, this allows FD to keep root read but drop write permission.
1002
1003 It introduces new \texttt{bacula-fd} option (\texttt{-k}) specifying that
1004 \textbf{ReadAll} capabilities should be kept after UID/GID switch.
1005
1006 \begin{verbatim}
1007 root@localhost:~# bacula-fd -k -u nobody -g nobody
1008 \end{verbatim}
1009
1010 The code for this feature was contributed by our friends at AltLinux.
1011
1012 \subsection{Bvfs API}
1013 \label{sec:bvfs}
1014
1015 To help developers of restore GUI interfaces, we have added new \textsl{dot
1016   commands} that permit browsing the catalog in a very simple way.
1017
1018 \begin{itemize}
1019 \item \texttt{.bvfs\_update [jobid=x,y,z]} This command is required to update
1020   the Bvfs cache in the catalog. You need to run it before any access to the
1021   Bvfs layer.
1022
1023 \item \texttt{.bvfs\_lsdirs jobid=x,y,z path=/path | pathid=101} This command
1024   will list all directories in the specified \texttt{path} or
1025   \texttt{pathid}. Using \texttt{pathid} avoids problems with character
1026   encoding of path/filenames.
1027
1028 \item \texttt{.bvfs\_lsfiles jobid=x,y,z path=/path | pathid=101} This command
1029   will list all files in the specified \texttt{path} or \texttt{pathid}. Using
1030   \texttt{pathid} avoids problems with character encoding.
1031 \end{itemize}
1032
1033 You can use \texttt{limit=xxx} and \texttt{offset=yyy} to limit the amount of
1034 data that will be displayed.
1035
1036 \begin{verbatim}
1037 * .bvfs_update jobid=1,2
1038 * .bvfs_update
1039 * .bvfs_lsdir path=/ jobid=1,2
1040 \end{verbatim}
1041
1042 This project was funded by Bacula Systems.
1043
1044 \subsection{Testing your Tape Drive}
1045 \label{sec:btapespeed}
1046
1047 To determine the best configuration of your tape drive, you can run the new
1048 \texttt{speed} command available in the \texttt{btape} program.
1049
1050 This command can have the following arguments:
1051 \begin{itemize}
1052 \item[\texttt{file\_size=n}] Specify the Maximum File Size for this test
1053   (between 1 and 5GB). This counter is in GB.
1054 \item[\texttt{nb\_file=n}] Specify the number of file to be written. The amount
1055   of data should be greater than your memory ($file\_size*nb\_file$).
1056 \item[\texttt{skip\_zero}] This flag permits to skip tests with constant
1057   data.
1058 \item[\texttt{skip\_random}] This flag permits to skip tests with random
1059   data.
1060 \item[\texttt{skip\_raw}] This flag permits to skip tests with raw access.
1061 \item[\texttt{skip\_block}] This flag permits to skip tests with Bacula block
1062   access.
1063 \end{itemize}
1064
1065 \begin{verbatim}
1066 *speed file_size=3 skip_raw
1067 btape.c:1078 Test with zero data and bacula block structure.
1068 btape.c:956 Begin writing 3 files of 3.221 GB with blocks of 129024 bytes.
1069 ++++++++++++++++++++++++++++++++++++++++++
1070 btape.c:604 Wrote 1 EOF to "Drive-0" (/dev/nst0)
1071 btape.c:406 Volume bytes=3.221 GB. Write rate = 44.128 MB/s
1072 ...
1073 btape.c:383 Total Volume bytes=9.664 GB. Total Write rate = 43.531 MB/s
1074
1075 btape.c:1090 Test with random data, should give the minimum throughput.
1076 btape.c:956 Begin writing 3 files of 3.221 GB with blocks of 129024 bytes.
1077 +++++++++++++++++++++++++++++++++++++++++++
1078 btape.c:604 Wrote 1 EOF to "Drive-0" (/dev/nst0)
1079 btape.c:406 Volume bytes=3.221 GB. Write rate = 7.271 MB/s
1080 +++++++++++++++++++++++++++++++++++++++++++
1081 ...
1082 btape.c:383 Total Volume bytes=9.664 GB. Total Write rate = 7.365 MB/s
1083
1084 \end{verbatim}
1085
1086 When using compression, the random test will give your the minimum throughput
1087 of your drive . The test using constant string will give you the maximum speed
1088 of your hardware chain. (CPU, memory, SCSI card, cable, drive, tape).
1089
1090 You can change the block size in the Storage Daemon configuration file.
1091
1092 \subsection{New {\bf Block Checksum} Device Directive}
1093 You may now turn off the Block Checksum (CRC32) code
1094 that Bacula uses when writing blocks to a Volume.  This is
1095 done by adding:
1096
1097 \begin{verbatim}
1098 Block Checksum = no
1099 \end{verbatim}
1100
1101 doing so can reduce the Storage daemon CPU usage slightly.  It
1102 will also permit Bacula to read a Volume that has corrupted data.
1103
1104 The default is {\bf yes} -- i.e. the checksum is computed on write
1105 and checked on read. 
1106
1107 We do not recommend to turn this off particularly on older tape
1108 drives or for disk Volumes where doing so may allow corrupted data
1109 to go undetected.
1110
1111 \subsection{New Bat Features}
1112
1113 Those new features were funded by Bacula Systems.
1114
1115 \subsubsection{Media List View}
1116
1117 By clicking on ``Media'', you can see the list of all your volumes. You will be
1118 able to filter by Pool, Media Type, Location,\dots And sort the result directly
1119 in the table. The old ``Media'' view is now known as ``Pool''.
1120 \begin{figure}[htbp]
1121   \centering
1122   \includegraphics[width=13cm]{\idir bat-mediaview.eps}
1123   \label{fig:mediaview}
1124 \end{figure}
1125
1126
1127 \subsubsection{Media Information View}
1128
1129 By double-clicking on a volume (on the Media list, in the Autochanger content
1130 or in the Job information panel), you can access a detailed overview of your
1131 Volume. (cf \ref{fig:mediainfo}.)
1132 \begin{figure}[htbp]
1133   \centering
1134   \includegraphics[width=13cm]{\idir bat11.eps}  
1135   \caption{Media information}
1136   \label{fig:mediainfo}
1137 \end{figure}
1138
1139 \subsubsection{Job Information View}
1140
1141 By double-clicking on a Job record (on the Job run list or in the Media
1142 information panel), you can access a detailed overview of your Job. (cf
1143 \ref{fig:jobinfo}.)
1144 \begin{figure}[htbp]
1145   \centering
1146   \includegraphics[width=13cm]{\idir bat12.eps}  
1147   \caption{Job information}
1148   \label{fig:jobinfo}
1149 \end{figure}
1150
1151 \subsubsection{Autochanger Content View}
1152
1153 By double-clicking on a Storage record (on the Storage list panel), you can
1154 access a detailed overview of your Autochanger. (cf \ref{fig:jobinfo}.)
1155 \begin{figure}[htbp]
1156   \centering
1157   \includegraphics[width=13cm]{\idir bat13.eps}  
1158   \caption{Autochanger content}
1159   \label{fig:achcontent}
1160 \end{figure}
1161
1162 To use this feature, you need to use the latest mtx-changer script
1163 version. (With new \texttt{listall} and \texttt{transfer} commands)
1164
1165 \subsection{Bat on Windows}
1166 We have ported {\bf bat} to Windows and it is now installed 
1167 by default when the installer is run.  It works quite well 
1168 on Win32, but has not had a lot of testing there, so your
1169 feedback would be welcome.  Unfortunately, even though it is
1170 installed by default, it does not yet work on 64 bit Windows
1171 operating systems.
1172
1173 \subsection{New Win32 Installer}
1174 The Win32 installer has been modified in several very important
1175 ways.  
1176 \begin{itemize}
1177 \item You must deinstall any current version of the
1178 Win32 File daemon before upgrading to the new one. 
1179 If you forget to do so, the new installation will fail.
1180 To correct this failure, you must manually shutdown 
1181 and deinstall the old File daemon. 
1182 \item All files (other than menu links) are installed
1183 in {\bf c:/Program Files/Bacula}.  
1184 \item The installer no longer sets this
1185 file to require administrator privileges by default. If you want
1186 to do so, please do it manually using the {\bf cacls} program.
1187 For example:
1188 \begin{verbatim}
1189 cacls "C:\Program Files\Bacula" /T /G SYSTEM:F Administrators:F
1190 \end{verbatim}
1191 \item The server daemons (Director and Storage daemon) are
1192 no longer included in the Windows installer.  If you want the
1193 Windows servers, you will either need to build them yourself (note
1194 they have not been ported to 64 bits), or you can contact 
1195 Bacula Systems about this.
1196 \end{itemize}
1197
1198 \subsection{Win64 Installer}
1199 We have corrected a number of problems that required manual
1200 editing of the conf files.  In most cases, it should now
1201 install and work.  {\bf bat} is by default installed in
1202 {\bf c:/Program Files/Bacula/bin32} rather than
1203 {\bf c:/Program Files/Bacula} as is the case with the 32
1204 bit Windows installer.
1205
1206 \subsection{Linux Bare Metal Recovery USB Key}
1207 We have made a number of significant improvements in the
1208 Bare Metal Recovery USB key.  Please see the README files
1209 it the {\bf rescue} release for more details.  
1210
1211 We are working on an equivalent USB key for Windows bare
1212 metal recovery, but it will take some time to develop it (best
1213 estimate 3Q2010 or 4Q2010)
1214
1215
1216 \subsection{bconsole Timeout Option}
1217 You can now use the -u option of {\bf bconsole} to set a timeout in seconds
1218 for commands. This is useful with GUI programs that use {\bf bconsole}
1219 to interface to the Director.
1220
1221 \subsection{Important Changes}
1222 \label{sec:importantchanges}
1223
1224 \begin{itemize}
1225 \item You are now allowed to Migrate, Copy, and Virtual Full to read and write
1226   to the same Pool. The Storage daemon ensures that you do not read and
1227   write to the same Volume.
1228 \item The \texttt{Device Poll Interval} is now 5 minutes. (previously did not
1229   poll by default).
1230 \item Virtually all the features of {\bf mtx-changer} have
1231   now been parametrized, which allows you to configure
1232   mtx-changer without changing it. There is a new configuration file {\bf mtx-changer.conf} 
1233   that contains variables that you can set to configure mtx-changer.
1234   This configuration file will not be overwritten during upgrades.
1235   We encourage you to submit any changes
1236   that are made to mtx-changer and to parametrize it all in
1237   mtx-changer.conf so that all configuration will be done by
1238   changing only mtx-changer.conf.
1239 \item The new \texttt{mtx-changer} script has two new options, \texttt{listall}
1240   and \texttt{transfer}. Please configure them as appropriate
1241   in mtx-changer.conf.
1242 \item To enhance security of the \texttt{BackupCatalog} job, we provide a new
1243   script (\texttt{make\_catalog\_backup.pl}) that does not expose your catalog
1244   password. If you want to use the new script, you will need to 
1245   manually change the \texttt{BackupCatalog} Job definition.
1246 \item The \texttt{bconsole} \texttt{help} command now accepts
1247   an argument, which if provided produces information on that
1248   command (ex: \texttt{help run}).
1249 \end{itemize}
1250
1251
1252 \subsubsection*{Truncate volume after purge}
1253
1254 Note that the Truncate Volume after purge feature doesn't work as expected
1255 in 5.0.0 version. Please, don't use it before version 5.0.1.
1256
1257 \subsubsection{Custom Catalog queries}
1258
1259 If you wish to add specialized commands that list the contents of the catalog,
1260 you can do so by adding them to the \texttt{query.sql} file. This
1261 \texttt{query.sql} file is now empty by default.  The file
1262 \texttt{examples/sample-query.sql} has an a number of sample commands
1263 you might find useful.
1264
1265 \subsubsection{Deprecated parts}
1266
1267 The following items have been \textbf{deprecated} for a long time, and are now
1268 removed from the code.
1269 \begin{itemize}
1270 \item Gnome console
1271 \item Support for SQLite 2
1272 \end{itemize}
1273
1274 \subsection{Misc Changes}
1275 \label{sec:miscchanges}
1276
1277 \begin{itemize}
1278 \item Updated Nagios check\_bacula
1279 \item Updated man files
1280 \item Added OSX package generation script in platforms/darwin
1281 \item Added Spanish and Ukrainian Bacula translations
1282 \item Enable/disable command shows only Jobs that can change
1283 \item Added \texttt{show disabled} command to show disabled Jobs
1284 \item Many ACL improvements
1285 \item Added Level to FD status Job output
1286 \item Begin Ingres DB driver (not yet working)
1287 \item Split RedHat spec files into bacula, bat, mtx, and docs
1288 \item Reorganized the manuals (fewer separate manuals)
1289 \item Added lock/unlock order protection in lock manager
1290 \item Allow 64 bit sizes for a number of variables
1291 \item Fixed several deadlocks or potential race conditions in the SD
1292 \end{itemize}
1293
1294 \chapter{Released Version 3.0.3 and 3.0.3a}
1295
1296 There are no new features in version 3.0.3.  This version simply fixes a
1297 number of bugs found in version 3.0.2 during the ongoing development
1298 process.
1299
1300 \section{New Features in Released Version 3.0.2}
1301
1302 This chapter presents the new features added to the
1303 Released Bacula Version 3.0.2.
1304
1305 \subsection{Full Restore from a Given JobId}
1306 \index[general]{Restore menu}
1307
1308 This feature allows selecting a single JobId and having Bacula
1309 automatically select all the other jobs that comprise a full backup up to
1310 and including the selected date (through JobId).
1311
1312 Assume we start with the following jobs:
1313 \begin{verbatim}
1314 +-------+--------------+---------------------+-------+----------+------------+
1315 | jobid | client       | starttime           | level | jobfiles | jobbytes   |
1316 +-------+--------------+---------------------+-------+----------+------------
1317 | 6     | localhost-fd | 2009-07-15 11:45:49 | I     | 2        | 0          |
1318 | 5     | localhost-fd | 2009-07-15 11:45:45 | I     | 15       | 44143      |
1319 | 3     | localhost-fd | 2009-07-15 11:45:38 | I     | 1        | 10         |
1320 | 1     | localhost-fd | 2009-07-15 11:45:30 | F     | 1527     | 44143073   |
1321 +-------+--------------+---------------------+-------+----------+------------+
1322 \end{verbatim}
1323
1324 Below is an example of this new feature (which is number 12 in the
1325 menu).
1326
1327 \begin{verbatim}
1328 * restore
1329 To select the JobIds, you have the following choices:
1330      1: List last 20 Jobs run
1331      2: List Jobs where a given File is saved
1332 ...
1333     12: Select full restore to a specified Job date
1334     13: Cancel
1335
1336 Select item:  (1-13): 12
1337 Enter JobId to get the state to restore: 5
1338 Selecting jobs to build the Full state at 2009-07-15 11:45:45
1339 You have selected the following JobIds: 1,3,5
1340
1341 Building directory tree for JobId(s) 1,3,5 ...  +++++++++++++++++++
1342 1,444 files inserted into the tree.
1343 \end{verbatim}
1344
1345 This project was funded by Bacula Systems.
1346
1347 \subsection{Source Address}
1348 \index[general]{Source Address}
1349
1350 A feature has been added which allows the administrator to specify the address
1351 from which the Director and File daemons will establish connections.  This
1352 may be used to simplify system configuration overhead when working in complex
1353 networks utilizing multi-homing and policy-routing.
1354
1355 To accomplish this, two new configuration directives have been implemented:
1356 \begin{verbatim}
1357 FileDaemon {
1358   FDSourceAddress=10.0.1.20    # Always initiate connections from this address
1359 }
1360
1361 Director {
1362   DirSourceAddress=10.0.1.10   # Always initiate connections from this address
1363 }
1364 \end{verbatim}
1365
1366 Simply adding specific host routes on the OS
1367 would have an undesirable side-effect: any
1368 application trying to contact the destination host would be forced to use the
1369 more specific route possibly diverting management traffic onto a backup VLAN.
1370 Instead of adding host routes for each client connected to a multi-homed backup
1371 server (for example where there are management and backup VLANs), one can
1372 use the new directives to specify a specific source address at the application
1373 level.
1374
1375 Additionally, this allows the simplification and abstraction of firewall rules
1376 when dealing with a Hot-Standby director or storage daemon configuration.  The
1377 Hot-standby pair may share a CARP address, which connections must be sourced
1378 from, while system services listen and act from the unique interface addresses.
1379
1380 This project was funded by Collaborative Fusion, Inc.
1381
1382 \subsection{Show volume availability when doing restore}
1383
1384 When doing a restore the selection dialog ends by displaying this
1385 screen:
1386
1387 \begin{verbatim}
1388   The job will require the following
1389    Volume(s)                 Storage(s)                SD Device(s)
1390    ===========================================================================
1391    *000741L3                  LTO-4                     LTO3 
1392    *000866L3                  LTO-4                     LTO3 
1393    *000765L3                  LTO-4                     LTO3 
1394    *000764L3                  LTO-4                     LTO3 
1395    *000756L3                  LTO-4                     LTO3 
1396    *001759L3                  LTO-4                     LTO3 
1397    *001763L3                  LTO-4                     LTO3 
1398     001762L3                  LTO-4                     LTO3 
1399     001767L3                  LTO-4                     LTO3 
1400
1401 Volumes marked with ``*'' are online (in the autochanger).
1402 \end{verbatim}
1403
1404 This should help speed up large restores by minimizing the time spent
1405 waiting for the operator to discover that he must change tapes in the library.
1406
1407 This project was funded by Bacula Systems.
1408
1409 \subsection{Accurate estimate command}
1410
1411 The \texttt{estimate} command can now use the accurate code to detect changes
1412 and give a better estimation.
1413
1414 You can set the accurate behavior on the command line by using
1415 \texttt{accurate=yes\vb{}no} or use the Job setting as default value.
1416
1417 \begin{verbatim}
1418 * estimate listing accurate=yes level=incremental job=BackupJob
1419 \end{verbatim}
1420
1421 This project was funded by Bacula Systems.
1422
1423 \section{New Features in 3.0.0}
1424 \label{NewFeaturesChapter}
1425 \index[general]{New Features}
1426
1427 This chapter presents the new features added to the development 2.5.x
1428 versions to be released as Bacula version 3.0.0 sometime in April 2009.
1429
1430 \subsection{Accurate Backup}
1431 \index[general]{Accurate Backup}
1432
1433 As with most other backup programs, by default Bacula decides what files to
1434 backup for Incremental and Differential backup by comparing the change
1435 (st\_ctime) and modification (st\_mtime) times of the file to the time the last
1436 backup completed.  If one of those two times is later than the last backup
1437 time, then the file will be backed up.  This does not, however, permit tracking
1438 what files have been deleted and will miss any file with an old time that may
1439 have been restored to or moved onto the client filesystem.
1440
1441 \subsubsection{Accurate = \lt{}yes\vb{}no\gt{}}
1442 If the {\bf Accurate = \lt{}yes\vb{}no\gt{}} directive is enabled (default no) in
1443 the Job resource, the job will be run as an Accurate Job. For a {\bf Full}
1444 backup, there is no difference, but for {\bf Differential} and {\bf
1445   Incremental} backups, the Director will send a list of all previous files
1446 backed up, and the File daemon will use that list to determine if any new files
1447 have been added or or moved and if any files have been deleted. This allows
1448 Bacula to make an accurate backup of your system to that point in time so that
1449 if you do a restore, it will restore your system exactly.  
1450
1451 One note of caution
1452 about using Accurate backup is that it requires more resources (CPU and memory)
1453 on both the Director and the Client machines to create the list of previous
1454 files backed up, to send that list to the File daemon, for the File daemon to
1455 keep the list (possibly very big) in memory, and for the File daemon to do
1456 comparisons between every file in the FileSet and the list.  In particular,
1457 if your client has lots of files (more than a few million), you will need
1458 lots of memory on the client machine.
1459
1460 Accurate must not be enabled when backing up with a plugin that is not
1461 specially designed to work with Accurate. If you enable it, your restores
1462 will probably not work correctly.
1463
1464 This project was funded by Bacula Systems.
1465                                        
1466
1467
1468 \subsection{Copy Jobs}
1469 \index[general]{Copy Jobs}
1470
1471 A new {\bf Copy} job type 'C' has been implemented. It is similar to the
1472 existing Migration feature with the exception that the Job that is copied is
1473 left unchanged.  This essentially creates two identical copies of the same
1474 backup. However, the copy is treated as a copy rather than a backup job, and
1475 hence is not directly available for restore.  The {\bf restore} command lists
1476 copy jobs and allows selection of copies by using \texttt{jobid=}
1477 option. If the keyword {\bf copies} is present on the command line, Bacula will
1478 display the list of all copies for selected jobs.
1479
1480 \begin{verbatim}
1481 * restore copies
1482 [...]
1483 These JobIds have copies as follows:
1484 +-------+------------------------------------+-----------+------------------+
1485 | JobId | Job                                | CopyJobId | MediaType        |
1486 +-------+------------------------------------+-----------+------------------+
1487 | 2     | CopyJobSave.2009-02-17_16.31.00.11 | 7         | DiskChangerMedia |
1488 +-------+------------------------------------+-----------+------------------+
1489 +-------+-------+----------+----------+---------------------+------------------+
1490 | JobId | Level | JobFiles | JobBytes | StartTime           | VolumeName       |
1491 +-------+-------+----------+----------+---------------------+------------------+
1492 | 19    | F     | 6274     | 76565018 | 2009-02-17 16:30:45 | ChangerVolume002 |
1493 | 2     | I     | 1        | 5        | 2009-02-17 16:30:51 | FileVolume001    |
1494 +-------+-------+----------+----------+---------------------+------------------+
1495 You have selected the following JobIds: 19,2
1496
1497 Building directory tree for JobId(s) 19,2 ...  ++++++++++++++++++++++++++++++++++++++++++++
1498 5,611 files inserted into the tree.
1499 ...
1500 \end{verbatim}
1501
1502
1503 The Copy Job runs without using the File daemon by copying the data from the
1504 old backup Volume to a different Volume in a different Pool. See the Migration
1505 documentation for additional details. For copy Jobs there is a new selection
1506 directive named {\bf PoolUncopiedJobs} which selects all Jobs that were
1507 not already copied to another Pool. 
1508
1509 As with Migration, the Client, Volume, Job, or SQL query, are
1510 other possible ways of selecting the Jobs to be copied. Selection
1511 types like SmallestVolume, OldestVolume, PoolOccupancy and PoolTime also
1512 work, but are probably more suited for Migration Jobs. 
1513
1514 If Bacula finds a Copy of a job record that is purged (deleted) from the catalog,
1515 it will promote the Copy to a \textsl{real} backup job and will make it available for
1516 automatic restore. If more than one Copy is available, it will promote the copy
1517 with the smallest JobId.
1518
1519 A nice solution which can be built with the new Copy feature is often
1520 called disk-to-disk-to-tape backup (DTDTT). A sample config could
1521 look something like the one below:
1522
1523 \begin{verbatim}
1524 Pool {
1525   Name = FullBackupsVirtualPool
1526   Pool Type = Backup
1527   Purge Oldest Volume = Yes
1528   Storage = vtl
1529   NextPool = FullBackupsTapePool
1530 }
1531
1532 Pool {
1533   Name = FullBackupsTapePool
1534   Pool Type = Backup
1535   Recycle = Yes
1536   AutoPrune = Yes
1537   Volume Retention = 365 days
1538   Storage = superloader
1539 }
1540
1541 #
1542 # Fake fileset for copy jobs
1543 #
1544 Fileset {
1545   Name = None
1546   Include {
1547     Options {
1548       signature = MD5
1549     }
1550   }
1551 }
1552
1553 #
1554 # Fake client for copy jobs
1555 #
1556 Client {
1557   Name = None
1558   Address = localhost
1559   Password = "NoNe"
1560   Catalog = MyCatalog
1561 }
1562
1563 #
1564 # Default template for a CopyDiskToTape Job
1565 #
1566 JobDefs {
1567   Name = CopyDiskToTape
1568   Type = Copy
1569   Messages = StandardCopy
1570   Client = None
1571   FileSet = None
1572   Selection Type = PoolUncopiedJobs
1573   Maximum Concurrent Jobs = 10
1574   SpoolData = No
1575   Allow Duplicate Jobs = Yes
1576   Cancel Queued Duplicates = No
1577   Cancel Running Duplicates = No
1578   Priority = 13
1579 }
1580
1581 Schedule {
1582    Name = DaySchedule7:00
1583    Run = Level=Full daily at 7:00
1584 }
1585
1586 Job {
1587   Name = CopyDiskToTapeFullBackups
1588   Enabled = Yes
1589   Schedule = DaySchedule7:00
1590   Pool = FullBackupsVirtualPool
1591   JobDefs = CopyDiskToTape
1592 }
1593 \end{verbatim}
1594
1595 The example above had 2 pool which are copied using the PoolUncopiedJobs
1596 selection criteria. Normal Full backups go to the Virtual pool and are copied
1597 to the Tape pool the next morning.
1598
1599 The command \texttt{list copies [jobid=x,y,z]} lists copies for a given
1600 \textbf{jobid}.
1601
1602 \begin{verbatim}
1603 *list copies
1604 +-------+------------------------------------+-----------+------------------+
1605 | JobId | Job                                | CopyJobId | MediaType        |
1606 +-------+------------------------------------+-----------+------------------+
1607 |     9 | CopyJobSave.2008-12-20_22.26.49.05 |        11 | DiskChangerMedia |
1608 +-------+------------------------------------+-----------+------------------+
1609 \end{verbatim}
1610
1611 \subsection{ACL Updates}
1612 \index[general]{ACL Updates}
1613 The whole ACL code had been overhauled and in this version each platforms has
1614 different streams for each type of acl available on such an platform. As ACLs
1615 between platforms tend to be not that portable (most implement POSIX acls but
1616 some use an other draft or a completely different format) we currently only
1617 allow certain platform specific ACL streams to be decoded and restored on the
1618 same platform that they were created on.  The old code allowed to restore ACL
1619 cross platform but the comments already mention that not being to wise. For
1620 backward compatibility the new code will accept the two old ACL streams and
1621 handle those with the platform specific handler. But for all new backups it
1622 will save the ACLs using the new streams.
1623
1624 Currently the following platforms support ACLs:
1625
1626 \begin{itemize}
1627  \item {\bf AIX}
1628  \item {\bf Darwin/OSX}
1629  \item {\bf FreeBSD}
1630  \item {\bf HPUX}
1631  \item {\bf IRIX}
1632  \item {\bf Linux}
1633  \item {\bf Tru64}
1634  \item {\bf Solaris}
1635 \end{itemize}
1636
1637 Currently we support the following ACL types (these ACL streams use a reserved
1638 part of the stream numbers):
1639
1640 \begin{itemize}
1641 \item {\bf STREAM\_ACL\_AIX\_TEXT} 1000 AIX specific string representation from
1642   acl\_get
1643  \item {\bf STREAM\_ACL\_DARWIN\_ACCESS\_ACL} 1001 Darwin (OSX) specific acl\_t
1644    string representation from acl\_to\_text (POSIX acl)
1645   \item {\bf STREAM\_ACL\_FREEBSD\_DEFAULT\_ACL} 1002 FreeBSD specific acl\_t
1646     string representation from acl\_to\_text (POSIX acl) for default acls.
1647   \item {\bf STREAM\_ACL\_FREEBSD\_ACCESS\_ACL} 1003 FreeBSD specific acl\_t
1648     string representation from acl\_to\_text (POSIX acl) for access acls.
1649   \item {\bf STREAM\_ACL\_HPUX\_ACL\_ENTRY} 1004 HPUX specific acl\_entry
1650     string representation from acltostr (POSIX acl)
1651   \item {\bf STREAM\_ACL\_IRIX\_DEFAULT\_ACL} 1005 IRIX specific acl\_t string
1652     representation from acl\_to\_text (POSIX acl) for default acls.
1653   \item {\bf STREAM\_ACL\_IRIX\_ACCESS\_ACL} 1006 IRIX specific acl\_t string
1654     representation from acl\_to\_text (POSIX acl) for access acls.
1655   \item {\bf STREAM\_ACL\_LINUX\_DEFAULT\_ACL} 1007 Linux specific acl\_t
1656     string representation from acl\_to\_text (POSIX acl) for default acls.
1657   \item {\bf STREAM\_ACL\_LINUX\_ACCESS\_ACL} 1008 Linux specific acl\_t string
1658     representation from acl\_to\_text (POSIX acl) for access acls.
1659   \item {\bf STREAM\_ACL\_TRU64\_DEFAULT\_ACL} 1009 Tru64 specific acl\_t
1660     string representation from acl\_to\_text (POSIX acl) for default acls.
1661   \item {\bf STREAM\_ACL\_TRU64\_DEFAULT\_DIR\_ACL} 1010 Tru64 specific acl\_t
1662     string representation from acl\_to\_text (POSIX acl) for default acls.
1663   \item {\bf STREAM\_ACL\_TRU64\_ACCESS\_ACL} 1011 Tru64 specific acl\_t string
1664     representation from acl\_to\_text (POSIX acl) for access acls.
1665   \item {\bf STREAM\_ACL\_SOLARIS\_ACLENT} 1012 Solaris specific aclent\_t
1666     string representation from acltotext or acl\_totext (POSIX acl)
1667   \item {\bf STREAM\_ACL\_SOLARIS\_ACE} 1013 Solaris specific ace\_t string
1668     representation from from acl\_totext (NFSv4 or ZFS acl)
1669 \end{itemize}
1670
1671 In future versions we might support conversion functions from one type of acl
1672 into an other for types that are either the same or easily convertible. For now
1673 the streams are separate and restoring them on a platform that doesn't
1674 recognize them will give you a warning.
1675
1676 \subsection{Extended Attributes}
1677 \index[general]{Extended Attributes}
1678 Something that was on the project list for some time is now implemented for
1679 platforms that support a similar kind of interface. Its the support for backup
1680 and restore of so called extended attributes. As extended attributes are so
1681 platform specific these attributes are saved in separate streams for each
1682 platform.  Restores of the extended attributes can only be performed on the
1683 same platform the backup was done.  There is support for all types of extended
1684 attributes, but restoring from one type of filesystem onto an other type of
1685 filesystem on the same platform may lead to surprises.  As extended attributes
1686 can contain any type of data they are stored as a series of so called
1687 value-pairs.  This data must be seen as mostly binary and is stored as such.
1688 As security labels from selinux are also extended attributes this option also
1689 stores those labels and no specific code is enabled for handling selinux
1690 security labels.
1691
1692 Currently the following platforms support extended attributes:
1693 \begin{itemize}
1694  \item {\bf Darwin/OSX}
1695  \item {\bf FreeBSD}
1696  \item {\bf Linux}
1697  \item {\bf NetBSD}
1698 \end{itemize}
1699
1700 On Linux acls are also extended attributes, as such when you enable ACLs on a
1701 Linux platform it will NOT save the same data twice e.g. it will save the ACLs
1702 and not the same extended attribute.
1703
1704 To enable the backup of extended attributes please add the following to your
1705 fileset definition.
1706 \begin{verbatim}
1707   FileSet {
1708     Name = "MyFileSet"
1709     Include {
1710       Options {
1711         signature = MD5
1712         xattrsupport = yes
1713       }
1714       File = ...
1715     }
1716   }
1717 \end{verbatim}
1718
1719 \subsection{Shared objects}
1720 \index[general]{Shared objects}
1721 A default build of Bacula will now create the libraries as shared objects
1722 (.so) rather than static libraries as was previously the case.  
1723 The shared libraries are built using {\bf libtool} so it should be quite
1724 portable.
1725
1726 An important advantage of using shared objects is that on a machine with the
1727 Directory, File daemon, the Storage daemon, and a console, you will have only
1728 one copy of the code in memory rather than four copies.  Also the total size of
1729 the binary release is smaller since the library code appears only once rather
1730 than once for every program that uses it; this results in significant reduction
1731 in the size of the binaries particularly for the utility tools.
1732  
1733 In order for the system loader to find the shared objects when loading the
1734 Bacula binaries, the Bacula shared objects must either be in a shared object
1735 directory known to the loader (typically /usr/lib) or they must be in the
1736 directory that may be specified on the {\bf ./configure} line using the {\bf
1737   {-}{-}libdir} option as:
1738
1739 \begin{verbatim}
1740   ./configure --libdir=/full-path/dir
1741 \end{verbatim}
1742
1743 the default is /usr/lib. If {-}{-}libdir is specified, there should be
1744 no need to modify your loader configuration provided that
1745 the shared objects are installed in that directory (Bacula
1746 does this with the make install command). The shared objects
1747 that Bacula references are:
1748
1749 \begin{verbatim}
1750 libbaccfg.so
1751 libbacfind.so
1752 libbacpy.so
1753 libbac.so
1754 \end{verbatim}
1755
1756 These files are symbolically linked to the real shared object file,
1757 which has a version number to permit running multiple versions of
1758 the libraries if desired (not normally the case).
1759
1760 If you have problems with libtool or you wish to use the old
1761 way of building static libraries, or you want to build a static
1762 version of Bacula you may disable
1763 libtool on the configure command line with:
1764
1765 \begin{verbatim}
1766   ./configure --disable-libtool
1767 \end{verbatim}
1768
1769
1770 \subsection{Building Static versions of Bacula}
1771 \index[general]{Static linking}
1772 In order to build static versions of Bacula, in addition
1773 to configuration options that were needed you now must
1774 also add --disable-libtool.  Example
1775
1776 \begin{verbatim}
1777   ./configure --enable-static-client-only --disable-libtool
1778 \end{verbatim}
1779
1780
1781 \subsection{Virtual Backup (Vbackup)}
1782 \index[general]{Virtual Backup}
1783 \index[general]{Vbackup}
1784
1785 Bacula's virtual backup feature is often called Synthetic Backup or
1786 Consolidation in other backup products.  It permits you to consolidate the
1787 previous Full backup plus the most recent Differential backup and any
1788 subsequent Incremental backups into a new Full backup.  This new Full
1789 backup will then be considered as the most recent Full for any future
1790 Incremental or Differential backups.  The VirtualFull backup is
1791 accomplished without contacting the client by reading the previous backup
1792 data and writing it to a volume in a different pool.
1793
1794 In some respects the Vbackup feature works similar to a Migration job, in
1795 that Bacula normally reads the data from the pool specified in the 
1796 Job resource, and writes it to the {\bf Next Pool} specified in the 
1797 Job resource. Note, this means that usually the output from the Virtual
1798 Backup is written into a different pool from where your prior backups
1799 are saved. Doing it this way guarantees that you will not get a deadlock
1800 situation attempting to read and write to the same volume in the Storage
1801 daemon. If you then want to do subsequent backups, you may need to
1802 move the Virtual Full Volume back to your normal backup pool.
1803 Alternatively, you can set your {\bf Next Pool} to point to the current
1804 pool.  This will cause Bacula to read and write to Volumes in the
1805 current pool. In general, this will work, because Bacula will
1806 not allow reading and writing on the same Volume. In any case, once
1807 a VirtualFull has been created, and a restore is done involving the
1808 most current Full, it will read the Volume or Volumes by the VirtualFull 
1809 regardless of in which Pool the Volume is found.
1810
1811 The Vbackup is enabled on a Job by Job in the Job resource by specifying
1812 a level of {\bf VirtualFull}.
1813
1814 A typical Job resource definition might look like the following:
1815
1816 \begin{verbatim}
1817 Job {
1818   Name = "MyBackup"
1819   Type = Backup
1820   Client=localhost-fd
1821   FileSet = "Full Set"
1822   Storage = File
1823   Messages = Standard
1824   Pool = Default
1825   SpoolData = yes
1826 }
1827
1828 # Default pool definition
1829 Pool {
1830   Name = Default
1831   Pool Type = Backup
1832   Recycle = yes            # Automatically recycle Volumes
1833   AutoPrune = yes          # Prune expired volumes
1834   Volume Retention = 365d  # one year
1835   NextPool = Full
1836   Storage = File
1837 }
1838
1839 Pool {
1840   Name = Full
1841   Pool Type = Backup
1842   Recycle = yes            # Automatically recycle Volumes
1843   AutoPrune = yes          # Prune expired volumes
1844   Volume Retention = 365d  # one year
1845   Storage = DiskChanger
1846 }
1847
1848 # Definition of file storage device
1849 Storage {
1850   Name = File
1851   Address = localhost
1852   Password = "xxx"
1853   Device = FileStorage
1854   Media Type = File
1855   Maximum Concurrent Jobs = 5
1856 }
1857
1858 # Definition of DDS Virtual tape disk storage device
1859 Storage {
1860   Name = DiskChanger
1861   Address = localhost  # N.B. Use a fully qualified name here
1862   Password = "yyy"
1863   Device = DiskChanger
1864   Media Type = DiskChangerMedia
1865   Maximum Concurrent Jobs = 4
1866   Autochanger = yes
1867 }
1868 \end{verbatim}
1869
1870 Then in bconsole or via a Run schedule, you would run the job as:
1871
1872 \begin{verbatim}
1873 run job=MyBackup level=Full
1874 run job=MyBackup level=Incremental
1875 run job=MyBackup level=Differential
1876 run job=MyBackup level=Incremental
1877 run job=MyBackup level=Incremental
1878 \end{verbatim}
1879
1880 So providing there were changes between each of those jobs, you would end up
1881 with a Full backup, a Differential, which includes the first Incremental
1882 backup, then two Incremental backups.  All the above jobs would be written to
1883 the {\bf Default} pool.
1884
1885 To consolidate those backups into a new Full backup, you would run the
1886 following:
1887
1888 \begin{verbatim}
1889 run job=MyBackup level=VirtualFull
1890 \end{verbatim}
1891
1892 And it would produce a new Full backup without using the client, and the output
1893 would be written to the {\bf Full} Pool which uses the Diskchanger Storage.
1894
1895 If the Virtual Full is run, and there are no prior Jobs, the Virtual Full will
1896 fail with an error.
1897
1898 Note, the Start and End time of the Virtual Full backup is set to the
1899 values for the last job included in the Virtual Full (in the above example,
1900 it is an Increment). This is so that if another incremental is done, which
1901 will be based on the Virtual Full, it will backup all files from the
1902 last Job included in the Virtual Full rather than from the time the Virtual
1903 Full was actually run.
1904
1905
1906
1907 \subsection{Catalog Format}
1908 \index[general]{Catalog Format}
1909 Bacula 3.0 comes with some changes to the catalog format.  The upgrade
1910 operation will convert the FileId field of the File table from 32 bits (max 4
1911 billion table entries) to 64 bits (very large number of items).  The
1912 conversion process can take a bit of time and will likely DOUBLE THE SIZE of
1913 your catalog during the conversion.  Also you won't be able to run jobs during
1914 this conversion period.  For example, a 3 million file catalog will take 2
1915 minutes to upgrade on a normal machine.  Please don't forget to make a valid
1916 backup of your database before executing the upgrade script. See the 
1917 ReleaseNotes for additional details.
1918
1919 \subsection{64 bit Windows Client}
1920 \index[general]{Win64 Client}
1921 Unfortunately, Microsoft's implementation of Volume Shadown Copy (VSS) on
1922 their 64 bit OS versions is not compatible with a 32 bit Bacula Client.
1923 As a consequence, we are also releasing a 64 bit version of the Bacula 
1924 Windows Client (win64bacula-3.0.0.exe) that does work with VSS. 
1925 These binaries should only be installed on 64 bit Windows operating systems.
1926 What is important is not your hardware but whether or not you have
1927 a 64 bit version of the Windows OS.  
1928
1929 Compared to the Win32 Bacula Client, the 64 bit release contains a few differences:
1930 \begin{enumerate}
1931 \item Before installing the Win64 Bacula Client, you must totally
1932       deinstall any prior 2.4.x Client installation using the 
1933       Bacula deinstallation (see the menu item). You may want
1934       to save your .conf files first.
1935 \item Only the Client (File daemon) is ported to Win64, the Director
1936       and the Storage daemon are not in the 64 bit Windows installer.
1937 \item bwx-console is not yet ported.
1938 \item bconsole is ported but it has not been tested.
1939 \item The documentation is not included in the installer.
1940 \item Due to Vista security restrictions imposed on a default installation
1941       of Vista, before upgrading the Client, you must manually stop
1942       any prior version of Bacula from running, otherwise the install
1943       will fail.
1944 \item Due to Vista security restrictions imposed on a default installation
1945       of Vista, attempting to edit the conf files via the menu items
1946       will fail. You must directly edit the files with appropriate 
1947       permissions.  Generally double clicking on the appropriate .conf
1948       file will work providing you have sufficient permissions.
1949 \item All Bacula files are now installed in 
1950       {\bf C:/Program Files/Bacula} except the main menu items,
1951       which are installed as before. This vastly simplifies the installation.
1952 \item If you are running on a foreign language version of Windows, most
1953       likely {\bf C:/Program Files} does not exist, so you should use the
1954       Custom installation and enter an appropriate location to install
1955       the files.
1956 \item The 3.0.0 Win32 Client continues to install files in the locations used
1957       by prior versions. For the next version we will convert it to use
1958       the same installation conventions as the Win64 version.
1959 \end{enumerate}
1960
1961 This project was funded by Bacula Systems.
1962
1963
1964 \subsection{Duplicate Job Control}
1965 \index[general]{Duplicate Jobs}
1966 The new version of Bacula provides four new directives that
1967 give additional control over what Bacula does if duplicate jobs 
1968 are started.  A duplicate job in the sense we use it here means
1969 a second or subsequent job with the same name starts.  This
1970 happens most frequently when the first job runs longer than expected because no 
1971 tapes are available.
1972
1973 The four directives each take as an argument a {\bf yes} or {\bf no} value and
1974 are specified in the Job resource.
1975
1976 They are:
1977
1978 \subsubsection{Allow Duplicate Jobs = \lt{}yes\vb{}no\gt{}}
1979 \index[general]{Allow Duplicate Jobs}
1980   If this directive is set to {\bf yes}, duplicate jobs will be run.  If
1981   the directive is set to {\bf no} (default) then only one job of a given name
1982   may run at one time, and the action that Bacula takes to ensure only
1983   one job runs is determined by the other directives (see below).
1984  
1985   If {\bf Allow Duplicate Jobs} is set to {\bf no} and two jobs
1986   are present and none of the three directives given below permit
1987   Canceling a job, then the current job (the second one started)
1988   will be canceled.
1989
1990 \subsubsection{Allow Higher Duplicates = \lt{}yes\vb{}no\gt{}}
1991 \index[general]{Allow Higher Duplicates}
1992   This directive was in version 5.0.0, but does not work as
1993   expected. If used, it should always be set to no.  In later versions
1994   of Bacula the directive is disabled (disregarded).
1995
1996 \subsubsection{Cancel Running Duplicates = \lt{}yes\vb{}no\gt{}}
1997 \index[general]{Cancel Running Duplicates}
1998   If {\bf Allow Duplicate Jobs} is set to {\bf no} and
1999   if this directive is set to {\bf yes} any job that is already running
2000   will be canceled.  The default is {\bf no}.
2001
2002 \subsubsection{Cancel Queued Duplicates = \lt{}yes\vb{}no\gt{}}
2003 \index[general]{Cancel Queued Duplicates}
2004   If {\bf Allow Duplicate Jobs} is set to {\bf no} and
2005   if this directive is set to {\bf yes} any job that is
2006   already queued to run but not yet running will be canceled.
2007   The default is {\bf no}. 
2008
2009
2010 \subsection{TLS Authentication}
2011 \index[general]{TLS Authentication}
2012 In Bacula version 2.5.x and later, in addition to the normal Bacula
2013 CRAM-MD5 authentication that is used to authenticate each Bacula
2014 connection, you can specify that you want TLS Authentication as well,
2015 which will provide more secure authentication.
2016
2017 This new feature uses Bacula's existing TLS code (normally used for
2018 communications encryption) to do authentication.  To use it, you must
2019 specify all the TLS directives normally used to enable communications
2020 encryption (TLS Enable, TLS Verify Peer, TLS Certificate, ...) and
2021 a new directive:
2022
2023 \subsubsection{TLS Authenticate = yes}
2024 \begin{verbatim}
2025 TLS Authenticate = yes
2026 \end{verbatim}
2027
2028 in the main daemon configuration resource (Director for the Director,
2029 Client for the File daemon, and Storage for the Storage daemon).
2030
2031 When {\bf TLS Authenticate} is enabled, after doing the CRAM-MD5
2032 authentication, Bacula will also do TLS authentication, then TLS 
2033 encryption will be turned off, and the rest of the communication between
2034 the two Bacula daemons will be done without encryption.
2035
2036 If you want to encrypt communications data, use the normal TLS directives
2037 but do not turn on {\bf TLS Authenticate}.
2038
2039 \subsection{bextract non-portable Win32 data}
2040 \index[general]{bextract handles Win32 non-portable data}
2041 {\bf bextract} has been enhanced to be able to restore
2042 non-portable Win32 data to any OS.  Previous versions were 
2043 unable to restore non-portable Win32 data to machines that
2044 did not have the Win32 BackupRead and BackupWrite API calls.
2045
2046 \subsection{State File updated at Job Termination}
2047 \index[general]{State File}
2048 In previous versions of Bacula, the state file, which provides a
2049 summary of previous jobs run in the {\bf status} command output was
2050 updated only when Bacula terminated, thus if the daemon crashed, the
2051 state file might not contain all the run data.  This version of
2052 the Bacula daemons updates the state file on each job termination.
2053
2054 \subsection{MaxFullInterval = \lt{}time-interval\gt{}}
2055 \index[general]{MaxFullInterval}
2056 The new Job resource directive {\bf Max Full Interval = \lt{}time-interval\gt{}}
2057 can be used to specify the maximum time interval between {\bf Full} backup
2058 jobs. When a job starts, if the time since the last Full backup is
2059 greater than the specified interval, and the job would normally be an
2060 {\bf Incremental} or {\bf Differential}, it will be automatically
2061 upgraded to a {\bf Full} backup.
2062
2063 \subsection{MaxDiffInterval = \lt{}time-interval\gt{}}
2064 \index[general]{MaxDiffInterval}
2065 The new Job resource directive {\bf Max Diff Interval = \lt{}time-interval\gt{}}
2066 can be used to specify the maximum time interval between {\bf Differential} backup
2067 jobs. When a job starts, if the time since the last Differential backup is
2068 greater than the specified interval, and the job would normally be an
2069 {\bf Incremental}, it will be automatically
2070 upgraded to a {\bf Differential} backup.
2071
2072 \subsection{Honor No Dump Flag = \lt{}yes\vb{}no\gt{}}
2073 \index[general]{MaxDiffInterval}
2074 On FreeBSD systems, each file has a {\bf no dump flag} that can be set
2075 by the user, and when it is set it is an indication to backup programs
2076 to not backup that particular file.  This version of Bacula contains a
2077 new Options directive within a FileSet resource, which instructs Bacula to
2078 obey this flag.  The new directive is:
2079
2080 \begin{verbatim}
2081   Honor No Dump Flag = yes\vb{}no
2082 \end{verbatim}
2083
2084 The default value is {\bf no}.
2085
2086
2087 \subsection{Exclude Dir Containing = \lt{}filename-string\gt{}}
2088 \index[general]{IgnoreDir}
2089 The {\bf ExcludeDirContaining = \lt{}filename\gt{}} is a new directive that
2090 can be added to the Include section of the FileSet resource.  If the specified
2091 filename ({\bf filename-string}) is found on the Client in any directory to be
2092 backed up, the whole directory will be ignored (not backed up).  For example:
2093
2094 \begin{verbatim}
2095   # List of files to be backed up
2096   FileSet {
2097     Name = "MyFileSet"
2098     Include {
2099       Options {
2100         signature = MD5
2101       }
2102       File = /home
2103       Exclude Dir Containing = .excludeme
2104     }
2105   }
2106 \end{verbatim}
2107
2108 But in /home, there may be hundreds of directories of users and some
2109 people want to indicate that they don't want to have certain
2110 directories backed up. For example, with the above FileSet, if
2111 the user or sysadmin creates a file named {\bf .excludeme} in 
2112 specific directories, such as
2113
2114 \begin{verbatim}
2115    /home/user/www/cache/.excludeme
2116    /home/user/temp/.excludeme
2117 \end{verbatim}
2118
2119 then Bacula will not backup the two directories named:
2120
2121 \begin{verbatim}
2122    /home/user/www/cache
2123    /home/user/temp
2124 \end{verbatim}
2125
2126 NOTE: subdirectories will not be backed up.  That is, the directive
2127 applies to the two directories in question and any children (be they
2128 files, directories, etc).
2129
2130
2131 \subsection{Bacula Plugins}
2132 \index[general]{Plugin}
2133 Support for shared object plugins has been implemented in the Linux, Unix
2134 and Win32 File daemons. The API will be documented separately in
2135 the Developer's Guide or in a new document.  For the moment, there is
2136 a single plugin named {\bf bpipe} that allows an external program to
2137 get control to backup and restore a file.
2138
2139 Plugins are also planned (partially implemented) in the Director and the
2140 Storage daemon.  
2141
2142 \subsubsection{Plugin Directory}
2143 \index[general]{Plugin Directory}
2144 Each daemon (DIR, FD, SD) has a new {\bf Plugin Directory} directive that may
2145 be added to the daemon definition resource. The directory takes a quoted 
2146 string argument, which is the name of the directory in which the daemon can
2147 find the Bacula plugins. If this directive is not specified, Bacula will not
2148 load any plugins. Since each plugin has a distinctive name, all the daemons
2149 can share the same plugin directory. 
2150
2151 \subsubsection{Plugin Options}
2152 \index[general]{Plugin Options}
2153 The {\bf Plugin Options} directive takes a quoted string
2154 argument (after the equal sign) and may be specified in the
2155 Job resource.  The options specified will be passed to all plugins
2156 when they are run.  This each plugin must know what it is looking
2157 for. The value defined in the Job resource can be modified
2158 by the user when he runs a Job via the {\bf bconsole} command line 
2159 prompts.
2160
2161 Note: this directive may be specified, and there is code to modify
2162 the string in the run command, but the plugin options are not yet passed to
2163 the plugin (i.e. not fully implemented).
2164
2165 \subsubsection{Plugin Options ACL}
2166 \index[general]{Plugin Options ACL}
2167 The {\bf Plugin Options ACL} directive may be specified in the
2168 Director's Console resource. It functions as all the other ACL commands
2169 do by permitting users running restricted consoles to specify a 
2170 {\bf Plugin Options} that overrides the one specified in the Job
2171 definition. Without this directive restricted consoles may not modify
2172 the Plugin Options.
2173
2174 \subsubsection{Plugin = \lt{}plugin-command-string\gt{}}
2175 \index[general]{Plugin}
2176 The {\bf Plugin} directive is specified in the Include section of
2177 a FileSet resource where you put your {\bf File = xxx} directives.
2178 For example:
2179
2180 \begin{verbatim}
2181   FileSet {
2182     Name = "MyFileSet"
2183     Include {
2184       Options {
2185         signature = MD5
2186       }
2187       File = /home
2188       Plugin = "bpipe:..."
2189     }
2190   }
2191 \end{verbatim}
2192
2193 In the above example, when the File daemon is processing the directives
2194 in the Include section, it will first backup all the files in {\bf /home}
2195 then it will load the plugin named {\bf bpipe} (actually bpipe-dir.so) from
2196 the Plugin Directory.  The syntax and semantics of the Plugin directive
2197 require the first part of the string up to the colon (:) to be the name
2198 of the plugin. Everything after the first colon is ignored by the File daemon but
2199 is passed to the plugin. Thus the plugin writer may define the meaning of the
2200 rest of the string as he wishes.
2201
2202 Please see the next section for information about the {\bf bpipe} Bacula
2203 plugin.
2204
2205 \subsection{The bpipe Plugin}
2206 \index[general]{The bpipe Plugin}
2207 The {\bf bpipe} plugin is provided in the directory src/plugins/fd/bpipe-fd.c of
2208 the Bacula source distribution. When the plugin is compiled and linking into
2209 the resulting dynamic shared object (DSO), it will have the name {\bf bpipe-fd.so}.
2210 Please note that this is a very simple plugin that was written for
2211 demonstration and test purposes. It is and can be used in production, but
2212 that was never really intended.
2213
2214 The purpose of the plugin is to provide an interface to any system program for
2215 backup and restore. As specified above the {\bf bpipe} plugin is specified in
2216 the Include section of your Job's FileSet resource.  The full syntax of the
2217 plugin directive as interpreted by the {\bf bpipe} plugin (each plugin is free
2218 to specify the sytax as it wishes) is:
2219
2220 \begin{verbatim}
2221   Plugin = "<field1>:<field2>:<field3>:<field4>"
2222 \end{verbatim}
2223
2224 where
2225 \begin{description}
2226 \item {\bf field1} is the name of the plugin with the trailing {\bf -fd.so}
2227 stripped off, so in this case, we would put {\bf bpipe} in this field.
2228
2229 \item {\bf field2} specifies the namespace, which for {\bf bpipe} is the
2230 pseudo path and filename under which the backup will be saved. This pseudo
2231 path and filename will be seen by the user in the restore file tree.
2232 For example, if the value is {\bf /MYSQL/regress.sql}, the data
2233 backed up by the plugin will be put under that "pseudo" path and filename.
2234 You must be careful to choose a naming convention that is unique to avoid
2235 a conflict with a path and filename that actually exists on your system.
2236
2237 \item {\bf field3} for the {\bf bpipe} plugin 
2238 specifies the "reader" program that is called by the plugin during
2239 backup to read the data. {\bf bpipe} will call this program by doing a
2240 {\bf popen} on it. 
2241
2242 \item {\bf field4} for the {\bf bpipe} plugin
2243 specifies the "writer" program that is called by the plugin during
2244 restore to write the data back to the filesystem.  
2245 \end{description}
2246
2247 Please note that for two items above describing the "reader" and "writer"
2248 fields, these programs are "executed" by Bacula, which
2249 means there is no shell interpretation of any command line arguments
2250 you might use.  If you want to use shell characters (redirection of input
2251 or output, ...), then we recommend that you put your command or commands
2252 in a shell script and execute the script. In addition if you backup a
2253 file with the reader program, when running the writer program during
2254 the restore, Bacula will not automatically create the path to the file.
2255 Either the path must exist, or you must explicitly do so with your command
2256 or in a shell script.
2257
2258 Putting it all together, the full plugin directive line might look
2259 like the following:
2260
2261 \begin{verbatim}
2262 Plugin = "bpipe:/MYSQL/regress.sql:mysqldump -f 
2263           --opt --databases bacula:mysql"
2264 \end{verbatim}
2265
2266 The directive has been split into two lines, but within the {\bf bacula-dir.conf} file
2267 would be written on a single line.
2268
2269 This causes the File daemon to call the {\bf bpipe} plugin, which will write
2270 its data into the "pseudo" file {\bf /MYSQL/regress.sql} by calling the 
2271 program {\bf mysqldump -f --opt --database bacula} to read the data during
2272 backup. The mysqldump command outputs all the data for the database named
2273 {\bf bacula}, which will be read by the plugin and stored in the backup.
2274 During restore, the data that was backed up will be sent to the program
2275 specified in the last field, which in this case is {\bf mysql}.  When
2276 {\bf mysql} is called, it will read the data sent to it by the plugn
2277 then write it back to the same database from which it came ({\bf bacula}
2278 in this case).
2279
2280 The {\bf bpipe} plugin is a generic pipe program, that simply transmits 
2281 the data from a specified program to Bacula for backup, and then from Bacula to 
2282 a specified program for restore.
2283
2284 By using different command lines to {\bf bpipe},
2285 you can backup any kind of data (ASCII or binary) depending
2286 on the program called.
2287
2288 \subsection{Microsoft Exchange Server 2003/2007 Plugin}
2289 \index[general]{Microsoft Exchange Server 2003/2007 Plugin}
2290 \subsubsection{Background}
2291 The Exchange plugin was made possible by a funded development project
2292 between Equiinet Ltd -- www.equiinet.com (many thanks) and Bacula Systems.
2293 The code for the plugin was written by James Harper, and the Bacula core
2294 code by Kern Sibbald.  All the code for this funded development has become
2295 part of the Bacula project.  Thanks to everyone who made it happen.
2296
2297 \subsubsection{Concepts}
2298 Although it is possible to backup Exchange using Bacula VSS the Exchange 
2299 plugin adds a good deal of functionality, because while Bacula VSS
2300 completes a full backup (snapshot) of Exchange, it does
2301 not support Incremental or Differential backups, restoring is more
2302 complicated, and a single database restore is not possible.
2303
2304 Microsoft Exchange organises its storage into Storage Groups with
2305 Databases inside them. A default installation of Exchange will have a
2306 single Storage Group called 'First Storage Group', with two Databases
2307 inside it, "Mailbox Store (SERVER NAME)" and 
2308 "Public Folder Store (SERVER NAME)", 
2309 which hold user email and public folders respectively.
2310
2311 In the default configuration, Exchange logs everything that happens to
2312 log files, such that if you have a backup, and all the log files since,
2313 you can restore to the present time. Each Storage Group has its own set
2314 of log files and operates independently of any other Storage Groups. At
2315 the Storage Group level, the logging can be turned off by enabling a
2316 function called "Enable circular logging". At this time the Exchange
2317 plugin will not function if this option is enabled.
2318
2319 The plugin allows backing up of entire storage groups, and the restoring
2320 of entire storage groups or individual databases. Backing up and
2321 restoring at the individual mailbox or email item is not supported but
2322 can be simulated by use of the "Recovery" Storage Group (see below).
2323
2324 \subsubsection{Installing}
2325 The Exchange plugin requires a DLL that is shipped with Microsoft
2326 Exchanger Server called {\bf esebcli2.dll}. Assuming Exchange is installed
2327 correctly the Exchange plugin should find this automatically and run
2328 without any additional installation.
2329
2330 If the DLL can not be found automatically it will need to be copied into
2331 the Bacula installation
2332 directory (eg C:\verb+\+Program Files\verb+\+Bacula\verb+\+bin). The Exchange API DLL is
2333 named esebcli2.dll and is found in C:\verb+\+Program Files\verb+\+Exchsrvr\verb+\+bin on a
2334 default Exchange installation.
2335
2336 \subsubsection{Backing Up}
2337 To back up an Exchange server the Fileset definition must contain at
2338 least {\bf Plugin = "exchange:/@EXCHANGE/Microsoft Information Store"} for
2339 the backup to work correctly. The 'exchange:' bit tells Bacula to look
2340 for the exchange plugin, the '@EXCHANGE' bit makes sure all the backed
2341 up files are prefixed with something that isn't going to share a name
2342 with something outside the plugin, and the 'Microsoft Information Store'
2343 bit is required also. It is also possible to add the name of a storage
2344 group to the "Plugin =" line, eg \\
2345 {\bf Plugin = "exchange:/@EXCHANGE/Microsoft Information Store/First Storage Group"} \\
2346 if you want only a single storage group backed up.
2347
2348 Additionally, you can suffix the 'Plugin =' directive with
2349 ":notrunconfull" which will tell the plugin not to truncate the Exchange
2350 database at the end of a full backup.
2351
2352 An Incremental or Differential backup will backup only the database logs
2353 for each Storage Group by inspecting the "modified date" on each
2354 physical log file. Because of the way the Exchange API works, the last
2355 logfile backed up on each backup will always be backed up by the next
2356 Incremental or Differential backup too. This adds 5MB to each
2357 Incremental or Differential backup size but otherwise does not cause any
2358 problems.
2359
2360 By default, a normal VSS fileset containing all the drive letters will
2361 also back up the Exchange databases using VSS. This will interfere with
2362 the plugin and Exchange's shared ideas of when the last full backup was
2363 done, and may also truncate log files incorrectly. It is important,
2364 therefore, that the Exchange database files be excluded from the backup,
2365 although the folders the files are in should be included, or they will
2366 have to be recreated manually if a bare metal restore is done.
2367
2368 \begin{verbatim}
2369 FileSet {
2370    Include {
2371       File = C:/Program Files/Exchsrvr/mdbdata
2372       Plugin = "exchange:..."
2373    }
2374    Exclude {
2375       File = C:/Program Files/Exchsrvr/mdbdata/E00.chk
2376       File = C:/Program Files/Exchsrvr/mdbdata/E00.log
2377       File = C:/Program Files/Exchsrvr/mdbdata/E000000F.log
2378       File = C:/Program Files/Exchsrvr/mdbdata/E0000010.log
2379       File = C:/Program Files/Exchsrvr/mdbdata/E0000011.log
2380       File = C:/Program Files/Exchsrvr/mdbdata/E00tmp.log
2381       File = C:/Program Files/Exchsrvr/mdbdata/priv1.edb
2382    }
2383 }
2384 \end{verbatim}
2385
2386 The advantage of excluding the above files is that you can significantly
2387 reduce the size of your backup since all the important Exchange files
2388 will be properly saved by the Plugin.
2389
2390
2391 \subsubsection{Restoring}
2392 The restore operation is much the same as a normal Bacula restore, with
2393 the following provisos:
2394
2395 \begin{itemize}
2396 \item  The {\bf Where} restore option must not be specified
2397 \item Each Database directory must be marked as a whole. You cannot just
2398      select (say) the .edb file and not the others.
2399 \item If a Storage Group is restored, the directory of the Storage Group
2400      must be marked too.
2401 \item  It is possible to restore only a subset of the available log files,
2402      but they {\bf must} be contiguous. Exchange will fail to restore correctly
2403      if a log file is missing from the sequence of log files
2404 \item Each database to be restored must be dismounted and marked as "Can be
2405     overwritten by restore"
2406 \item If an entire Storage Group is to be restored (eg all databases and
2407    logs in the Storage Group), then it is best to manually delete the
2408    database files from the server (eg C:\verb+\+Program Files\verb+\+Exchsrvr\verb+\+mdbdata\verb+\+*)
2409    as Exchange can get confused by stray log files lying around.
2410 \end{itemize}
2411
2412 \subsubsection{Restoring to the Recovery Storage Group}
2413 The concept of the Recovery Storage Group is well documented by
2414 Microsoft 
2415 \elink{http://support.microsoft.com/kb/824126}{http://support.microsoft.com/kb/824126}, 
2416 but to briefly summarize...
2417
2418 Microsoft Exchange allows the creation of an additional Storage Group
2419 called the Recovery Storage Group, which is used to restore an older
2420 copy of a database (e.g. before a mailbox was deleted) into without
2421 messing with the current live data. This is required as the Standard and
2422 Small Business Server versions of Exchange can not ordinarily have more
2423 than one Storage Group.
2424
2425 To create the Recovery Storage Group, drill down to the Server in Exchange
2426 System Manager, right click, and select
2427 {\bf "New -> Recovery Storage Group..."}.  Accept or change the file
2428 locations and click OK. On the Recovery Storage Group, right click and
2429 select {\bf "Add Database to Recover..."} and select the database you will
2430 be restoring.
2431
2432 Restore only the single database nominated as the database in the
2433 Recovery Storage Group. Exchange will redirect the restore to the
2434 Recovery Storage Group automatically.
2435 Then run the restore.
2436
2437 \subsubsection{Restoring on Microsoft Server 2007}
2438 Apparently the {\bf Exmerge} program no longer exists in Microsoft Server
2439 2007, and hence you use a new procedure for recovering a single mail box.
2440 This procedure is documented by Microsoft at:
2441 \elink{http://technet.microsoft.com/en-us/library/aa997694.aspx}{http://technet.microsoft.com/en-us/library/aa997694.aspx},
2442 and involves using the {\bf Restore-Mailbox} and {\bf
2443 Get-Mailbox Statistics} shell commands.
2444
2445 \subsubsection{Caveats}
2446 This plugin is still being developed, so you should consider it
2447 currently in BETA test, and thus use in a production environment
2448 should be done only after very careful testing.
2449
2450 When doing a full backup, the Exchange database logs are truncated by
2451 Exchange as soon as the plugin has completed the backup. If the data
2452 never makes it to the backup medium (eg because of spooling) then the
2453 logs will still be truncated, but they will also not have been backed
2454 up. A solution to this is being worked on. You will have to schedule a
2455 new Full backup to ensure that your next backups will be usable.
2456
2457 The "Enable Circular Logging" option cannot be enabled or the plugin
2458 will fail.
2459
2460 Exchange insists that a successful Full backup must have taken place if
2461 an Incremental or Differential backup is desired, and the plugin will
2462 fail if this is not the case. If a restore is done, Exchange will
2463 require that a Full backup be done before an Incremental or Differential
2464 backup is done.
2465
2466 The plugin will most likely not work well if another backup application
2467 (eg NTBACKUP) is backing up the Exchange database, especially if the
2468 other backup application is truncating the log files.
2469
2470 The Exchange plugin has not been tested with the {\bf Accurate} option, so
2471 we recommend either carefully testing or that you avoid this option for
2472 the current time.
2473
2474 The Exchange plugin is not called during processing the bconsole {\bf
2475 estimate} command, and so anything that would be backed up by the plugin
2476 will not be added to the estimate total that is displayed.
2477
2478
2479 \subsection{libdbi Framework}
2480 \index[general]{libdbi Framework}
2481 As a general guideline, Bacula has support for a few catalog database drivers
2482 (MySQL, PostgreSQL, SQLite)
2483 coded natively by the Bacula team.  With the libdbi implementation, which is a
2484 Bacula driver that uses libdbi to access the catalog, we have an open field to
2485 use many different kinds database engines following the needs of users.
2486
2487 The according to libdbi (http://libdbi.sourceforge.net/) project: libdbi
2488 implements a database-independent abstraction layer in C, similar to the
2489 DBI/DBD layer in Perl. Writing one generic set of code, programmers can
2490 leverage the power of multiple databases and multiple simultaneous database
2491 connections by using this framework.
2492
2493 Currently the libdbi driver in Bacula project only supports the same drivers
2494 natively coded in Bacula.  However the libdbi project has support for many
2495 others database engines. You can view the list at
2496 http://libdbi-drivers.sourceforge.net/. In the future all those drivers can be
2497 supported by Bacula, however, they must be tested properly by the Bacula team.
2498
2499 Some of benefits of using libdbi are:
2500 \begin{itemize}
2501 \item The possibility to use proprietary databases engines in which your
2502   proprietary licenses prevent the Bacula team from developing the driver.
2503  \item The possibility to use the drivers written for the libdbi project.
2504  \item The possibility to use other database engines without recompiling Bacula
2505    to use them.  Just change one line in bacula-dir.conf
2506  \item Abstract Database access, this is, unique point to code and profiling
2507    catalog database access.
2508  \end{itemize}
2509  
2510  The following drivers have been tested:
2511  \begin{itemize}
2512  \item PostgreSQL, with and without batch insert
2513  \item Mysql, with and without batch insert
2514  \item SQLite
2515  \item SQLite3
2516  \end{itemize}
2517
2518  In the future, we will test and approve to use others databases engines
2519  (proprietary or not) like DB2, Oracle, Microsoft SQL.
2520
2521  To compile Bacula to support libdbi we need to configure the code with the
2522  --with-dbi and --with-dbi-driver=[database] ./configure options, where
2523  [database] is the database engine to be used with Bacula (of course we can
2524  change the driver in file bacula-dir.conf, see below).  We must configure the
2525  access port of the database engine with the option --with-db-port, because the
2526  libdbi framework doesn't know the default access port of each database.
2527
2528 The next phase is checking (or configuring) the bacula-dir.conf, example:
2529 \begin{verbatim}
2530 Catalog {
2531   Name = MyCatalog
2532   dbdriver = dbi:mysql; dbaddress = 127.0.0.1; dbport = 3306
2533   dbname = regress; user = regress; password = ""
2534 }
2535 \end{verbatim}
2536
2537 The parameter {\bf dbdriver} indicates that we will use the driver dbi with a
2538 mysql database.  Currently the drivers supported by Bacula are: postgresql,
2539 mysql, sqlite, sqlite3; these are the names that may be added to string "dbi:".
2540
2541 The following limitations apply when Bacula is set to use the libdbi framework:
2542  - Not tested on the Win32 platform
2543  - A little performance is lost if comparing with native database driver. 
2544    The reason is bound with the database driver provided by libdbi and the 
2545    simple fact that one more layer of code was added.
2546
2547 It is important to remember, when compiling Bacula with libdbi, the
2548 following packages are needed:
2549  \begin{itemize}
2550   \item libdbi version 1.0.0, http://libdbi.sourceforge.net/
2551   \item libdbi-drivers 1.0.0, http://libdbi-drivers.sourceforge.net/
2552  \end{itemize}
2553  
2554  You can download them and compile them on your system or install the packages
2555  from your OS distribution.
2556
2557 \subsection{Console Command Additions and Enhancements}
2558 \index[general]{Console Additions}                                 
2559
2560 \subsubsection{Display Autochanger Content}
2561 \index[general]{StatusSlots}
2562
2563 The {\bf status slots storage=\lt{}storage-name\gt{}} command displays
2564 autochanger content.
2565
2566 \footnotesize
2567 \begin{verbatim}
2568  Slot |  Volume Name  |  Status  |  Media Type       |   Pool     |
2569 ------+---------------+----------+-------------------+------------|
2570     1 |         00001 |   Append |  DiskChangerMedia |    Default |
2571     2 |         00002 |   Append |  DiskChangerMedia |    Default |
2572     3*|         00003 |   Append |  DiskChangerMedia |    Scratch |
2573     4 |               |          |                   |            |
2574 \end{verbatim}
2575 \normalsize
2576
2577 If you an asterisk ({\bf *}) appears after the slot number, you must run an
2578 {\bf update slots} command to synchronize autochanger content with your
2579 catalog.
2580
2581 \subsubsection{list joblog job=xxx or jobid=nnn}
2582 \index[general]{list joblog}
2583 A new list command has been added that allows you to list the contents
2584 of the Job Log stored in the catalog for either a Job Name (fully qualified)
2585 or for a particular JobId.  The {\bf llist} command will include a line with
2586 the time and date of the entry.
2587
2588 Note for the catalog to have Job Log entries, you must have a directive 
2589 such as:
2590
2591 \begin{verbatim}
2592   catalog = all
2593 \end{verbatim}
2594
2595 In your Director's {\bf Messages} resource.
2596
2597 \subsubsection{Use separator for multiple commands}
2598 \index[general]{Command Separator}
2599   When using bconsole with readline, you can set the command separator with 
2600   \textbf{@separator} command to one
2601   of those characters to write commands who require multiple input in one line.
2602 \begin{verbatim}
2603   !$%&'()*+,-/:;<>?[]^`{|}~
2604 \end{verbatim}
2605
2606 \subsubsection{Deleting Volumes}
2607 The delete volume bconsole command has been modified to
2608 require an asterisk (*) in front of a MediaId otherwise the
2609 value you enter is a taken to be a Volume name. This is so that
2610 users may delete numeric Volume names. The previous Bacula versions
2611 assumed that all input that started with a number was a MediaId.
2612
2613 This new behavior is indicated in the prompt if you read it
2614 carefully.
2615
2616 \subsection{Bare Metal Recovery}
2617 The old bare metal recovery project is essentially dead. One
2618 of the main features of it was that it would build a recovery
2619 CD based on the kernel on your system. The problem was that
2620 every distribution has a different boot procedure and different 
2621 scripts, and worse yet, the boot procedures and scripts change
2622 from one distribution to another.  This meant that maintaining
2623 (keeping up with the changes) the rescue CD was too much work.
2624
2625 To replace it, a new bare metal recovery USB boot stick has been developed
2626 by Bacula Systems.  This technology involves remastering a Ubuntu LiveCD to
2627 boot from a USB key.  
2628
2629 Advantages: 
2630 \begin{enumerate} 
2631 \item Recovery can be done from within graphical environment.  
2632 \item Recovery can be done in a shell.  
2633 \item Ubuntu boots on a large number of Linux systems.  
2634 \item The process of updating the system and adding new
2635    packages is not too difficult. 
2636 \item The USB key can easily be upgraded to newer Ubuntu versions.
2637 \item The USB key has writable partitions for modifications to
2638    the OS and for modification to your home directory.
2639 \item You can add new files/directories to the USB key very easily.
2640 \item You can save the environment from multiple machines on
2641    one USB key.
2642 \item Bacula Systems is funding its ongoing development.
2643 \end{enumerate}
2644
2645 The disadvantages are:
2646 \begin{enumerate}
2647 \item The USB key is usable but currently under development.
2648 \item Not everyone may be familiar with Ubuntu (no worse
2649   than using Knoppix)
2650 \item Some older OSes cannot be booted from USB. This can
2651    be resolved by first booting a Ubuntu LiveCD then plugging
2652    in the USB key.
2653 \item Currently the documentation is sketchy and not yet added
2654    to the main manual. See below ...
2655 \end{enumerate}
2656
2657 The documentation and the code can be found in the {\bf rescue} package
2658 in the directory {\bf linux/usb}.
2659
2660 \subsection{Miscellaneous}
2661 \index[general]{Misc New Features}
2662
2663 \subsubsection{Allow Mixed Priority = \lt{}yes\vb{}no\gt{}}
2664 \index[general]{Allow Mixed Priority}
2665    This directive is only implemented in version 2.5 and later.  When
2666    set to {\bf yes} (default {\bf no}), this job may run even if lower
2667    priority jobs are already running.  This means a high priority job
2668    will not have to wait for other jobs to finish before starting.
2669    The scheduler will only mix priorities when all running jobs have
2670    this set to true.
2671
2672    Note that only higher priority jobs will start early.  Suppose the
2673    director will allow two concurrent jobs, and that two jobs with
2674    priority 10 are running, with two more in the queue.  If a job with
2675    priority 5 is added to the queue, it will be run as soon as one of
2676    the running jobs finishes.  However, new priority 10 jobs will not
2677    be run until the priority 5 job has finished.
2678
2679 \subsubsection{Bootstrap File Directive -- FileRegex}
2680 \index[general]{Bootstrap File Directive}
2681   {\bf FileRegex} is a new command that can be added to the bootstrap
2682   (.bsr) file.  The value is a regular expression.  When specified, only
2683   matching filenames will be restored.
2684
2685   During a restore, if all File records are pruned from the catalog
2686   for a Job, normally Bacula can restore only all files saved. That
2687   is there is no way using the catalog to select individual files.
2688   With this new feature, Bacula will ask if you want to specify a Regex
2689   expression for extracting only a part of the full backup.
2690
2691 \begin{verbatim}
2692   Building directory tree for JobId(s) 1,3 ...
2693   There were no files inserted into the tree, so file selection
2694   is not possible.Most likely your retention policy pruned the files
2695   
2696   Do you want to restore all the files? (yes\vb{}no): no
2697   
2698   Regexp matching files to restore? (empty to abort): /tmp/regress/(bin|tests)/
2699   Bootstrap records written to /tmp/regress/working/zog4-dir.restore.1.bsr
2700 \end{verbatim}
2701
2702 \subsubsection{Bootstrap File Optimization Changes}
2703 In order to permit proper seeking on disk files, we have extended the bootstrap
2704 file format to include a {\bf VolStartAddr} and {\bf VolEndAddr} records. Each
2705 takes a 64 bit unsigned integer range (i.e. nnn-mmm) which defines the start
2706 address range and end address range respectively.  These two directives replace
2707 the {\bf VolStartFile}, {\bf VolEndFile}, {\bf VolStartBlock} and {\bf
2708   VolEndBlock} directives.  Bootstrap files containing the old directives will
2709 still work, but will not properly take advantage of proper disk seeking, and
2710 may read completely to the end of a disk volume during a restore.  With the new
2711 format (automatically generated by the new Director), restores will seek
2712 properly and stop reading the volume when all the files have been restored.
2713
2714 \subsubsection{Solaris ZFS/NFSv4 ACLs}
2715 This is an upgrade of the previous Solaris ACL backup code
2716 to the new library format, which will backup both the old
2717 POSIX(UFS) ACLs as well as the ZFS ACLs.
2718
2719 The new code can also restore POSIX(UFS) ACLs to a ZFS filesystem
2720 (it will translate the POSIX(UFS)) ACL into a ZFS/NFSv4 one) it can also
2721 be used to transfer from UFS to ZFS filesystems.
2722
2723
2724 \subsubsection{Virtual Tape Emulation}
2725 \index[general]{Virtual Tape Emulation}
2726 We now have a Virtual Tape emulator that allows us to run though 99.9\% of
2727 the tape code but actually reading and writing to a disk file. Used with the
2728 \textbf{disk-changer} script, you can now emulate an autochanger with 10 drives
2729 and 700 slots. This feature is most useful in testing.  It is enabled
2730 by using {\bf Device Type = vtape} in the Storage daemon's Device
2731 directive. This feature is only implemented on Linux machines and should not be
2732 used for production.
2733
2734 \subsubsection{Bat Enhancements}
2735 \index[general]{Bat Enhancements}
2736 Bat (the Bacula Administration Tool) GUI program has been significantly
2737 enhanced and stabilized. In particular, there are new table based status 
2738 commands; it can now be easily localized using Qt4 Linguist.
2739
2740 The Bat communications protocol has been significantly enhanced to improve
2741 GUI handling. Note, you {\bf must} use a the bat that is distributed with
2742 the Director you are using otherwise the communications protocol will not
2743 work.
2744
2745 \subsubsection{RunScript Enhancements}
2746 \index[general]{RunScript Enhancements}
2747 The {\bf RunScript} resource has been enhanced to permit multiple
2748 commands per RunScript.  Simply specify multiple {\bf Command} directives
2749 in your RunScript.
2750
2751 \begin{verbatim}
2752 Job {
2753   Name = aJob
2754   RunScript {
2755     Command = "/bin/echo test"
2756     Command = "/bin/echo an other test"
2757     Command = "/bin/echo 3 commands in the same runscript"
2758     RunsWhen = Before
2759   }
2760  ...
2761 }
2762 \end{verbatim}
2763
2764 A new Client RunScript {\bf RunsWhen} keyword of {\bf AfterVSS} has been
2765 implemented, which runs the command after the Volume Shadow Copy has been made.
2766
2767 Console commands can be specified within a RunScript by using:
2768 {\bf Console = \lt{}command\gt{}}, however, this command has not been 
2769 carefully tested and debugged and is known to easily crash the Director.
2770 We would appreciate feedback.  Due to the recursive nature of this command, we
2771 may remove it before the final release.
2772
2773 \subsubsection{Status Enhancements}
2774 \index[general]{Status Enhancements}
2775 The bconsole {\bf status dir} output has been enhanced to indicate
2776 Storage daemon job spooling and despooling activity.
2777
2778 \subsubsection{Connect Timeout}
2779 \index[general]{Connect Timeout}
2780 The default connect timeout to the File
2781 daemon has been set to 3 minutes. Previously it was 30 minutes.
2782
2783 \subsubsection{ftruncate for NFS Volumes}
2784 \index[general]{ftruncate for NFS Volumes}
2785 If you write to a Volume mounted by NFS (say on a local file server),
2786 in previous Bacula versions, when the Volume was recycled, it was not
2787 properly truncated because NFS does not implement ftruncate (file 
2788 truncate). This is now corrected in the new version because we have
2789 written code (actually a kind user) that deletes and recreates the Volume,
2790 thus accomplishing the same thing as a truncate.
2791
2792 \subsubsection{Support for Ubuntu}
2793 The new version of Bacula now recognizes the Ubuntu (and Kubuntu)
2794 version of Linux, and thus now provides correct autostart routines.
2795 Since Ubuntu officially supports Bacula, you can also obtain any
2796 recent release of Bacula from the Ubuntu repositories.
2797
2798 \subsubsection{Recycle Pool = \lt{}pool-name\gt{}}
2799 \index[general]{Recycle Pool}
2800 The new \textbf{RecyclePool} directive defines to which pool the Volume will
2801 be placed (moved) when it is recycled. Without this directive, a Volume will
2802 remain in the same pool when it is recycled. With this directive, it can be
2803 moved automatically to any existing pool during a recycle. This directive is
2804 probably most useful when defined in the Scratch pool, so that volumes will
2805 be recycled back into the Scratch pool.
2806
2807 \subsubsection{FD Version}
2808 \index[general]{FD Version}
2809 The File daemon to Director protocol now includes a version 
2810 number, which although there is no visible change for users, 
2811 will help us in future versions automatically determine
2812 if a File daemon is not compatible.
2813
2814 \subsubsection{Max Run Sched Time = \lt{}time-period-in-seconds\gt{}}
2815 \index[general]{Max Run Sched Time}
2816 The time specifies the maximum allowed time that a job may run, counted from
2817 when the job was scheduled. This can be useful to prevent jobs from running
2818 during working hours. We can see it like \texttt{Max Start Delay + Max Run
2819   Time}.
2820
2821 \subsubsection{Max Wait Time = \lt{}time-period-in-seconds\gt{}}
2822 \index[general]{Max Wait Time}
2823 Previous \textbf{MaxWaitTime} directives aren't working as expected, instead
2824 of checking the maximum allowed time that a job may block for a resource,
2825 those directives worked like \textbf{MaxRunTime}. Some users are reporting to
2826 use \textbf{Incr/Diff/Full Max Wait Time} to control the maximum run time of
2827 their job depending on the level. Now, they have to use
2828 \textbf{Incr/Diff/Full Max Run Time}.  \textbf{Incr/Diff/Full Max Wait Time}
2829 directives are now deprecated.
2830
2831 \subsubsection{Incremental|Differential Max Wait Time = \lt{}time-period-in-seconds\gt{}} 
2832 \index[general]{Incremental Max Wait Time}
2833 \index[general]{Differential Max Wait Time}
2834
2835 These directives have been deprecated in favor of
2836 \texttt{Incremental|Differential Max Run Time}.
2837
2838 \subsubsection{Max Run Time directives}
2839 \index[general]{Max Run Time directives}
2840 Using \textbf{Full/Diff/Incr Max Run Time}, it's now possible to specify the
2841 maximum allowed time that a job can run depending on the level.
2842
2843 \addcontentsline{lof}{figure}{Job time control directives}
2844 \includegraphics{\idir different_time.eps}
2845
2846 \subsubsection{Statistics Enhancements}
2847 \index[general]{Statistics Enhancements}
2848 If you (or probably your boss) want to have statistics on your backups to
2849 provide some \textit{Service Level Agreement} indicators, you could use a few
2850 SQL queries on the Job table to report how many:
2851
2852 \begin{itemize}
2853 \item jobs have run
2854 \item jobs have been successful
2855 \item files have been backed up
2856 \item ...
2857 \end{itemize}
2858
2859 However, these statistics are accurate only if your job retention is greater
2860 than your statistics period. Ie, if jobs are purged from the catalog, you won't
2861 be able to use them. 
2862
2863 Now, you can use the \textbf{update stats [days=num]} console command to fill
2864 the JobHistory table with new Job records. If you want to be sure to take in
2865 account only \textbf{good jobs}, ie if one of your important job has failed but
2866 you have fixed the problem and restarted it on time, you probably want to
2867 delete the first \textit{bad} job record and keep only the successful one. For
2868 that simply let your staff do the job, and update JobHistory table after two or
2869 three days depending on your organization using the \textbf{[days=num]} option.
2870
2871 These statistics records aren't used for restoring, but mainly for
2872 capacity planning, billings, etc.
2873
2874 The Bweb interface provides a statistics module that can use this feature. You
2875 can also use tools like Talend or extract information by yourself.
2876
2877 The \textbf{Statistics Retention = \lt{}time\gt{}} director directive defines
2878 the length of time that Bacula will keep statistics job records in the Catalog
2879 database after the Job End time. (In \texttt{JobHistory} table) When this time
2880 period expires, and if user runs \texttt{prune stats} command, Bacula will
2881 prune (remove) Job records that are older than the specified period.
2882
2883 You can use the following Job resource in your nightly \textbf{BackupCatalog}
2884 job to maintain statistics.
2885 \begin{verbatim}
2886 Job {
2887   Name = BackupCatalog
2888   ...
2889   RunScript {
2890     Console = "update stats days=3"
2891     Console = "prune stats yes"
2892     RunsWhen = After
2893     RunsOnClient = no
2894   }
2895 }
2896 \end{verbatim}
2897
2898 \subsubsection{ScratchPool = \lt{}pool-resource-name\gt{}}
2899 \index[general]{ScratchPool}
2900 This directive permits to specify a specific \textsl{Scratch} pool for the
2901 current pool. This is useful when using multiple storage sharing the same
2902 mediatype or when you want to dedicate volumes to a particular set of pool.
2903
2904 \subsubsection{Enhanced Attribute Despooling}
2905 \index[general]{Attribute Despooling}
2906 If the storage daemon and the Director are on the same machine, the spool file
2907 that contains attributes is read directly by the Director instead of being
2908 transmitted across the network. That should reduce load and speedup insertion.
2909
2910 \subsubsection{SpoolSize = \lt{}size-specification-in-bytes\gt{}}
2911 \index[general]{SpoolSize}
2912 A new Job directive permits to specify the spool size per job. This is used
2913 in advanced job tunning. {\bf SpoolSize={\it bytes}}
2914
2915 \subsubsection{MaximumConsoleConnections = \lt{}number\gt{}}
2916 \index[general]{MaximumConsoleConnections}
2917 A new director directive permits to specify the maximum number of Console
2918 Connections that could run concurrently. The default is set to 20, but you may
2919 set it to a larger number.
2920
2921 \subsubsection{VerId = \lt{}string\gt{}}
2922 \index[general]{VerId}
2923 A new director directive permits to specify a personnal identifier that will be
2924 displayed in the \texttt{version} command.
2925
2926 \subsubsection{dbcheck enhancements}
2927 \index[general]{dbcheck enhancements}
2928 If you are using Mysql, dbcheck will now ask you if you want to create
2929 temporary indexes to speed up orphaned Path and Filename elimination. 
2930
2931 A new \texttt{-B} option allows you to print catalog information in a simple
2932 text based format. This is useful to backup it in a secure way.
2933
2934 \begin{verbatim}
2935  $ dbcheck -B 
2936  catalog=MyCatalog
2937  db_type=SQLite
2938  db_name=regress
2939  db_driver=
2940  db_user=regress
2941  db_password=
2942  db_address=
2943  db_port=0
2944  db_socket=
2945 \end{verbatim} %$
2946
2947 You can now specify the database connection port in the command line.
2948
2949 \subsubsection{{-}{-}docdir configure option}
2950 \index[general]{{-}{-}docdir configure option}
2951 You can use {-}{-}docdir= on the ./configure command to
2952 specify the directory where you want Bacula to install the
2953 LICENSE, ReleaseNotes, ChangeLog, ... files.   The default is 
2954 {\bf /usr/share/doc/bacula}.
2955       
2956 \subsubsection{{-}{-}htmldir configure option}
2957 \index[general]{{-}{-}htmldir configure option}
2958 You can use {-}{-}htmldir= on the ./configure command to
2959 specify the directory where you want Bacula to install the bat html help
2960 files. The default is {\bf /usr/share/doc/bacula/html}
2961
2962 \subsubsection{{-}{-}with-plugindir configure option}
2963 \index[general]{{-}{-}plugindir configure option}
2964 You can use {-}{-}plugindir= on the ./configure command to
2965 specify the directory where you want Bacula to install
2966 the plugins (currently only bpipe-fd). The default is
2967 /usr/lib.