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