]> git.sur5r.net Git - bacula/docs/blob - docs/manuals/en/main/newfeatures.tex
Updates to the New Features chapter
[bacula/docs] / docs / manuals / en / main / newfeatures.tex
1 \chapter{New Features in 9.0.0}
2 \subsection{Maximum Virtual Full Interval Option}
3 Two new director directives have been added:
4
5 \begin{verbatim}
6    Max Virtual Full Interval
7 and
8    Virtual Full Backup Pool
9 \end(verbatime)
10
11 The {\bf Max Virtual Full Interval} directive should behave similar to the
12 {\bf Max Full Interval}, but for Virtual Full jobs.  If Bacula sees that
13 there has not been a Full backup in Max Virtual Full Interval time then it
14 will upgrade the job to Virtual Full.  If you have both {\bf Max Full
15 Interval} and {\bf Max Virtual Full Interval} set then Max Full Interval
16 should take precedence.
17
18 The {\bf Virtual Full Backup Pool} directive allows one to change the pool
19 as well.  You probably want to use these two directives in
20 conjunction with each other but that may depend on the specifics of one's
21 setup.  If you set the {\bf Max Full Interval} without setting {\bf Max
22 Virtual Full Interval} then Bacula will use whatever the "default" pool is
23 set to which is the same behavior as with the Max Full Interval.
24
25 \subsection{Progressive Virtual Full}
26
27 In Bacula version 9.0.0, we have added a new Directive named {\bf Backups To Keep} that
28 permits you to implement Progressive Virtual Fulls within Bacula. Sometimes
29 this feature is known as Incremental Forever with Consolidation.
30
31 \smallskip
32
33 \begin{figure}[htbp]
34   \centering
35   \includegraphics[width=.8\linewidth]{pvf-slidingbackups}
36   \caption{Backup Sequence Slides Forward One Day, Each Day}
37   \label{fig:slidingbackups}
38 \end{figure}
39
40 To implement this the Progressive Virtual Full feature, you add the
41 {\bf Backups To Keep} directive to your Job resource. The value
42 specified on the directive indicates the number of backup jobs that should
43 not be merged into the Virtual Full. The default is zero and behaves the
44 same way the prior script {\bf pvf} worked.
45
46 \subsubsection{Backups To Keep Directive}
47 The new {\bf BackupsToKeep} directive is specified in the Job Resource and
48 has the form:
49
50 \begin{verbatim}
51    Backups To Keep = 30
52 \end{verbatim}
53
54 where the value (30 in the above figure and example) is the number of
55 backups to retain.  When this directive is present during a Virtual Full
56 (it is ignored for other Job types), it will look for a Full backup that
57 has more subsequent backups than the value specified.  In the above example
58 the Job will simply terminate unless there is a Full back followed by at
59 least 31 backups of either level Differential or Incremental.
60
61 \smallskip
62 Assuming that the last Full backup is followed by 32 Incremental backups, a
63 Virtual Full will be run that consolidates the Full with the first two
64 Incrementals that were run after the Full.  The result is that you will end
65 up with a Full followed by 30 Incremental backups. The Job Resource
66 in {\bf bacula-dir.conf} to accomplish this would be:
67
68 \begin{verbatim}
69    Job {
70      Name = "VFull"
71      Type = Backup
72      Level = VirtualFull
73      Client = "my-fd"
74      File Set = "FullSet"
75      Accurate = Yes
76      Backups To Keep = 10
77    }
78 \end{verbatim}
79
80 \subsubsection{Delete Consolidated Jobs}
81 The new directive {\bf Delete Consolidated Jobs} expects a {\bf yes}
82 or {\bf no} value that if set to {\bf yes} will cause any old Job that is
83 consolidated during a Virtual Full to be deleted. In the example above
84 we saw that a Full plus one other job (either an Incremental or
85 Differential) were consolidated into a new Full backup. The original Full
86 plus the other Job consolidated will be deleted. The default value is
87 {\bf no}.
88
89 \subsubsection{Virtual Full Compatibility}
90 Virtual Full as well as Progressive Virtual Full works with any
91 standard backup Job.
92
93 \smallskip
94 However, it should be noted that Virtual Full jobs are not compatible with
95 any plugins that you may be using.
96
97 \subsection{TapeAlert Enhancements}
98 There are some significant enhancements to the TapeAlert feature of Bacula.
99 Several directives are used slightly differently, and there is a minor
100 compatibility problem with the old TapeAlert implementation. 
101
102 \subsubsection{What is New}
103 First, you must define a \textbf{Alert Command} directive in the Device
104 resource that calls the new \textbf{tapealert} script that is installed in
105 the scripts directory (normally: /opt/bacula/scripts).  It is defined as
106 follows:
107
108 \begin{verbatim}
109 Device {
110   Name = ...
111   Archive Device = /dev/nst0
112   Alert Command = "/opt/bacula/scripts/tapealert %l"
113   Control Device = /dev/sg1 # must be SCSI ctl for /dev/nst0
114   ...
115 }
116 \end{verbatim}
117
118 The \textbf{Control Device} directive in the Storage Daemon's conf file was
119 previously used only for the SAN Shared Storage feature. With Bacula
120 version 8.8, it is also used for the TapeAlert command to permit Bacula to
121 detect tape alerts on a specific device (normally only tape devices).
122
123 Once the above mentioned two directives (Alert Command and Control Device)
124 are in place in each of your Device resources, Bacula will check for tape
125 alerts at two points:
126
127 \begin{itemize}
128 \item After the Drive is used and it becomes idle.
129 \item After each read or write error on the drive.
130 \end{itemize}
131
132 At each of the above times, Bacula will call the new \textbf{tapealert}
133 script, which uses the \textbf{tapeinfo} program.  The tapeinfo utility is
134 part of the apt sg3-utils and rpm sg3\_utils packages.  Then for each tape
135 alert that Bacula finds for that drive, it will emit a Job message that is
136 either INFO, WARNING, or FATAL depending on the designation in the Tape
137 Alert published by the T10 Technical Committee on SCSI Storage Interfaces
138 (www.t10.org).  For the specification, please see:
139 www.t10.org/ftp/t10/document.02/02-142r0.pdf
140
141 \smallskip
142 As a somewhat extreme example, if tape alerts 3, 5, and 39 are set, you
143 will get the following output in your backup job.
144
145 {\small
146   \begin{verbatim}
147      17-Nov 13:37 rufus-sd JobId 1: Error: block.c:287 
148      Write error at 0:17 on device "tape"
149      (/home/kern/bacula/k/regress/working/ach/drive0)
150      Vol=TestVolume001. ERR=Input/output error.
151
152      17-Nov 13:37 rufus-sd JobId 1: Fatal error: Alert:
153      Volume="TestVolume001" alert=3: ERR=The operation has stopped because
154      an error has occurred while reading or writing data which the drive
155      cannot correct.  The drive had a hard read or write error
156
157      17-Nov 13:37 rufus-sd JobId 1: Fatal error: Alert:
158      Volume="TestVolume001" alert=5: ERR=The tape is damaged or the drive
159      is faulty.  Call the tape drive supplier helpline.  The drive can no
160      longer read data from the tape
161
162      17-Nov 13:37 rufus-sd JobId 1: Warning: Disabled Device "tape"
163      (/home/kern/bacula/k/regress/working/ach/drive0) due to tape alert=39.
164
165      17-Nov 13:37 rufus-sd JobId 1: Warning: Alert: Volume="TestVolume001"
166      alert=39: ERR=The tape drive may have a fault.  Check for availability
167      of diagnostic information and run extended diagnostics if applicable.
168      The drive may have had a failure which may be identified by stored
169      diagnostic information or by running extended diagnostics (eg Send
170      Diagnostic).  Check the tape drive users manual for instructions on
171      running extended diagnostic tests and retrieving diagnostic data.
172
173   \end{verbatim}
174 }
175
176 Without the tape alert feature enabled, you would only get the first error
177 message above, which is the error return Bacula received when it gets the
178 error. Notice also, that in this case the alert number 5 is a critical
179 error, which causes two things to happen. First the tape drive is disabled,
180 and second the Job is failed.
181
182 \smallskip
183 If you attempt to run another Job using
184 the Device that has been disabled, you will get a message similar to the
185 following:
186
187 \begin{verbatim}
188 17-Nov 15:08 rufus-sd JobId 2: Warning:
189      Device "tape" requested by DIR is disabled.
190 \end{verbatim}
191
192 and the Job may be failed if no other drive can be found.
193 \smallskip
194 Once the problem with the tape drive has been corrected, you can
195 clear the tape alerts and re-enable the device with the Bacula bconsole
196 command such as the following:
197
198 \begin{verbatim}
199   enable Storage=Tape
200 \end{verbatim}
201
202 Note, when you enable the device, the list of prior tape alerts for that
203 drive will be discarded.
204
205
206 \smallskip
207 Since is is possible to miss tape alerts, Bacula maintains a temporary list
208 of the last 8 alerts, and each time Bacula calls the \textbf{tapealert}
209 script, it will keep up to 10 alert status codes. Normally there will only
210 be one or two alert errors for each call to the tapealert script.
211
212 \smallskip
213 Once a drive has one or more tape alerts, you can see them by using the
214 bconsole status command as follows:
215 \begin{verbatim}
216 status storage=Tape
217 \end{verbatim}
218 which produces the following output:
219 \begin{verbatim}
220 Device Vtape is "tape" (/home/kern/bacula/k/regress/working/ach/drive0)
221 mounted with:
222     Volume:      TestVolume001
223     Pool:        Default
224     Media type:  tape
225     Device is disabled. User command.
226     Total Bytes Read=0 Blocks Read=1 Bytes/block=0
227     Positioned at File=1 Block=0
228     Critical Alert: at 17-Nov-2016 15:08:01 Volume="TestVolume001"
229        alert=Hard Error
230     Critical Alert: at 17-Nov-2016 15:08:01 Volume="TestVolume001"
231        alert=Read Failure
232     Warning Alert: at 17-Nov-2016 15:08:01 Volume="TestVolume001"
233        alert=Diagnostics Required
234 \end{verbatim}
235 if you want to see the long message associated with each of the alerts,
236 simply set the debug level to 10 or more and re-issue the status command:
237 \begin{verbatim}
238 setdebug storage=Tape level=10
239 status storage=Tape
240 \end{verbatim}
241 \begin{verbatim}
242     ...
243     Critical Alert: at 17-Nov-2016 15:08:01 Volume="TestVolume001"
244       flags=0x0 alert=The operation has stopped because an error has occurred
245        while reading or writing data which the drive cannot correct. The drive had
246        a hard read or write error
247     Critical Alert: at 17-Nov-2016 15:08:01 Volume="TestVolume001"
248        flags=0x0 alert=The tape is damaged or the drive is faulty. Call the tape
249        drive supplier helpline.  The drive can no longer read data from the tape
250     Warning Alert: at 17-Nov-2016 15:08:01 Volume="TestVolume001" flags=0x1
251        alert=The tape drive may have a fault. Check for availability of diagnostic
252        information and run extended diagnostics if applicable.   The drive may
253        have had a failure which may be identified by stored diagnostic information
254        or by running extended diagnostics (eg Send Diagnostic). Check the tape
255        drive users manual for instructions on running extended diagnostic tests
256        and retrieving diagnostic data.
257     ...
258 \end{verbatim}
259 The next time you \textbf{enable} the Device by either using
260 \textbf{bconsole} or you restart the Storage Daemon, all the saved alert
261 messages will be discarded.
262
263 \subsubsection{Handling of Alerts}
264 Tape Alerts numbered 7,8,13,14,20,22,52,53, and 54 will cause Bacula to
265 disable the current Volume.
266
267 \smallskip
268 Tape Alerts numbered 14,20,29,30,31,38, and 39 will cause Bacula to disable
269 the drive.
270
271 \smallskip
272 Please note certain tape alerts such as 14 have multiple effects (disable
273 the Volume and disable the drive).
274
275 \subsection{New Console ACL Directives}
276 By default, if a Console ACL directive is not set, Bacula will assume that the
277 ACL list is empty. If the current Bacula Director configuration uses restricted
278 Consoles and allows restore jobs, it is mandatory to configure the new
279 directives.
280
281 \subsubsection{DirectoryACL}
282 \index[dir]{Directive!DirectoryACL}
283
284 This directive is used to specify a list of directories that can be accessed by
285 a restore session.  Without this directive, the console cannot restore any
286 file.  Multiple directories names may be specified by separating them with
287 commas, and/or by specifying multiple DirectoryACL directives.  For example,
288 the directive may be specified as:
289
290 \footnotesize
291 \begin{verbatim}
292     DirectoryACL = /home/bacula/, "/etc/", "/home/test/*"
293 \end{verbatim}
294 \normalsize
295
296 With the above specification, the console can access the following directories:
297 \begin{itemize}
298 \item \texttt{/etc/password}
299 \item \texttt{/etc/group}
300 \item \texttt{/home/bacula/.bashrc}
301 \item \texttt{/home/test/.ssh/config}
302 \item \texttt{/home/test/Desktop/Images/something.png}
303 \end{itemize}
304
305 But not to the following files or directories:
306 \begin{itemize}
307 \item \texttt{/etc/security/limits.conf}
308 \item \texttt{/home/bacula/.ssh/id\_dsa.pub}
309 \item \texttt{/home/guest/something}
310 \item \texttt{/usr/bin/make}
311 \end{itemize}
312
313 If a directory starts with a Windows pattern (ex: c:/), Bacula will
314 automatically ignore the case when checking directories.
315
316 \subsection{New Bconsole ``list''  Command Behavior}
317
318 The bconsole \texttt{list} commands can now be used safely from a
319 restricted bconsole session.  The information displayed will respect the
320 ACL configured for the Console session.  For example, if a Console has
321 access to JobA, JobB and JobC, information about JobD will not appear in
322 the \texttt{list jobs} command.
323
324 \subsection{New Console ACL Directives}
325 \index[dir]{Directive!BackupClientACL}
326 It is now possible to configure a restricted Console to distinguish Backup
327 and Restore jobs permissions.  The \texttt{BackupClientACL} can restrict
328 backup jobs on a specific set of clients, while the
329 \texttt{RestoreClientACL} can restrict restore jobs.
330
331 {\small
332 \begin{verbatim}
333 # cat /opt/bacula/etc/bacula-dir.conf
334 ...
335
336 Console {
337  Name = fd-cons             # Name of the FD Console
338  Password = yyy
339 ...
340  ClientACL = localhost-fd           # everything allowed
341  RestoreClientACL = test-fd         # restore only
342  BackupClientACL = production-fd    # backup only
343 }
344 \end{verbatim}
345 }
346
347 The \texttt{ClientACL} directive takes precedence over the
348 \texttt{RestoreClientACL} and the \texttt{BackupClientACL}. In the Console
349 resource resource above, it means that the bconsole linked to the Console{}
350 named "fd-cons" will be able to run:
351
352 \begin{itemize}
353 \item backup and restore for ``localhost-fd''
354 \item backup for ``production-fd''
355 \item restore for ``test-fd''
356 \end{itemize}
357
358 At the restore time, jobs for client ``localhost-fd'', ``test-fd'' and
359 ``production-fd'' will be available.
360
361 If \texttt{*all*} is set for \texttt{ClientACL}, backup and restore will be
362 allowed for all clients, despite the use of \texttt{RestoreClientACL} or
363 \texttt{"BackupClientACL}.
364
365 \subsection{Client Initiated Backup}
366 \label{sec:featurecib}
367 A console program such as the new \texttt{tray-monitor} or
368 \texttt{bconsole} can now be configured to connect a File Daemon.  There
369 are many new features available (see the New Tray Monitor section below),
370 but probably the most important is the ability for the user to initiate a
371 backup of his own machine.  The connection established by the FD to the
372 Director for the backup can be used by the Director for the backup, thus
373 not only can clients (users) initiate backups, but a File Daemon that is
374 NATed (cannot be reached by the Director) can now be backed up without
375 using advanced tunneling techniques.
376
377 \smallskip
378 The flow of information is shown in the picture below:
379 \bsysimageH{nat}{Client Initiated Backup Network Flow}{fig:nat3}
380
381 \newpage
382 \subsection{Configuring Client Initiated Backup}
383 \smallskip
384 In order to ensure security, there are a number of new directives
385 that must be enabled in the new \texttt{tray-monitor}, the File
386 Daemon and in the Director.
387 A typical configuration might look like the following:
388
389 {\small
390 \begin{verbatim}
391 # cat /opt/bacula/etc/bacula-dir.conf
392 ...
393
394 Console {
395  Name = fd-cons             # Name of the FD Console
396  Password = yyy
397
398  # These commands are used by the tray-monitor, it is possible to restrict
399  CommandACL = run, restore, wait, .status, .jobs, .clients
400  CommandACL = .storages, .pools, .filesets, .defaults, .estimate
401
402  # Adapt for your needs
403  jobacl = *all*
404  poolacl = *all*
405  clientacl = *all*
406  storageacl = *all*
407  catalogacl = *all*
408  filesetacl = *all*
409 }
410 \end{verbatim}
411 }
412
413 {\small
414 \begin{verbatim}
415 # cat /opt/bacula/etc/bacula-fd.conf
416 ...
417
418 Console {              # Console to connect the Director
419   Name = fd-cons
420   DIRPort = 9101
421   address = localhost
422   Password = "yyy"
423 }
424
425 Director {
426   Name = remote-cons   # Name of the tray monitor/bconsole
427   Password = "xxx"     # Password of the tray monitor/bconsole
428   Remote = yes         # Allow to use send commands to the Console defined
429 }
430 \end{verbatim}
431 }
432
433 {\small
434 \begin{verbatim}
435 cat /opt/bacula/etc/bconsole-remote.conf
436 ....
437
438 Director {
439   Name = localhost-fd
440   address = localhost        # Specify the FD address
441   DIRport = 9102             # Specify the FD Port
442   Password = "notused"
443 }
444
445 Console {
446   Name = remote-cons         # Name used in the auth process
447   Password = "xxx"
448 }
449 \end{verbatim}
450 }
451
452 {\small
453 \begin{verbatim}
454 cat ~/.bacula-tray-monitor.conf
455 Monitor {
456   Name = remote-cons
457 }
458
459 Client {
460   Name = localhost-fd
461   address = localhost     # Specify the FD address
462   Port = 9102             # Specify the FD Port
463   Password = "xxx"
464   Remote = yes
465 }
466 \end{verbatim}
467 }
468
469 \bsysimageH{conf-nat}{Relation Between Resources (bconsole)}{fig:nat}
470 \bsysimageH{conf-nat2}{Relation Between Resources (tray-monitor)}{fig:nat2}
471
472 \medskip
473 A more detailed description with complete examples is available in
474 chapter~\ref{TrayMonitorChapter}.
475
476 \subsection{New Tray Monitor}
477
478 A new tray monitor has been added to the 9.0 release, the tray monitor offers
479 the following features:
480
481 \begin{itemize}
482 \item Director, File and Storage Daemon status page
483 \item Support for the Client Initiated Backup protocol (See
484   \vref{sec:featurecib}). To use the Client Initiated Backup option from the
485   tray monitor, the Client option ``Remote'' should be checked in the
486   configuration (Fig \vref{fig:tray2}).
487 \item Wizard to run new job (Fig \vref{fig:tray4})
488 \item Display an estimation of the number of files and the size of the next
489   backup job (Fig \vref{fig:tray4})
490 \item Ability to configure the tray monitor configuration file directly from
491   the GUI (Fig \vref{fig:tray2})
492 \item Ability to monitor a component and adapt the tray monitor task bar icon
493   if a jobs are running.
494 \item TLS Support
495 \item Better network connection handling
496 \item Default configuration file is stored under \texttt{\$HOME/.bacula-tray-monitor.conf}
497 \item Ability to ``schedule'' jobs
498 \item Available on Linux and Windows platforms
499 \end{itemize}
500
501 % \medskip
502 % Please see chapter \ref{TrayMonitorChapter} for more details about this new
503 % functionality.
504
505
506 \begin{figure}[htbp]
507   \centering
508   \includegraphics[width=0.8\linewidth]{tray-monitor-status}
509   \caption{Tray Monitor Status}
510   \label{fig:tray0}
511 \end{figure}
512
513 \begin{figure}[htbp]
514   \centering
515   \includegraphics[width=0.9\linewidth]{tray-monitor-conf-fd}
516   \caption{Tray Monitor Client Configuration}
517   \label{fig:tray2}
518 \end{figure}
519
520 \begin{figure}[htbp]
521   \centering
522   \includegraphics[width=0.8\linewidth]{tray-monitor-run1}
523   \smallskip
524   \includegraphics[width=0.8\linewidth]{tray-monitor-run2}
525   \caption{Tray Monitor Run a Job}
526   \label{fig:tray4}
527 \end{figure}
528
529 \subsection{Schedule Jobs via the Tray Monitor}
530
531 The Tray Monitor can scan periodically a specific directory ``Command
532 Directory'' and process ``*.bcmd'' files to find jobs to run.
533
534 The format of the ``file.bcmd'' command file is the following:
535 \begin{verbatim}
536 <component name>:<run command>
537 <component name>:<run command>
538 ...
539
540 <component name> = string
541 <run command>    = string (bconsole command line)
542 \end{verbatim}
543
544 For example:
545 \begin{verbatim}
546 localhost-fd: run job=backup-localhost-fd level=full
547 localhost-dir: run job=BackupCatalog
548 \end{verbatim}
549
550 The command file should contain at least one command. The component specified
551 in the first part of the command line should be defined in the tray
552 monitor. Once the command file is detected by the tray monitor, a popup is
553 displayed to the user and it is possible for the user to cancel the job directly.
554
555 \smallskip{}
556
557 The file can be created with tools such as ``cron'' or the ``task scheduler''
558 on Windows. It is possible to verify the network connection at that time to
559 avoid network errors.
560
561 \begin{verbatim}
562 #!/bin/sh
563 if ping -c 1 director &> /dev/null
564 then
565    echo "my-dir: run job=backup" > /path/to/commands/backup.bcmd
566 fi
567 \end{verbatim}
568
569 %\bsysimageH{tray-monitor-status}{Tray Monitor Status}{fig:tray0}
570 %\bsysimageH{tray-monitor1}{Tray Monitor Configuration}{fig:tray1}
571 %\bsysimageH{tray-monitor-conf-fd}{Tray Monitor Client Configuration}{fig:tray2}
572 %\bsysimageH{tray-monitor-conf-dir}{Tray Monitor Director Configuration}{fig:tray3}
573 %\bsysimageH{tray-monitor-run1}{Tray Monitor Run new Job}{fig:tray4}
574 % find a way to group them together
575 %\bsysimageH{tray-monitor-run2}{Tray Monitor Setup new Job}{fig:tray5}
576
577
578 \subsection{Accurate Option for Verify ``Volume Data'' Job}
579
580 Since Bacula version 8.4.1, it has been possible to have a Verify Job
581 configured with \texttt{level=Data} that will reread all records from a job
582 and optionally check the size and the checksum of all files.  Starting with
583
584 \smallskip
585 Bacula version 9.0, it is now possible to use the \texttt{accurate} option to check
586 catalog records at the same time.  When using a Verify job with
587 \texttt{level=Data} and \texttt{accurate=yes} can replace the
588 \texttt{level=VolumeToCatalog} option.
589
590 For more information on how to setup a Verify Data job, see
591 \vref{label:verifyvolumedata}.
592
593 To run a Verify Job with the \texttt{accurate} option, it is possible to set
594 the option in the Job definition or set use the \texttt{accurate=yes} on the
595 command line.
596
597 \begin{verbatim}
598 * run job=VerifyData jobid=10 accurate=yes
599 \end{verbatim}
600
601 \subsection{FileDaemon Saved Messages Resource Destination}
602
603 It is now possible to send the list of all saved files to a Messages
604 resource with the \texttt{saved} message type.  It is not recommended to
605 send this flow of information to the director and/or the catalog when the
606 client FileSet is pretty large.  To avoid side effects, the \texttt{all}
607 keyword doesn't include the \texttt{saved} message type.  The
608 \texttt{saved} message type should be explicitely set.
609
610 \begin{verbatim}
611 # cat /opt/bacula/etc/bacula-fd.conf
612 ...
613 Messages {
614   Name = Standard
615   director = mydirector-dir = all, !terminate, !restored, !saved
616   append = /opt/bacula/working/bacula-fd.log = all, saved, restored
617 }
618 \end{verbatim}
619
620 \subsection{Minor Enhancements}
621
622 \subsubsection{New Bconsole ".estimate" Command}
623
624 The new \texttt{.estimate} command can be used to get statistics about a
625 job to run.  The command uses the database to approximate the size and the
626 number of files of the next job.  On a PostgreSQL database, the command
627 uses regression slope to compute values.  On SQLite or MySQL, where these
628 statistical functions are not available, the command uses a simple
629 ``average'' estimation.  The correlation number is given for each value.
630
631 {\small
632 \begin{verbatim}
633 *.estimate job=backup
634 level=I
635 nbjob=0
636 corrbytes=0
637 jobbytes=0
638 corrfiles=0
639 jobfiles=0
640 duration=0
641 job=backup
642
643 *.estimate job=backup level=F
644 level=F
645 nbjob=1
646 corrbytes=0
647 jobbytes=210937774
648 corrfiles=0
649 jobfiles=2545
650 duration=0
651 job=backup
652 \end{verbatim}
653 }
654
655 \subsubsection{Traceback and Lockdump}
656
657 After the reception of a signal, \texttt{traceback} and \texttt{lockdump}
658 information are now stored in the same file.
659
660 \subsection{Bconsole ``list jobs'' command options}
661
662 The \texttt{list jobs} bconsole command now accepts new command line options:
663
664 \begin{itemize}
665 \item \textbf{joberrors} Display jobs with JobErrors
666 \item \textbf{jobstatus=T} Display jobs with the specified status code
667 \item \textbf{client=cli} Display jobs for a specified client
668 \item \textbf{order=asc/desc} Change the output format of the job list. The
669   jobs are sorted by start time and JobId, the sort can use ascendant (asc) or
670   descendant (desc) (default) value.
671 \end{itemize}
672
673 \subsection{Minor Enhancements}
674
675 \subsubsection{New Bconsole "Tee All" Command}
676
677 The ``@tall'' command allows logging all input/output from a console session.
678
679 \begin{verbatim}
680 *@tall /tmp/log
681 *st dir
682 ...
683 \end{verbatim}
684
685 \subsection{Bconsole ``list jobs'' command options}
686
687 The \texttt{list jobs} bconsole command now accepts new command line options:
688
689 \begin{itemize}
690 \item \textbf{joberrors} Display jobs with JobErrors
691 \item \textbf{jobstatus=T} Display jobs with the specified status code
692 \item \textbf{client=cli} Display jobs for a specified client
693 \item \textbf{order=asc/desc} Change the output format of the job list. The
694   jobs are sorted by start time and JobId, the sort can use ascendant (asc) or
695   descendant (desc) (default) value.
696 \end{itemize}
697
698 \subsection{New Bconsole "Tee All" Command}
699
700 The ``@tall'' command allows logging all input/output from a console session.
701
702 \begin{verbatim}
703 *@tall /tmp/log
704 *st dir
705 ...
706 \end{verbatim}
707
708 \subsection{New Job Edit Codes \%I}
709 In various places such as RunScripts, you have now access to \%I to get the
710 JobId of the copy or migration job started by a migrate job.
711
712 \begin{verbatim}
713 Job {
714   Name = Migrate-Job
715   Type = Migrate
716   ...
717   RunAfter = "echo New JobId is %I"
718 }
719 \end{verbatim}
720
721
722 \subsection*{.api version 2}
723
724 In Bacula version 9.0 and later, we introduced a new .api version
725 to help external tools to parse various Bacula bconsole output.
726
727 % waa - 20150317 - this section needs just a little more to explain what the "43" in "s43" mean. Perhaps
728 %                  if it is not a good place to list the possibilities here, then list where a reference
729 %                  is. Also, I think   .api 2 ...   Means "use API version 2"  but that should be stated too
730
731 The \texttt{api\_opts} option can use the following arguments:
732 \begin{itemize}
733 \item [C] Clear current options
734 \item [tn] Use a specific time format (1 ISO format, 2 Unix Timestamp, 3 Default Bacula time format)
735 \item [sn] Use a specific separator between items (new line by default).
736 \item [Sn] Use a specific separator between objects (new line by default).
737 \item [o] Convert all keywords to lowercase and convert all non \textsl{isalpha} characters to \_
738 \end{itemize}
739
740 % waa - 20150317 - I think there should either be more output listed here to give a better feeling 
741 %                  or, perhaps another output listing for different .status commands
742
743 \begin{verbatim}
744   .api 2 api_opts=t1s43S35
745   .status dir running
746 ==================================
747 jobid=10
748 job=AJob
749 ...
750 \end{verbatim}
751
752 \subsection*{New Debug Options}
753
754 In Bacula version 9.0 and later, we introduced a new \texttt{options} parameter for
755 the \texttt{setdebug} bconsole command.
756
757 \smallskip{}
758
759 The following arguments to the new \texttt{option} parameter are available to control debug functions.
760
761 \begin{itemize}
762 \item [0] Clear debug flags
763 \item [i] Turn off, ignore bwrite() errors on restore on File Daemon
764 \item [d] Turn off decomp of BackupRead() streams on File Daemon
765 \item [t] Turn on timestamps in traces
766 \item [T] Turn off timestamps in traces
767
768 % waa - 20150306 - does this "c" item mean to say "Truncate trace file if one exists, otherwise append to it"   ???
769 \item [c] Truncate trace file if trace file is activated
770
771 \item [l] Turn on recoding events on P() and V()
772 \item [p] Turn on the display of the event ring when doing a bactrace
773 \end{itemize}
774
775 \smallskip{}
776
777 The following command will enable debugging for the File Daemon, truncate an existing trace file,
778 and turn on timestamps when writing to the trace file.
779
780 \begin{verbatim}
781 * setdebug level=10 trace=1 options=ct fd
782 \end{verbatim}
783
784 \smallskip{}
785
786 It is now possible to use a \textsl{class} of debug messages called \texttt{tags}
787 to control the debug output of Bacula daemons.
788
789 \begin{itemize}
790 \item [all] Display all debug messages
791 \item [bvfs] Display BVFS debug messages
792 \item [sql] Display SQL related debug messages
793 \item [memory] Display memory and poolmem allocation messages
794 \item [scheduler] Display scheduler related debug messages
795 \end{itemize}
796
797 \begin{verbatim}
798 * setdebug level=10 tags=bvfs,sql,memory
799 * setdebug level=10 tags=!bvfs
800
801 # bacula-dir -t -d 200,bvfs,sql
802 \end{verbatim}
803
804 The \texttt{tags} option is composed of a list of tags. Tags are separated by
805 ``,'' or ``+'' or ``-'' or ``!''. To disable a specific tag, use ``-'' or ``!''
806 in front of the tag. Note that more tags are planned for future versions.
807
808 %\LTXtable{\linewidth}{table_debugtags}
809
810 \subsection{Communication Line Compression}
811 Bacula version 9.0.0 and later now includes communication
812 line compression. It is turned on by default, and if the
813 two Bacula components (Dir, FD, SD, bconsole) are both
814 version 6.6.0 or greater, communication line compression)
815 will be enabled, by default. If for some reason, you do not want
816 communication line compression, you may disable it with the
817 following directive:
818
819 \begin{verbatim}
820 Comm Compression = no
821 \end{verbatim}
822
823 This directive can appear in the following resources:
824 \begin{verbatim}
825 bacula-dir.conf: Director resource
826 bacula-fd.conf Client (or FileDaemon) resource
827 bacula-sd.conf: Storage resource
828 bconsole.conf: Console resource
829 bat.conf: Console resource
830 \end{verbatim}
831
832 \smallskip
833 In many cases, the volume of data transmitted across the
834 communications line can be reduced by a factor of three when
835 this directive is enabled (default) In the case that the compression is not
836 effective, Bacula turns it off on a.  record by record basis.
837
838 \smallskip
839 If you are backing up data that is already compressed the comm line
840 compression will not be effective, and you are likely
841 to end up with an average compression ratio that is very small.
842 In this case, Bacula reports {\bf None} in the Job report. 
843
844
845 \chapter{New Features in 7.4.0}
846 This chapter presents the new features that have been added to
847 the various versions of Bacula.
848
849 \section{New Features in 7.4.3}
850 \subsection{RunScripts}
851 There are two new RunScript short cut directives implemented in
852 the Director.  They are:
853
854 \begin{verbatim}
855 Job {
856   ...
857   ConsoleRunBeforeJob = "console-command"
858   ...
859 }
860 \end{verbatim}
861
862 \begin{verbatim}
863 Job {
864   ...
865   ConsoleRunAfterJob = "console-command"
866   ...
867 }
868 \end{verbatim}
869
870 As with other RunScript commands, you may have multiple copies
871 of either the {\bf ConsoleRunBeforeJob} or the {\bf ConsoleRunAfterJob}
872 in the same Job resource definition.
873 \smallskip
874 Please note that not all console commands are permitted, and that 
875 if you run a console command that requires a response, the results
876 are not determined (i.e. it will probably fail).
877
878
879
880 \section{New Features in 7.4.0}
881 \subsection{Verify Volume Data}
882
883 It is now possible to have a Verify Job configured with \texttt{level=Data} to
884 reread all records from a job and optionally check the size and the checksum
885 of all files.
886
887 \begin{verbatim}
888 # Verify Job definition
889 Job {
890   Name = VerifyData
891   Level = Data
892   Client = 127.0.0.1-fd     # Use local file daemon
893   FileSet = Dummy           # Will be adapted during the job
894   Storage = File            # Should be the right one
895   Messages = Standard
896   Pool = Default
897 }
898
899 # Backup Job definition
900 Job {
901   Name = MyBackupJob
902   Type = Backup
903   Client = windows1
904   FileSet = MyFileSet
905   Pool = 1Month
906   Storage = File
907 }
908
909 FileSet {
910   Name = MyFileSet
911   Include {
912     Options {
913       Verify = s5
914       Signature = MD5
915     }
916   File = /
917 }
918 \end{verbatim}
919
920 To run the Verify job, it is possible to use the ``jobid'' parameter of the ``run'' command.
921
922 \begin{verbatim}
923 *run job=VerifyData jobid=10
924 Run Verify Job
925 JobName:     VerifyData
926 Level:       Data
927 Client:      127.0.0.1-fd
928 FileSet:     Dummy
929 Pool:        Default (From Job resource)
930 Storage:     File (From Job resource)
931 Verify Job:  MyBackupJob.2015-11-11_09.41.55_03
932 Verify List: /opt/bacula/working/working/VerifyVol.bsr
933 When:        2015-11-11 09:47:38
934 Priority:    10
935 OK to run? (yes/mod/no): yes
936 Job queued. JobId=14
937
938 ...
939
940 11-Nov 09:46 my-dir JobId 13: Bacula 7.4.0 (13Nov15):
941   Build OS:               x86_64-unknown-linux-gnu archlinux
942   JobId:                  14
943   Job:                    VerifyData.2015-11-11_09.46.29_03
944   FileSet:                MyFileSet
945   Verify Level:           Data
946   Client:                 127.0.0.1-fd
947   Verify JobId:           10
948   Verify Job:q
949   Start time:             11-Nov-2015 09:46:31
950   End time:               11-Nov-2015 09:46:32
951   Files Expected:         1,116
952   Files Examined:         1,116
953   Non-fatal FD errors:    0
954   SD Errors:              0
955   FD termination status:  Verify differences
956   SD termination status:  OK
957   Termination:            Verify Differences
958 \end{verbatim}
959
960 The current Verify Data implementation requires specifying the correct Storage
961 resource in the Verify job. The Storage resource can be changed with the bconsole
962 command line and with the menu.
963
964 \subsection{Bconsole ``list jobs'' command options}
965
966 The \texttt{list jobs} bconsole command now accepts new command line options:
967
968 \begin{itemize}
969 \item \textbf{joberrors} Display jobs with JobErrors
970 \item \textbf{jobstatus=T} Display jobs with the specified status code
971 \item \textbf{client=cli} Display jobs for a specified client
972 \item \textbf{order=asc/desc} Change the output format of the job list. The
973   jobs are sorted by start time and JobId, the sort can use ascendant (asc) or
974   descendant (desc) (default) value.
975 \end{itemize}
976
977 \subsection{Minor Enhancements}
978
979 \subsubsection{New Bconsole "Tee All" Command}
980
981 The ``@tall'' command allows logging all input/output from a console session.
982
983 \begin{verbatim}
984 *@tall /tmp/log
985 *st dir
986 ...
987 \end{verbatim}
988
989 \subsection{Windows Encrypted File System (EFS) Support}
990
991 The Bacula Enterprise Windows File Daemon for the community version
992 7.4.0 now automatically supports files and
993 directories that are encrypted on Windows filesystem.
994
995 \subsection{SSL Connections to MySQL}
996
997 There are five new Directives for the Catalog resource in the
998 {\bf bacula-dir.conf} file that you can use to encrypt the 
999 communications between Bacula and MySQL for additional
1000 security.
1001
1002 \begin{description}
1003 \item [dbsslkey] takes a string variable that specifies the filename of an
1004 SSL key file.
1005 \item [dbsslcert] takes a string variable that specifies the filename of an
1006 SSL certificate file.
1007 \item [dbsslca] takes a string variable that specifies the filename of a
1008 SSL CA (certificate authority) certificate.
1009 \item [dbsslcipher] takes a string variable that specifies the cipher
1010 to be used.
1011 \end{description}
1012
1013 \subsection{Max Virtual Full Interval}
1014 This is a new Job resource directive that specifies the time in seconds
1015 that is a maximum time between Virtual Full jobs.  It is much like the
1016 Max Full Interval directive but applies to Virtual Full jobs rather
1017 that Full jobs.
1018
1019 \subsection{New List Volumes Output}
1020 The {\bf list} and {\bf llist} commands have been modified so that when
1021 listing Volumes a new pseudo field {\bf expiresin} will be printed. This 
1022 field is the number of seconds in which the retention period will expire. 
1023 If the retention period has already expired the value will be zero.  Any
1024 non-zero value means that the retention period is still in effect.
1025
1026 An example with many columns shorted for display purpose is:
1027
1028 \begin{verbatim}
1029 *list volumes
1030 Pool: Default
1031 *list volumes
1032 Pool: Default
1033 +----+---------------+-----------+---------+-------------+-----------+
1034 | id | volumename    | volstatus | enabled | volbytes    | expiresin |
1035 +----+---------------+-----------+---------+-------------+-----------+
1036 |  1 | TestVolume001 | Full      |       1 | 249,940,696 |         0 |
1037 |  2 | TestVolume002 | Full      |       1 | 249,961,704 |         1 |
1038 |  3 | TestVolume003 | Full      |       1 | 249,961,704 |         2 |
1039 |  4 | TestVolume004 | Append    |       1 | 127,367,896 |         3 |
1040 +----+---------------+-----------+---------+-------------+-----------+
1041 \end{verbatim}
1042
1043 %%
1044 %%
1045 \chapter{New Features in 7.2.0}
1046 This chapter presents the new features that have been added to
1047 the various versions of Bacula.
1048
1049 \section{New Features in 7.2.0}
1050
1051 \subsection{New Job Edit Codes \%E \%R}
1052 In various places such as RunScripts, you have now access to \%E to get the
1053 number of non-fatal errors for the current Job and \%R to get the number of
1054 bytes read from disk or from the network during a job.
1055
1056 \subsection{Enable/Disable commands}
1057 The \textbf{bconsole} \textbf{enable} and \textbf{disable} commands have
1058 been extended from enabling/disabling Jobs to include Clients, Schedule,
1059 and Storage devices.  Examples:
1060
1061 \begin{verbatim}
1062    disable Job=NightlyBackup Client=Windows-fd
1063 \end{verbatim}
1064
1065 will disable the Job named \textbf{NightlyBackup} as well as the
1066 client named \textbf{Windows-fd}.
1067
1068 \begin{verbatim}
1069    disable Storage=LTO-changer Drive=1
1070 \end{verbatim}
1071
1072 will disable the first drive in the autochanger named \textbf{LTO-changer}.
1073
1074 Please note that doing a \textbf{reload} command will set any values
1075 changed by the enable/disable commands back to the values in the
1076 bacula-dir.conf file.
1077
1078 The Client and Schedule resources in the bacula-dir.conf file now permit
1079 the directive Enable = yes or Enable = no.
1080
1081
1082 \section{Bacula 7.2}
1083
1084 \subsection{Snapshot Management}
1085
1086 Bacula 7.2 is now able to handle Snapshots on Linux/Unix
1087 systems. Snapshots can be automatically created and used to backup files. It is
1088 also possible to manage Snapshots from Bacula's \texttt{bconsole} tool through a
1089 unique interface.
1090
1091 \subsubsection{Snapshot Backends}
1092
1093 The following Snapshot backends are supported with Bacula Enterprise 8.2:
1094
1095 \begin{itemize}
1096 \item BTRFS
1097 \item ZFS
1098 \item LVM\footnote{Some restrictions described in \vref{LVMBackend} applies to
1099     the LVM backend}
1100 \end{itemize}
1101
1102 By default, Snapshots are mounted (or directly available) under
1103 \textbf{.snapshots} directory on the root filesystem. (On ZFS, the default
1104 is \textbf{.zfs/snapshots}).
1105
1106 \smallskip{}
1107
1108 The Snapshot backend program is called \textbf{bsnapshot} and is available in
1109 the \textbf{bacula-enterprise-snapshot} package. In order to use the Snapshot
1110 Management feature, the package must be installed on the Client.
1111
1112 \smallskip{}
1113 \label{bsnapshotconf}
1114 The \textbf{bsnapshot} program can be configured using
1115 \texttt{/opt/bacula/etc/bsnapshot.conf} file. The following parameters can
1116 be adjusted in the configuration file:
1117
1118 \begin{itemize}
1119 \item \texttt{trace=<file>} Specify a trace file
1120 \item \texttt{debug=<num>} Specify a debug level
1121 \item \texttt{sudo=<yes/no>} Use sudo to run commands
1122 \item \texttt{disabled=<yes/no>} Disable snapshot support
1123 \item \texttt{retry=<num>} Configure the number of retries for some operations
1124 \item \texttt{snapshot\_dir=<dirname>} Use a custom name for the Snapshot directory. (\textbf{.SNAPSHOT}, \textbf{.snapdir}, etc...)
1125 \item \texttt{lvm\_snapshot\_size=<lvpath:size>} Specify a custom snapshot size for a given LVM volume
1126 \end{itemize}
1127
1128 \begin{verbatim}
1129 # cat /opt/bacula/etc/bsnapshot.conf
1130 trace=/tmp/snap.log
1131 debug=10
1132 lvm_snapshot_size=/dev/ubuntu-vg/root:5%
1133 \end{verbatim}
1134
1135
1136 \subsubsection{Application Quiescing}
1137
1138 When using Snapshots, it is very important to quiesce applications that are
1139 running on the system. The simplest way to quiesce an application is to stop
1140 it. Usually, taking the Snapshot is very fast, and the downtime is only about a
1141 couple of seconds. If downtime is not possible and/or the application provides
1142 a way to quiesce, a more advanced script can be used. An example is
1143 described on \vref{SnapRunScriptExample}.
1144
1145 \subsubsection{New Director Directives}
1146
1147 The use of the Snapshot Engine on the FileDaemon is determined by the
1148 new \textbf{Enable Snapshot} FileSet directive. The default is \textbf{no}.
1149
1150 \begin{verbatim}
1151 FileSet {
1152   Name = LinuxHome
1153
1154   Enable Snapshot = yes
1155
1156   Include {
1157     Options = { Compression = LZO }
1158     File = /home
1159   }
1160 }
1161 \end{verbatim}
1162
1163 By default, Snapshots are deleted from the Client at the end of the backup.  To
1164 keep Snapshots on the Client and record them in the Catalog for a determined
1165 period, it is possible to use the \textbf{Snapshot Retention} directive in the
1166 Client or in the Job resource. The default value is 0 secconds. If, for a given Job,
1167 both Client and Job \textbf{Snapshot Retention} directives are set, the Job
1168 directive will be used.
1169
1170 \begin{verbatim}
1171 Client {
1172    Name = linux1
1173    ...
1174
1175    Snapshot Retention = 5 days
1176 }
1177 \end{verbatim}
1178
1179 To automatically prune Snapshots, it is possible to use the following RunScript
1180 command:
1181
1182 \begin{verbatim}
1183 Job {
1184    ...
1185    Client = linux1
1186    ...
1187    RunScript {
1188       RunsOnClient = no
1189       Console = "prune snapshot client=%c yes"
1190       RunsAfter = yes
1191    }
1192 }
1193 \end{verbatim}
1194
1195
1196 \smallskip{}
1197
1198 In RunScripts, the \texttt{AfterSnapshot} keyword for the \texttt{RunsWhen} directive will
1199 allow a command to be run just after the Snapshot creation.  \texttt{AfterSnapshot} is a
1200 synonym for the \texttt{AfterVSS} keyword.
1201
1202 \label{SnapRunScriptExample}
1203 \begin{verbatim}
1204 Job {
1205  ...
1206   RunScript {
1207     Command = "/etc/init.d/mysql start"
1208     RunsWhen = AfterSnapshot
1209     RunsOnClient = yes
1210   }
1211   RunScript {
1212     Command = "/etc/init.d/mysql stop"
1213     RunsWhen = Before
1214     RunsOnClient = yes
1215   }
1216 }
1217 \end{verbatim}
1218
1219 \subsubsection{Job Output Information}
1220
1221 Information about Snapshots are displayed in the Job output. The list of all
1222 devices used by the Snapshot Engine is displayed, and the Job summary
1223 indicates if Snapshots were available.
1224
1225 \begin{verbatim}
1226 JobId 3:    Create Snapshot of /home/build
1227 JobId 3:    Create Snapshot of /home/build/subvol
1228 JobId 3:    Delete snapshot of /home/build
1229 JobId 3:    Delete snapshot of /home/build/subvol
1230 ...
1231 JobId 3: Bacula 127.0.0.1-dir 7.2.0 (23Jul15):
1232   Build OS:               x86_64-unknown-linux-gnu archlinux 
1233   JobId:                  3
1234   Job:                    Incremental.2015-02-24_11.20.27_08
1235   Backup Level:           Full
1236 ...
1237   Snapshot/VSS:           yes
1238 ...
1239   Termination:            Backup OK
1240 \end{verbatim}
1241
1242
1243 \subsubsection{New ``snapshot'' Bconsole Commands}
1244
1245 The new \textbf{snapshot} command will display by default the following menu:
1246 \begin{verbatim}
1247 *snapshot
1248 Snapshot choice:
1249      1: List snapshots in Catalog
1250      2: List snapshots on Client
1251      3: Prune snapshots
1252      4: Delete snapshot
1253      5: Update snapshot parameters
1254      6: Update catalog with Client snapshots
1255      7: Done
1256 Select action to perform on Snapshot Engine (1-7):
1257 \end{verbatim}
1258
1259 The \textbf{snapshot} command can also have the following parameters:
1260 \begin{verbatim}
1261 [client=<client-name> | job=<job-name> | jobid=<jobid>]
1262  [delete | list | listclient | prune | sync | update]
1263 \end{verbatim}
1264
1265 It is also possible to use traditional \texttt{list}, \texttt{llist},
1266 \texttt{update}, \texttt{prune} or \texttt{delete} commands on Snapshots.
1267
1268 \begin{verbatim}
1269 *llist snapshot jobid=5
1270  snapshotid: 1
1271        name: NightlySave.2015-02-24_12.01.00_04
1272  createdate: 2015-02-24 12:01:03
1273      client: 127.0.0.1-fd
1274     fileset: Full Set
1275       jobid: 5
1276      volume: /home/.snapshots/NightlySave.2015-02-24_12.01.00_04
1277      device: /home/btrfs
1278        type: btrfs
1279   retention: 30
1280     comment:
1281 \end{verbatim}
1282
1283 \begin{verbatim}
1284 * snapshot listclient
1285 Automatically selected Client: 127.0.0.1-fd
1286 Connecting to Client 127.0.0.1-fd at 127.0.0.1:8102
1287 Snapshot      NightlySave.2015-02-24_12.01.00_04:
1288   Volume:     /home/.snapshots/NightlySave.2015-02-24_12.01.00_04
1289   Device:     /home
1290   CreateDate: 2015-02-24 12:01:03
1291   Type:       btrfs
1292   Status:     OK
1293   Error:
1294 \end{verbatim}
1295
1296 \smallskip{}
1297
1298 With the \textsl{Update catalog with Client snapshots} option (or
1299 \textbf{snapshot sync}), the Director contacts the FileDaemon, lists snapshots
1300 of the system and creates catalog records of the Snapshots.
1301
1302 \begin{verbatim}
1303 *snapshot sync
1304 Automatically selected Client: 127.0.0.1-fd
1305 Connecting to Client 127.0.0.1-fd at 127.0.0.1:8102
1306 Snapshot      NightlySave.2015-02-24_12.35.47_06:
1307   Volume:     /home/.snapshots/NightlySave.2015-02-24_12.35.47_06
1308   Device:     /home
1309   CreateDate: 2015-02-24 12:35:47
1310   Type:       btrfs
1311   Status:     OK
1312   Error:
1313 Snapshot added in Catalog
1314
1315 *llist snapshot
1316  snapshotid: 13
1317        name: NightlySave.2015-02-24_12.35.47_06
1318  createdate: 2015-02-24 12:35:47
1319      client: 127.0.0.1-fd
1320     fileset:
1321       jobid: 0
1322      volume: /home/.snapshots/NightlySave.2015-02-24_12.35.47_06
1323      device: /home
1324        type: btrfs
1325   retention: 0
1326     comment: 
1327 \end{verbatim}
1328
1329 % list
1330 % llist
1331 % prune
1332 % delete
1333 % update snapshot
1334 % sync
1335
1336 \subsubsection{LVM Backend Restrictions}
1337 \label{LVMBackend}
1338
1339 LVM Snapshots are quite primitive compared to ZFS, BTRFS, NetApp and other
1340 systems. For example, it is not possible to use Snapshots if the Volume Group
1341 (VG) is full. The administrator must keep some free space in the VG
1342 to create Snapshots. The amount of free space required depends on the activity of the
1343 Logical Volume (LV). \textbf{bsnapshot} uses 10\% of the LV by
1344 default. This number can be configured per LV in the
1345 \textbf{bsnapshot.conf} file.
1346
1347 \begin{verbatim}
1348 [root@system1]# vgdisplay
1349   --- Volume group ---
1350   VG Name               vg_ssd
1351   System ID
1352   Format                lvm2
1353 ...
1354   VG Size               29,81 GiB
1355   PE Size               4,00 MiB
1356   Total PE              7632
1357   Alloc PE / Size       125 / 500,00 MiB
1358   Free  PE / Size       7507 / 29,32 GiB
1359 ...
1360 \end{verbatim}
1361
1362 It is also not advisable to leave snapshots on the LVM backend. Having multiple
1363 snapshots of the same LV on LVM will slow down the system.
1364
1365 \subsubsection{Debug Options}
1366
1367 To get low level information about the Snapshot Engine, the debug tag ``snapshot''
1368 should be used in the \textbf{setdebug} command.
1369
1370 \begin{verbatim}
1371 * setdebug level=10 tags=snapshot client
1372 * setdebug level=10 tags=snapshot dir
1373 \end{verbatim}
1374
1375 \subsection{Minor Enhancements}
1376 \subsubsection{Storage Daemon Reports Disk Usage}
1377
1378 The \texttt{status storage} command now  reports the space available on disk devices:
1379 \begin{verbatim}
1380 ...
1381 Device status:
1382
1383 Device file: "FileStorage" (/bacula/arch1) is not open.
1384     Available Space=5.762 GB
1385 ==
1386
1387 Device file: "FileStorage1" (/bacula/arch2) is not open.
1388     Available Space=5.862 GB
1389 \end{verbatim}
1390
1391 \subsection{Data Encryption Cipher Configuration}
1392 Bacula Enterprise version 8.0 and later now allows configuration of the data
1393 encryption cipher and the digest algorithm. Previously, the cipher was forced to AES 128,
1394 but it is now possible to choose between the following ciphers:
1395
1396 \begin{itemize}
1397 \item AES128 (default)
1398 \item AES192
1399 \item AES256
1400 \item blowfish
1401 \end{itemize}
1402
1403 The digest algorithm was set to SHA1 or SHA256 depending on the local OpenSSL
1404 options. We advise you to not modify the PkiDigest default setting. Please,
1405 refer to the OpenSSL documentation to understand the pros and cons regarding these options.
1406
1407 \begin{verbatim}
1408   FileDaemon {
1409     ...
1410     PkiCipher = AES256
1411   }
1412 \end{verbatim}
1413
1414 \subsubsection*{New Option Letter ``M'' for Accurate Directive in FileSet}
1415
1416 % waa - 20150317 - is 8.0.5 correct here?
1417 Added in version 8.0.5, the new ``M'' option letter for the Accurate directive
1418 in the FileSet Options block, which allows comparing the modification time and/or
1419 creation time against the last backup timestamp. This is in contrast to the
1420 existing options letters ``m'' and/or ``c'', mtime and ctime, which are checked
1421 against the stored catalog values, which can vary accross different machines
1422 when using the BaseJob feature.
1423
1424 The advantage of the new ``M'' option letter for Jobs that refer to BaseJobs is
1425 that it will instruct Bacula to backup files based on the last backup time, which
1426 is more useful because the mtime/ctime timestamps may differ on various Clients,
1427 causing files to be needlessly backed up.
1428
1429 \smallskip{}
1430
1431 \begin{verbatim}
1432   Job {
1433     Name = USR
1434     Level = Base
1435     FileSet = BaseFS
1436 ...
1437   }
1438
1439   Job {
1440     Name = Full
1441     FileSet = FullFS
1442     Base = USR
1443 ...
1444   }
1445
1446   FileSet {
1447     Name = BaseFS
1448     Include {
1449       Options {
1450         Signature = MD5
1451       }
1452       File = /usr
1453     }
1454   }
1455
1456   FileSet {
1457     Name = FullFS
1458     Include {
1459       Options {
1460         Accurate = Ms      # check for mtime/ctime of last backup timestamp and Size
1461         Signature = MD5
1462       }
1463       File = /home
1464       File = /usr
1465     }
1466   }
1467 \end{verbatim}
1468
1469 \subsection{Read Only Storage Devices}
1470 This version of Bacula allows you to define a Storage deamon device
1471 to be read-only. If the {\bf Read Only} directive is specified and
1472 enabled, the drive can only be used for read operations.
1473 The {\bf Read Only} directive can be defined in any bacula-sd.conf
1474 Device resource, and is most useful for reserving one or more
1475 drives for restores. An example is:
1476
1477 \begin{verbatim}
1478 Read Only = yes
1479 \end{verbatim}
1480
1481 \subsection{New Resume Command}
1482 The new \texttt{resume} command does exactly the same thing as a
1483 {\bf restart} command, but for some users the
1484 name may be more logical because in general the
1485 {\bf restart} command is used to resume running
1486 a Job that was incomplete.
1487
1488 \subsection{New Prune ``Expired'' Volume Command}
1489 In Bacula Enterprise 6.4, it is now possible to prune all volumes
1490 (from a pool, or globally) that are ``expired''.  This option can be
1491 scheduled after or before the backup of the catalog and can be
1492 combined with the \texttt{Truncate On Purge} option.  The \texttt{prune expired volme} command may
1493 be used instead of the \texttt{manual\_prune.pl} script.
1494
1495 \begin{verbatim}
1496 * prune expired volume
1497
1498 * prune expired volume pool=FullPool
1499 \end{verbatim}
1500
1501 To schedule this option automatically, it can be added to the Catalog backup job
1502 definition.
1503
1504 \begin{verbatim}
1505  Job {
1506    Name = CatalogBackup
1507    ...
1508    RunScript {
1509      Console = "prune expired volume yes"
1510      RunsWhen = Before
1511    }
1512  }
1513 \end{verbatim}
1514
1515
1516 \subsection{New Job Edit Codes \%P \%C}
1517 In various places such as RunScripts, you have now access to \%P to get the
1518 current Bacula process ID (PID) and \%C to know if the current job is a
1519 cloned job.
1520
1521 \subsection{Enhanced Status and Error Messages}
1522 We have enhanced the Storage daemon status output to be more
1523 readable. This is important when there are a large number of
1524 devices. In addition to formatting changes, it also includes more
1525 details on which devices are reading and writing.
1526
1527 A number of error messages have been enhanced to have more specific
1528 data on what went wrong.
1529
1530 If a file changes size while being backed up the old and new size
1531 are reported.
1532
1533 \subsection{Miscellaneous New Features}
1534 \begin{itemize}
1535 \item Allow unlimited line lengths in .conf files (previously limited
1536 to 2000 characters).
1537
1538 \item Allow /dev/null in ChangerCommand to indicated a Virtual Autochanger.
1539
1540 \item Add a --fileprune option to the manual\_prune.pl script.
1541
1542 \item Add a -m option to make\_catalog\_backup.pl to do maintenance
1543 on the catalog.
1544
1545 \item Safer code that cleans up the working directory when starting
1546 the daemons. It limits what files can be deleted, hence enhances 
1547 security.
1548
1549 \item Added a new .ls command in bconsole to permit browsing a client's
1550 filesystem.
1551
1552 \item Fixed a number of bugs, includes some obscure seg faults, and a
1553 race condition that occurred infrequently when running Copy, Migration,
1554 or Virtual Full backups.
1555
1556 \item Upgraded to a newer version of Qt4 for bat. All indications
1557 are that this will improve bat's stability on Windows machines.
1558
1559 \item The Windows installers now detect and refuse to install on
1560 an OS that does not match the 32/64 bit value of the installer.
1561 \end{itemize}
1562
1563 \subsection{FD Storage Address}
1564
1565 When the Director is behind a NAT, in a WAN area, to connect to
1566 % the FileDaemon or
1567 the StorageDaemon, the Director uses an ``external'' ip address,
1568 and the FileDaemon should use an ``internal'' IP address to contact the
1569 StorageDaemon.
1570
1571 The normal way to handle this situation is to use a canonical name such as
1572 ``storage-server'' that will be resolved on the Director side as the WAN
1573 address and on the Client side as the LAN address. This is now possible to
1574 configure this parameter using the new directive \texttt{FDStorageAddress} in
1575 the Storage or Client resource.
1576
1577
1578 %%\bsysimageH{BackupOverWan1}{Backup Over WAN}{figbs6:fdstorageaddress}
1579 %  \label{fig:fdstorageaddress}
1580
1581 \begin{verbatim}
1582 Storage {
1583      Name = storage1
1584      Address = 65.1.1.1
1585      FD Storage Address = 10.0.0.1
1586      SD Port = 9103
1587      ...
1588 }
1589 \end{verbatim}
1590
1591 % # or in the Client resouce
1592 %
1593
1594 \begin{verbatim}
1595  Client {
1596       Name = client1
1597       Address = 65.1.1.2
1598       FD Storage Address = 10.0.0.1
1599       FD Port = 9102
1600       ...
1601  }
1602 \end{verbatim}
1603
1604 Note that using the Client \texttt{FDStorageAddress} directive will not allow
1605 to use multiple Storage Daemon, all Backup or Restore requests will be sent to
1606 the specified \texttt{FDStorageAddress}.
1607
1608 \subsection{Maximum Concurrent Read Jobs}
1609 This is a new directive that can be used in the {\bf bacula-dir.conf} file
1610 in the Storage resource.  The main purpose is to limit the number
1611 of concurrent Copy, Migration, and VirtualFull jobs so that
1612 they don't monopolize all the Storage drives causing a deadlock situation
1613 where all the drives are allocated for reading but none remain for
1614 writing.  This deadlock situation can occur when running multiple
1615 simultaneous Copy, Migration, and VirtualFull jobs.
1616
1617 \smallskip
1618 The default value is set to 0 (zero), which means there is no
1619 limit on the number of read jobs.  Note, limiting the read jobs
1620 does not apply to Restore jobs, which are normally started by
1621 hand.  A reasonable value for this directive is one half the number
1622 of drives that the Storage resource has rounded down.  Doing so,
1623 will leave the same number of drives for writing and will generally
1624 avoid over committing drives and a deadlock.
1625
1626 \subsection{Incomplete Jobs}
1627 During a backup, if the Storage daemon experiences disconnection
1628 with the File daemon during backup (normally a comm line problem
1629 or possibly an FD failure), under conditions that the SD determines
1630 to be safe it will make the failed job as Incomplete rather than
1631 failed.  This is done only if there is sufficient valid backup
1632 data that was written to the Volume. The advantage of an Incomplete
1633 job is that it can be restarted by the new bconsole {\bf restart}
1634 command from the point where it left off rather than from the
1635 beginning of the jobs as is the case with a cancel.
1636
1637 \subsection{The Stop Command}
1638 Bacula has been enhanced to provide a {\bf stop} command,
1639 very similar to the {\bf cancel} command with the main difference
1640 that the Job that is stopped is marked as Incomplete so that
1641 it can be restarted later by the {\bf restart} command where
1642 it left off (see below).  The {\bf stop} command with no
1643 arguments, will like the cancel command, prompt you with the
1644 list of running jobs allowing you to select one, which might
1645 look like the following:
1646
1647 \begin{verbatim}
1648 *stop
1649 Select Job:
1650      1: JobId=3 Job=Incremental.2012-03-26_12.04.26_07
1651      2: JobId=4 Job=Incremental.2012-03-26_12.04.30_08
1652      3: JobId=5 Job=Incremental.2012-03-26_12.04.36_09
1653 Choose Job to stop (1-3): 2
1654 2001 Job "Incremental.2012-03-26_12.04.30_08" marked to be stopped.
1655 3000 JobId=4 Job="Incremental.2012-03-26_12.04.30_08" marked to be stopped.
1656 \end{verbatim}
1657
1658 \subsection{The Restart Command}
1659 The new {\bf Restart command} allows console users to restart
1660 a canceled, failed, or incomplete Job.  For canceled and failed
1661 Jobs, the Job will restart from the beginning.  For incomplete
1662 Jobs the Job will restart at the point that it was stopped either
1663 by a stop command or by some recoverable failure.
1664
1665 \smallskip
1666 If you enter the {\bf restart} command in bconsole, you will get the
1667 following prompts:
1668
1669 \begin{verbatim}
1670 *restart
1671 You have the following choices:
1672      1: Incomplete
1673      2: Canceled
1674      3: Failed
1675      4: All
1676 Select termination code:  (1-4):
1677 \end{verbatim}
1678
1679 If you select the {\bf All} option, you may see something like:
1680
1681 \begin{verbatim}
1682 Select termination code:  (1-4): 4
1683 +-------+-------------+---------------------+------+-------+----------+-----------+-----------+
1684 | jobid | name        | starttime           | type | level | jobfiles |
1685 jobbytes  | jobstatus |
1686 +-------+-------------+---------------------+------+-------+----------+-----------+-----------+
1687 |     1 | Incremental | 2012-03-26 12:15:21 | B    | F     |        0 |
1688     0 | A         |
1689 |     2 | Incremental | 2012-03-26 12:18:14 | B    | F     |      350 |
1690 4,013,397 | I         |
1691 |     3 | Incremental | 2012-03-26 12:18:30 | B    | F     |        0 |
1692     0 | A         |
1693 |     4 | Incremental | 2012-03-26 12:18:38 | B    | F     |      331 |
1694 3,548,058 | I         |
1695 +-------+-------------+---------------------+------+-------+----------+-----------+-----------+
1696 Enter the JobId list to select:
1697 \end{verbatim}
1698
1699 Then you may enter one or more JobIds to be restarted, which may
1700 take the form of a list of JobIds separated by commas, and/or JobId
1701 ranges such as {\bf 1-4}, which indicates you want to restart JobIds
1702 1 through 4, inclusive.
1703
1704 \subsection{Job Bandwidth Limitation}
1705
1706 The new {\bf Job Bandwidth Limitation} directive may be added to the File
1707 daemon's and/or Director's configuration to limit the bandwidth used by a
1708 Job on a Client.  It can be set in the File daemon's conf file for all Jobs
1709 run in that File daemon, or it can be set for each Job in the Director's
1710 conf file. The speed is always specified in bytes per second.
1711
1712 For example:
1713 \begin{verbatim}
1714 FileDaemon {
1715   Name = localhost-fd
1716   Working Directory = /some/path
1717   Pid Directory = /some/path
1718   ...
1719   Maximum Bandwidth Per Job = 5Mb/s
1720 }
1721 \end{verbatim}
1722
1723 The above example would cause any jobs running with the FileDaemon to not
1724 exceed 5 megabytes per second of throughput when sending data to the
1725 Storage Daemon. Note, the speed is always specified in bytes per second
1726 (not in bits per second), and the case (upper/lower) of the specification
1727 characters is ignored (i.e. 1MB/s = 1Mb/s).
1728
1729 You may specify the following speed parameter modifiers:
1730    k/s (1,000 bytes per second), kb/s (1,024 bytes per second),
1731    m/s (1,000,000 bytes per second), or mb/s (1,048,576 bytes per second).
1732
1733 For example:
1734 \begin{verbatim}
1735 Job {
1736   Name = locahost-data
1737   FileSet = FS_localhost
1738   Accurate = yes
1739   ...
1740   Maximum Bandwidth = 5Mb/s
1741   ...
1742 }
1743 \end{verbatim}
1744
1745 The above example would cause Job \texttt{localhost-data} to not exceed 5MB/s
1746 of throughput when sending data from the File daemon to the Storage daemon.
1747
1748 A new console command \texttt{setbandwidth} permits to set dynamically the
1749 maximum throughput of a running Job or for future jobs of a Client.
1750
1751 \begin{verbatim}
1752 * setbandwidth limit=1000 jobid=10
1753 \end{verbatim}
1754
1755 Please note that the value specified for the \texttt{limit} command
1756 line parameter is always in units of 1024 bytes (i.e. the number
1757 is multiplied by 1024 to give the number of bytes per second).  As 
1758 a consequence, the above limit of 1000 will be interpreted as a
1759 limit of 1000 * 1024 = 1,024,000 bytes per second.
1760
1761 \subsection{Always Backup a File}
1762
1763 When the Accurate mode is turned on, you can decide to always backup a file
1764 by using then new {\bf A} Accurate option in your FileSet. For example:
1765
1766 \begin{verbatim}
1767 Job {
1768    Name = ...
1769    FileSet = FS_Example
1770    Accurate = yes
1771    ...
1772 }
1773
1774 FileSet {
1775  Name = FS_Example
1776  Include {
1777    Options {
1778      Accurate = A
1779    }
1780    File = /file
1781    File = /file2
1782  }
1783  ...
1784 }
1785 \end{verbatim}
1786
1787 This project was funded by Bacula Systems based on an idea of James Harper and
1788 is available with the Bacula Enterprise Edition.
1789
1790 \subsection{Setting Accurate Mode at Runtime}
1791
1792 You are now able to specify the Accurate mode on the \texttt{run} command and
1793 in the Schedule resource.
1794
1795 \begin{verbatim}
1796 * run accurate=yes job=Test
1797 \end{verbatim}
1798
1799 \begin{verbatim}
1800 Schedule {
1801   Name = WeeklyCycle
1802   Run = Full 1st sun at 23:05
1803   Run = Differential accurate=yes 2nd-5th sun at 23:05
1804   Run = Incremental  accurate=no  mon-sat at 23:05
1805 }
1806 \end{verbatim}
1807
1808 It can allow you to save memory and and CPU resources on the catalog server in
1809 some cases.
1810
1811 \medskip
1812 These advanced tuning options are available with the Bacula Enterprise Edition.
1813
1814 % Common with community
1815 \subsection{Additions to RunScript variables}
1816 You can have access to JobBytes, JobFiles and Director name using \%b, \%F and \%D
1817 in your runscript command. The Client address is now available through \%h.
1818
1819 \begin{verbatim}
1820 RunAfterJob = "/bin/echo Job=%j JobBytes=%b JobFiles=%F ClientAddress=%h Dir=%D"
1821 \end{verbatim}
1822
1823 \subsection{LZO Compression}
1824
1825 LZO compression was added in the Unix File Daemon. From the user point of view,
1826 it works like the GZIP compression (just replace {\bf compression=GZIP} with
1827 {\bf compression=LZO}).
1828
1829 For example:
1830 \begin{verbatim}
1831 Include {
1832    Options { compression=LZO }
1833    File = /home
1834    File = /data
1835 }
1836 \end{verbatim}
1837
1838 LZO provides much faster compression and decompression speed but lower
1839 compression ratio than GZIP. It is a good option when you backup to disk. For
1840 tape, the built-in compression may be a better option.
1841
1842 LZO is a good alternative for GZIP1 when you don't want to slow down your
1843 backup. On a modern CPU it should be able to run almost as fast as:
1844
1845 \begin{itemize}
1846 \item your client can read data from disk. Unless you have very fast disks like
1847   SSD or large/fast RAID array.
1848 \item the data transfers between the file daemon and the storage daemon even on
1849   a 1Gb/s link.
1850 \end{itemize}
1851
1852 Note that bacula only use one compression level LZO1X-1.
1853
1854 \medskip
1855 The code for this feature was contributed by Laurent Papier.
1856
1857 \subsection{Purge Migration Job}
1858
1859 The new {\bf Purge Migration Job} directive may be added to the Migration
1860 Job definition in the Director's configuration file. When it is enabled
1861 the Job that was migrated during a migration will be purged at
1862 the end of the migration job.
1863
1864 For example:
1865 \begin{verbatim}
1866 Job {
1867   Name = "migrate-job"
1868   Type = Migrate
1869   Level = Full
1870   Client = localhost-fd
1871   FileSet = "Full Set"
1872   Messages = Standard
1873   Storage = DiskChanger
1874   Pool = Default
1875   Selection Type = Job
1876   Selection Pattern = ".*Save"
1877 ...
1878   Purge Migration Job = yes
1879 }
1880 \end{verbatim}
1881
1882 \medskip
1883
1884 This project was submitted by Dunlap Blake; testing and documentation was funded
1885 by Bacula Systems.
1886
1887 \subsection{Changes in the Pruning Algorithm}
1888
1889 We rewrote the job pruning algorithm in this version.  Previously, in some
1890 users reported that the pruning process at the end of jobs was very long.
1891 It should not be longer the case.  Now, Bacula won't prune automatically a
1892 Job if this particular Job is needed to restore data.  Example:
1893
1894 \begin{verbatim}
1895 JobId: 1  Level: Full
1896 JobId: 2  Level: Incremental
1897 JobId: 3  Level: Incremental
1898 JobId: 4  Level: Differential
1899 .. Other incrementals up to now
1900 \end{verbatim}
1901
1902 In this example, if the Job Retention defined in the Pool or in the Client
1903 resource causes that Jobs with Jobid in 1,2,3,4 can be pruned, Bacula will
1904 detect that JobId 1 and 4 are essential to restore data at the current state
1905 and will prune only JobId 2 and 3.
1906
1907 \texttt{Important}, this change affect only the automatic pruning step
1908 after a Job and the \texttt{prune jobs} Bconsole command.  If a volume
1909 expires after the \texttt{VolumeRetention} period, important jobs can be
1910 pruned.
1911
1912 \subsection{Ability to Verify any specified Job}
1913 You now have the ability to tell Bacula which Job should verify instead of
1914 automatically verify just the last one.
1915
1916 This feature can be used with VolumeToCatalog, DiskToCatalog and Catalog level.
1917
1918 To verify a given job, just specify the Job jobid in argument when starting the
1919 job.
1920 \begin{verbatim}
1921 *run job=VerifyVolume jobid=1 level=VolumeToCatalog
1922 Run Verify job
1923 JobName:     VerifyVolume
1924 Level:       VolumeToCatalog
1925 Client:      127.0.0.1-fd
1926 FileSet:     Full Set
1927 Pool:        Default (From Job resource)
1928 Storage:     File (From Job resource)
1929 Verify Job:  VerifyVol.2010-09-08_14.17.17_03
1930 Verify List: /tmp/regress/working/VerifyVol.bsr
1931 When:        2010-09-08 14:17:31
1932 Priority:    10
1933 OK to run? (yes/mod/no):
1934 \end{verbatim}
1935
1936
1937
1938 \chapter{New Features in 7.0.0}
1939 This chapter presents the new features that have been added to
1940 the various versions of Bacula.
1941
1942 \section{New Features in 7.0.0}
1943
1944 \subsection{Storage daemon to Storage daemon}
1945 Bacula version 7.0 permits SD to SD transfer of Copy and Migration
1946 Jobs. This permits what is commonly referred to as replication or
1947 off-site transfer of Bacula backups.  It occurs automatically, if
1948 the source SD and destination SD of a Copy or Migration job are
1949 different. The following picture shows how this works.
1950
1951 \includegraphics[width=0.8\linewidth]{sd-to-sd}
1952
1953 \subsection{SD Calls Client}
1954 If the {\bf SD Calls Client} directive is set to true in a Client resource
1955 any Backup, Restore, Verify, Copy, or Migration Job where the client
1956 is involved, the client will wait for the Storage daemon to contact it.
1957 By default this directive is set to false, and the Client will call
1958 the Storage daemon.  This directive can be useful if your Storage daemon
1959 is behind a firewall that permits outgoing connections but not incoming
1960 one. The following picture shows the communications connection paths in
1961 both cases.
1962
1963 \includegraphics[width=0.8\linewidth]{sd-calls-client}
1964
1965 \subsection{Next Pool}
1966 In previous versions of Bacula the Next Pool directive could be
1967 specified in the Pool resource for use with Migration and Copy Jobs.
1968 The Next Pool concept has been 
1969 extended in Bacula version 7.0.0 to allow you to specify the 
1970 Next Pool directive in the Job resource as well. If specified in
1971 the Job resource, it will override any value specified in the Pool
1972 resource.
1973
1974 In addition to being permitted in the Job resource, the 
1975 {\bf nextpool=xxx} specification can be specified as a run
1976 override in the {\bf run} directive of a Schedule resource.
1977 Any {\bf nextpool} specification in a {\bf run}
1978 directive will override any other specification in either
1979 the Job or the Pool. 
1980
1981 In general, more information is displayed in the Job log
1982 on exactly which Next Pool specification is ultimately used.
1983
1984 \subsection{status storage}
1985 The bconsole {\bf status storage} has been modified to attempt to eliminate
1986 duplicate storage resources and only show one that references any given
1987 storage daemon.  This might be confusing at first, but tends to make a
1988 much more compact list of storage resource from which to select if there
1989 are multiple storage devices in the same storage daemon.
1990
1991 If you want the old behavior (always display all storage resources) simply 
1992 add the keyword {\bf select} to the command -- i.e. use
1993 {\bf status select storage}.
1994
1995
1996
1997
1998
1999 \subsection{status schedule}
2000 A new status command option called {\bf scheduled} has been implemented
2001 in bconsole. By default it will display 20 lines of the next scheduled
2002 jobs.  For example, with the default bacula-dir.conf configuration file,
2003 a bconsole command {\bf status scheduled} produces:
2004
2005 \begin{verbatim}
2006 Scheduled Jobs:
2007 Level        Type   Pri  Scheduled        Job Name     Schedule
2008 ======================================================================
2009 Differential Backup 10  Sun 30-Mar 23:05 BackupClient1 WeeklyCycle
2010 Incremental  Backup 10  Mon 24-Mar 23:05 BackupClient1 WeeklyCycle
2011 Incremental  Backup 10  Tue 25-Mar 23:05 BackupClient1 WeeklyCycle
2012 ...
2013 Full         Backup 11  Mon 24-Mar 23:10 BackupCatalog WeeklyCycleAfterBackup
2014 Full         Backup 11  Wed 26-Mar 23:10 BackupCatalog WeeklyCycleAfterBackup
2015 ...
2016 ====
2017 \end{verbatim}
2018
2019 Note, the output is listed by the Jobs found, and is not sorted
2020 chronologically.
2021
2022 \smallskip
2023 This command has a number of options, most of which act as filters:
2024 \begin{itemize}
2025 \item {\bf days=nn} This specifies the number of days to list. The default is
2026   10 but can be set from 0 to 500.
2027 \item {\bf limit=nn} This specifies the limit to the number of lines to print.
2028   The default is 100 but can be any number in the range 0 to 2000.
2029 \item {\bf time="YYYY-MM-DD HH:MM:SS"} Sets the start time for listing the
2030   scheduled jobs. The default is to use the current time. Note, the
2031   time value must be specified inside double quotes and must be in
2032   the exact form shown above.
2033 \item {\bf schedule=schedule-name} This option restricts the output to
2034   the named schedule.
2035 \item {\bf job=job-name} This option restricts the output to the specified
2036   Job name.
2037 \end{itemize}
2038
2039 \subsection{Data Encryption Cipher Configuration}
2040 Bacula version 7.0 and later now allows to configure the data
2041 encryption cipher and the digest algorithm. The cipher was forced to AES
2042 128, and it is now possible to choose between the following ciphers:
2043
2044 \begin{itemize}
2045 \item AES128 (default)
2046 \item AES192
2047 \item AES256
2048 \item blowfish
2049 \end{itemize}
2050
2051 The digest algorithm was set to SHA1 or SHA256 depending on the local
2052 OpenSSL
2053 options. We advise you to not modify the PkiDigest default setting. Please,
2054 refer to OpenSSL documentation to know about pro and cons on these options.
2055
2056 \begin{verbatim}
2057   FileDaemon {
2058     ...
2059     PkiCipher = AES256
2060   }
2061 \end{verbatim}
2062
2063 \subsection{New Truncate Command}
2064 We have added a new truncate command to bconsole, which
2065 will truncate a Volume if the Volume is purged and if
2066 the Volume is also marked {\bf Action On Purge = Truncate}.
2067 This feature was originally added in Bacula version 5.0.1,
2068 but the mechanism for actually doing the truncate required
2069 the user to enter a command such as:
2070
2071 \begin{verbatim}
2072 purge volume action=truncate storage=File pool=Default
2073 \end{verbatim}
2074
2075 The above command is now simplified to be:
2076
2077 \begin{verbatim}
2078 truncate storage=File pool=Default
2079 \end{verbatim}
2080
2081 \subsection{Migration/Copy/VirtualFull Performance Enhancements}
2082 The Bacula Storage daemon now permits multiple jobs to simultaneously read
2083 the same disk Volume, which gives substantial performance enhancements when
2084 running Migration, Copy, or VirtualFull jobs that read disk Volumes.  Our
2085 testing shows that when running multiple simultaneous jobs, the jobs can
2086 finish up to ten times faster with this version of Bacula.  This is
2087 built-in to the Storage daemon, so it happens automatically and
2088 transparently.
2089
2090 \subsection{VirtualFull Backup Consolidation Enhancements}
2091 By default Bacula selects jobs automatically for a VirtualFull,
2092 however, you may want to create the Virtual backup based on a
2093 particular backup (point in time) that exists.
2094
2095 For example, if you have the following backup Jobs in your catalog:
2096 \begin{verbatim}
2097 +-------+---------+-------+----------+----------+-----------+
2098 | JobId | Name    | Level | JobFiles | JobBytes | JobStatus |
2099 +-------+---------+-------+----------+----------+-----------+
2100 | 1     | Vbackup | F     | 1754     | 50118554 | T         |
2101 | 2     | Vbackup | I     | 1        | 4        | T         |
2102 | 3     | Vbackup | I     | 1        | 4        | T         |
2103 | 4     | Vbackup | D     | 2        | 8        | T         |
2104 | 5     | Vbackup | I     | 1        | 6        | T         |
2105 | 6     | Vbackup | I     | 10       | 60       | T         |
2106 | 7     | Vbackup | I     | 11       | 65       | T         |
2107 | 8     | Save    | F     | 1758     | 50118564 | T         |
2108 +-------+---------+-------+----------+----------+-----------+
2109 \end{verbatim}
2110
2111 and you want to consolidate only the first 3 jobs and create a
2112 virtual backup equivalent to Job 1 + Job 2 + Job 3, you will use
2113 \texttt{jobid=3} in the \texttt{run} command, then Bacula will select the
2114 previous Full backup, the previous Differential (if any) and all subsequent
2115 Incremental jobs.
2116
2117 \begin{verbatim}
2118 run job=Vbackup jobid=3 level=VirtualFull
2119 \end{verbatim}
2120
2121 If you want to consolidate a specific job list, you must specify the exact
2122 list of jobs to merge in the run command line.  For example, to consolidate
2123 the last Differential and all subsequent Incremental, you will use
2124 \texttt{jobid=4,5,6,7} or \texttt{jobid=4-7} on the run command line. As one
2125 of the Job in the list is a Differential backup, Bacula will set the new job
2126 level to Differential. If the list is composed only with Incremental jobs,
2127 the new job will have a level set to Incremental.
2128
2129 \begin{verbatim}
2130 run job=Vbackup jobid=4-7 level=VirtualFull
2131 \end{verbatim}
2132
2133 When using this feature, Bacula will automatically discard jobs that are
2134 not related to the current Job.  For example, specifying
2135 \texttt{jobid=7,8}, Bacula will discard JobId 8 because it is not
2136 part of the same backup Job.
2137
2138 We do not recommend it, but really want to consolidate jobs that have
2139 different names (so probably different clients, filesets, etc...), you must
2140 use \texttt{alljobid=} keyword instead of \texttt{jobid=}.
2141
2142 \begin{verbatim}
2143 run job=Vbackup alljobid=1-3,6-8 level=VirtualFull
2144 \end{verbatim}
2145
2146
2147 \subsection{FD Storage Address}
2148
2149 When the Director is behind a NAT, in a WAN area, to connect to
2150 % the FileDaemon or
2151 the StorageDaemon, the Director uses an ``external'' ip address,
2152 and the FileDaemon should use an ``internal'' IP address to contact the
2153 StorageDaemon.
2154
2155 The normal way to handle this situation is to use a canonical name such as
2156 ``storage-server'' that will be resolved on the Director side as the WAN
2157 address and on the Client side as the LAN address. This is now possible to
2158 configure this parameter using the new directive \texttt{FDStorageAddress} in
2159 the Storage or Client resource.
2160
2161
2162 \includegraphics[width=0.8\linewidth]{BackupOverWan1}
2163 \label{fig:fdstorageaddress}
2164
2165 \begin{verbatim}
2166 Storage {
2167      Name = storage1
2168      Address = 65.1.1.1
2169      FD Storage Address = 10.0.0.1
2170      SD Port = 9103
2171      ...
2172 }
2173 \end{verbatim}
2174
2175 % # or in the Client resouce
2176 %
2177
2178 \begin{verbatim}
2179  Client {
2180       Name = client1
2181       Address = 65.1.1.2
2182       FD Storage Address = 10.0.0.1
2183       FD Port = 9102
2184       ...
2185  }
2186 \end{verbatim}
2187
2188 Note that using the Client \texttt{FDStorageAddress} directive will not allow
2189 to use multiple Storage Daemon, all Backup or Restore requests will be sent to
2190 the specified \texttt{FDStorageAddress}.
2191
2192 \subsection{Job Bandwidth Limitation}
2193
2194 The new {\bf Job Bandwidth Limitation} directive may be added to the File
2195 daemon's and/or Director's configuration to limit the bandwidth used by a
2196 Job on a Client.  It can be set in the File daemon's conf file for all Jobs
2197 run in that File daemon, or it can be set for each Job in the Director's
2198 conf file. The speed is always specified in bytes per second.
2199
2200 For example:
2201 \begin{verbatim}
2202 FileDaemon {
2203   Name = localhost-fd
2204   Working Directory = /some/path
2205   Pid Directory = /some/path
2206   ...
2207   Maximum Bandwidth Per Job = 5Mb/s
2208 }
2209 \end{verbatim}
2210
2211 The above example would cause any jobs running with the FileDaemon to not
2212 exceed 5 megabytes per second of throughput when sending data to the
2213 Storage Daemon. Note, the speed is always specified in bytes per second
2214 (not in bits per second), and the case (upper/lower) of the specification
2215 characters is ignored (i.e. 1MB/s = 1Mb/s).
2216
2217 You may specify the following speed parameter modifiers:
2218    k/s (1,000 bytes per second), kb/s (1,024 bytes per second),
2219    m/s (1,000,000 bytes per second), or mb/s (1,048,576 bytes per second).
2220
2221 For example:
2222 \begin{verbatim}
2223 Job {
2224   Name = locahost-data
2225   FileSet = FS_localhost
2226   Accurate = yes
2227   ...
2228   Maximum Bandwidth = 5Mb/s
2229   ...
2230 }
2231 \end{verbatim}
2232
2233 The above example would cause Job \texttt{localhost-data} to not exceed 5MB/s
2234 of throughput when sending data from the File daemon to the Storage daemon.
2235
2236 A new console command \texttt{setbandwidth} permits to set dynamically the
2237 maximum throughput of a running Job or for future jobs of a Client.
2238
2239 \begin{verbatim}
2240 * setbandwidth limit=1000 jobid=10
2241 \end{verbatim}
2242
2243 Please note that the value specified for the \texttt{limit} command
2244 line parameter is always in units of 1024 bytes (i.e. the number
2245 is multiplied by 1024 to give the number of bytes per second).  As 
2246 a consequence, the above limit of 1000 will be interpreted as a
2247 limit of 1000 * 1024 = 1,024,000 bytes per second.
2248
2249 \medskip
2250 This project was funded by Bacula Systems.
2251
2252
2253 \subsection{Maximum Concurrent Read Jobs}
2254 This is a new directive that can be used in the {\bf bacula-dir.conf} file
2255 in the Storage resource.  The main purpose is to limit the number
2256 of concurrent Copy, Migration, and VirtualFull jobs so that
2257 they don't monopolize all the Storage drives causing a deadlock situation
2258 where all the drives are allocated for reading but none remain for
2259 writing.  This deadlock situation can occur when running multiple
2260 simultaneous Copy, Migration, and VirtualFull jobs.
2261
2262 \smallskip
2263 The default value is set to 0 (zero), which means there is no
2264 limit on the number of read jobs.  Note, limiting the read jobs
2265 does not apply to Restore jobs, which are normally started by
2266 hand.  A reasonable value for this directive is one half the number
2267 of drives that the Storage resource has rounded down.  Doing so,
2268 will leave the same number of drives for writing and will generally
2269 avoid over committing drives and a deadlock.
2270
2271
2272 \subsection{Director job Codes in Message Resource Commands}
2273 Before submitting the specified mail command to the operating system, Bacula
2274 performs character substitution like in Runscript commands. Bacula will now
2275 perform also specific Director character substitution.
2276
2277 \smallskip{}
2278 The code for this feature was contributed by Bastian Friedrich.
2279
2280 \subsection{Additions to RunScript variables}
2281 The following variables are now available in runscripts:
2282 \begin{itemize}
2283 \item current PID using \%P
2284 \item if the job is a clone job using \%C
2285 \end{itemize}
2286
2287 \begin{verbatim}
2288 RunAfterJob = "/bin/echo Pid=%P isCloned=%C" 
2289
2290 \end{verbatim}
2291
2292 \subsection{Read Only Storage Devices}
2293 This version of Bacula permits defining a Storage daemon device
2294 to be read-only. That is if the {\bf ReadOnly} directive is specified and
2295 enabled, the drive can only be used for read operations.
2296 The the {\bf ReadOnly} directive can be defined in any bacula-sd.conf
2297 Device resource, and is most useful to reserve one or more 
2298 drives for restores. An example is:
2299
2300 \begin{verbatim}
2301 Read Only = yes
2302 \end{verbatim}
2303
2304 \subsection{New Prune ``Expired'' Volume Command}
2305 It is now possible to prune all volumes
2306 (from a pool, or globally) that are ``expired''.  This option can be
2307 scheduled after or before the backup of the Catalog and can be
2308 combined with the Truncate On Purge option.  The Expired Prune option can
2309 be used instead of the \texttt{manual\_prune.pl} script.
2310
2311 \begin{verbatim}
2312 * prune expired volumes
2313
2314 * prune expired volumes pool=FullPool
2315 \end{verbatim}
2316
2317 To schedule this option automatically, it can be added to the BackupCatalog job
2318 definition.
2319
2320 \begin{verbatim}
2321  Job {
2322    Name = CatalogBackup
2323    ...
2324    RunScript {
2325      Console = "prune expired volume yes"
2326      RunsWhen = Before
2327    }
2328  }
2329 \end{verbatim}
2330
2331 \subsection{Hardlink Performance Enhancements}
2332 If you use a program such as Cyrus IMAP that creates very large numbers
2333 of hardlinks, the time to build the interactive restore tree can be
2334 excessively long. This version of Bacula has a new feature that
2335 automatically keeps the hardlinks associated with the restore tree
2336 in memory, which consumes a bit more memory but vastly speeds up 
2337 building the tree.  If the memory usage is too big for your system, you
2338 can reduce the amount of memory used during the restore command by
2339 adding the option {\bf optimizespeed=false} on the bconsole run
2340 command line.
2341
2342 This feature was developed by Josip Almasi, and enhanced to be runtime
2343 dynamic by Kern Sibbald.
2344
2345 \subsection{DisableCommand Directive}
2346 There is a new Directive named {\bf Disable Command} that
2347 can be put in the File daemon Client or Director resource.
2348 If it is in the Client, it applies globally, otherwise the
2349 directive applies only to the Director in which it is found.
2350 The Disable Command adds security to your File daemon by
2351 disabling certain commands.  The commands that can be
2352 disabled are:
2353
2354 \begin{verbatim}
2355 backup       
2356 cancel       
2357 setdebug=    
2358 setbandwidth=
2359 estimate     
2360 fileset      
2361 JobId=       
2362 level =      
2363 restore      
2364 endrestore   
2365 session      
2366 status       
2367 .status      
2368 storage      
2369 verify       
2370 RunBeforeNow 
2371 RunBeforeJob 
2372 RunAfterJob  
2373 Run          
2374 accurate
2375 \end{verbatim}
2376
2377 On or more of these command keywords can be placed in quotes and separated
2378 by spaces on the Disable Command directive line.  Note: the commands must
2379 be written exactly as they appear above.
2380
2381 \subsection{Multiple Console Directors}
2382 Support for multiple bconsole and bat Directors in the bconsole.conf and
2383 bat.conf files has been implemented and/or improved.
2384
2385 \subsection{Restricted Consoles}
2386 Better support for Restricted consoles has been implement for bconsole and
2387 bat.
2388
2389 \subsection{Configuration Files}
2390 In previous versions of Bacula the configuration files for each component
2391 were limited to a maximum of 499 bytes per configuration file line. This
2392 version of Bacula permits unlimited input line lengths.  This can be
2393 especially useful for specifying more complicated Migration/Copy SQL
2394 statements and in creating long restricted console ACL lists.
2395
2396 \subsection{Maximum Spawned Jobs}
2397 The Job resource now permits specifying a number of {\bf Maximum Spawn
2398 Jobs}. The default is 300.  This directive can be useful if you have
2399 big hardware and you do a lot of Migration/Copy jobs which start
2400 at the same time.  In prior versions of Bacula, Migration/Copy
2401 was limited to spawning a maximum of 100 jobs at a time.
2402
2403 \subsection{Progress Meter}
2404 The new File daemon has been enhanced to send its progress (files
2405 processed and bytes written) to the Director every 30 seconds. These
2406 figures can then be displayed with a bconsole {\bf status dir} 
2407 command.
2408
2409 \subsection{Scheduling a 6th Week}
2410 Prior version of Bacula permits specifying 1st through 5th week of 
2411 a month (first through fifth) as a keyword on the {\bf run}
2412 directive of a Schedule resource.  This version of Bacula also permits
2413 specifying the 6th week of a month with the keyword {\bf sixth} or
2414 {\bf 6th}.
2415
2416 \subsection{Scheduling the Last Day of a Month}
2417 This version of Bacula now permits specifying the {\bf lastday}
2418 keyword in the {\bf run} directive of a Schedule resource.
2419 If {\bf lastday} is specified, it will apply only to those months
2420 specified on the {\bf run} directive.  Note: by default all months
2421 are specified.
2422
2423 \subsection{Improvements to Cancel and Restart bconsole Commands}
2424 The Restart bconsole command now allow selection of either
2425 canceled or failed jobs to be restarted.  In addition both the
2426 {\bf cancel} and {\bf restart} bconsole commands permit entering
2427 a number of JobIds separated by commas or a range of JobIds indicated
2428 by a dash between the begin and end range (e.g. 3-10).  Finally the
2429 two commands also allow one to enter the special keyword {\bf all}
2430 to select all the appropriate Jobs.
2431
2432 \subsection{bconsole Performance Improvements}
2433 In previous versions of Bacula certain bconsole commands could wait a long
2434 time due to catalog lock contention.  This was especially noticeable 
2435 when a large number of jobs were running and putting their attributes
2436 into the catalog.  This version uses a separate catalog connection that
2437 should significantly enhance performance.
2438
2439 \subsection{New .bvfs\_decode\_lstat Command}
2440 There is a new bconsole command, which is
2441 {\bf .bvfs\_decode\_lstat} it requires one argument, which
2442 is {\bf lstat="lstat value to decode"}.  An example command
2443 in bconsole and the output might be:
2444
2445 \small
2446 \begin{verbatim}
2447 .bvfs_decode_lstat lstat="A A EHt B A A A JP BAA B BTL/A7 BTL/A7 BTL/A7 A A C"
2448
2449 st_nlink=1
2450 st_mode=16877
2451 st_uid=0
2452 st_gid=0
2453 st_size=591
2454 st_blocks=1
2455 st_ino=0
2456 st_ctime=1395650619
2457 st_mtime=1395650619
2458 st_mtime=1395650619
2459 st_dev=0
2460 LinkFI=0
2461 \end{verbatim}
2462 \normalsize
2463
2464
2465 \subsection*{New Debug Options}
2466
2467 In Bacula Enterprise version 8.0 and later, we introduced new options to
2468 the \texttt{setdebug} command.
2469
2470 \smallskip{}
2471
2472 If the \texttt{options} parameter is set, the following arguments can be
2473 used to control debug functions.
2474
2475 \begin{itemize}
2476 \item [0] clear debug flags
2477 \item [i] Turn off, ignore bwrite() errors on restore on File Daemon
2478 \item [d] Turn off decomp of BackupRead() streams on File Daemon
2479 \item [t] Turn on timestamp in traces
2480 \item [T] Turn off timestamp in traces
2481 \item [c] Truncate trace file if trace file is activated
2482 \item [l] Turn on recoding events on P() and V()
2483 \item [p] Turn on the display of the event ring when doing a bactrace
2484 \end{itemize}
2485
2486 \smallskip{}
2487
2488 The following command will truncate the trace file and will turn on timestamps
2489 in the trace file.
2490
2491 \begin{verbatim}
2492 * setdebug level=10 trace=1 options=ct fd
2493 \end{verbatim}
2494
2495 \smallskip{}
2496
2497 It is now possible to use \textsl{class} of debug messages called \texttt{tags}
2498 to control the debug output of Bacula daemons.
2499
2500 \begin{itemize}
2501 \item [all] Display all debug messages
2502 \item [bvfs] Display BVFS debug messages
2503 \item [sql] Display SQL related debug messages
2504 \item [memory] Display memory and poolmem allocation messages
2505 \item [scheduler] Display scheduler related debug messages
2506 \end{itemize}
2507
2508 \begin{verbatim}
2509 * setdebug level=10 tags=bvfs,sql,memory
2510 * setdebug level=10 tags=!bvfs
2511
2512 # bacula-dir -t -d 200,bvfs,sql
2513 \end{verbatim}
2514
2515 The \texttt{tags} option is composed of a list of tags, tags are separated by
2516 ``,'' or ``+'' or ``-'' or ``!''. To disable a specific tag, use ``-'' or ``!''
2517 in front of the tag. Note that more tags will come in future versions.
2518
2519 %\LTXtable{\linewidth}{table_debugtags}
2520
2521
2522 \chapter{New Features in 5.2.13}
2523 This chapter presents the new features that have been added to the current
2524 Community version of Bacula that is now released.
2525
2526 \subsection{Additions to RunScript variables}
2527 You can have access to Director name using \%D in your runscript
2528 command.
2529
2530 \begin{verbatim}
2531 RunAfterJob = "/bin/echo Director=%D 
2532 \end{verbatim}
2533
2534 \section{New Features in 5.2.1}
2535 This chapter presents the new features were added in the
2536 Community release version 5.2.1.
2537
2538 There are additional features (plugins) available in the Enterprise version
2539 that are described in another chapter. A subscription to Bacula Systems
2540 is required for the Enterprise version.
2541
2542 \subsection{LZO Compression}
2543
2544 LZO compression has been to the File daemon. From the user's point of view,
2545 it works like the GZIP compression (just replace {\bf compression=GZIP} with
2546 {\bf compression=LZO}).
2547
2548 For example:
2549 \begin{verbatim}
2550 Include {
2551    Options {compression=LZO }
2552    File = /home
2553    File = /data
2554 }
2555 \end{verbatim}
2556
2557 LZO provides a much faster compression and decompression speed but lower
2558 compression ratio than GZIP. It is a good option when you backup to disk. For
2559 tape, the hardware compression is almost always a better option.
2560
2561 LZO is a good alternative for GZIP1 when you don't want to slow down your
2562 backup. With a modern CPU it should be able to run almost as fast as:
2563
2564 \begin{itemize}
2565 \item your client can read data from disk. Unless you have very fast disks like
2566   SSD or large/fast RAID array.
2567 \item the data transfers between the file daemon and the storage daemon even on
2568   a 1Gb/s link.
2569 \end{itemize}
2570
2571 Note, Bacula uses compression level LZO1X-1.
2572
2573 \medskip
2574 The code for this feature was contributed by Laurent Papier.
2575
2576 \subsection{New Tray Monitor}
2577
2578 Since the old integrated Windows tray monitor doesn't work with
2579 recent Windows versions, we have written a new Qt Tray Monitor that is available
2580 for both Linux and Windows.  In addition to all the previous features,
2581 this new version allows you to run Backups from 
2582 the tray monitor menu.
2583
2584 \begin{figure}[htbp]
2585   \centering
2586   \includegraphics[width=0.8\linewidth]{tray-monitor}
2587   \label{fig:traymonitor}
2588   \caption{New tray monitor}
2589 \end{figure}
2590
2591 \begin{figure}[htbp]
2592   \centering
2593   \includegraphics[width=0.8\linewidth]{tray-monitor1}
2594   \label{fig:traymonitor1}
2595   \caption{Run a Job through the new tray monitor}
2596 \end{figure}
2597
2598
2599 To be able to run a job from the tray monitor, you need to
2600 allow specific commands in the Director monitor console:
2601 \begin{verbatim}
2602 Console {
2603     Name = win2003-mon
2604     Password = "xxx"
2605     CommandACL = status, .clients, .jobs, .pools, .storage, .filesets, .messages, run
2606     ClientACL = *all*               # you can restrict to a specific host
2607     CatalogACL = *all*
2608     JobACL = *all*
2609     StorageACL = *all*
2610     ScheduleACL = *all*
2611     PoolACL = *all*
2612     FileSetACL = *all*
2613     WhereACL = *all*
2614 }
2615 \end{verbatim}
2616
2617 \medskip
2618 This project was funded by Bacula Systems and is available with Bacula
2619 the Enterprise Edition and the Community Edition.
2620
2621 \subsection{Purge Migration Job}
2622
2623 The new {\bf Purge Migration Job} directive may be added to the Migration
2624 Job definition in the Director's configuration file. When it is enabled 
2625 the Job that was migrated during a migration will be purged at
2626 the end of the migration job.
2627
2628 For example:
2629 \begin{verbatim}
2630 Job {
2631   Name = "migrate-job"
2632   Type = Migrate
2633   Level = Full
2634   Client = localhost-fd
2635   FileSet = "Full Set"
2636   Messages = Standard
2637   Storage = DiskChanger
2638   Pool = Default
2639   Selection Type = Job
2640   Selection Pattern = ".*Save"
2641 ...
2642   Purge Migration Job = yes
2643 }
2644 \end{verbatim}
2645
2646 \medskip
2647
2648 This project was submitted by Dunlap Blake; testing and documentation was funded
2649 by Bacula Systems.
2650
2651 \subsection{Changes in Bvfs (Bacula Virtual FileSystem)}
2652
2653 Bat has now a bRestore panel that uses Bvfs to display files and
2654 directories.
2655
2656 \begin{figure}[htbp]
2657   \centering
2658   \includegraphics[width=0.8\linewidth]{bat-brestore}
2659   \label{fig:batbrestore}
2660   \caption{Bat Brestore Panel}
2661 \end{figure}
2662
2663 the Bvfs module works correctly with BaseJobs, Copy and Migration jobs.
2664
2665 \medskip
2666 This project was funded by Bacula Systems.
2667
2668 \subsubsection*{General notes}
2669
2670 \begin{itemize}
2671 \item All fields are separated by a tab
2672 \item You can specify \texttt{limit=} and \texttt{offset=} to list smoothly
2673   records in very big directories
2674 \item All operations (except cache creation) are designed to run instantly
2675 \item At this time, Bvfs works faster on PostgreSQL than MySQL catalog. If you
2676   can contribute new faster SQL queries we will be happy, else don't complain
2677   about speed.
2678 \item The cache creation is dependent of the number of directories. As Bvfs
2679   shares information across jobs, the first creation can be slow
2680 \item All fields are separated by a tab
2681 \item Due to potential encoding problem, it's advised to always use pathid in
2682   queries.
2683 \end{itemize}
2684
2685 \subsubsection*{Get dependent jobs from a given JobId}
2686
2687 Bvfs allows you to query the catalog against any combination of jobs. You
2688 can combine all Jobs and all FileSet for a Client in a single session.
2689
2690 To get all JobId needed to restore a particular job, you can use the
2691 \texttt{.bvfs\_get\_jobids} command.
2692
2693 \begin{verbatim}
2694 .bvfs_get_jobids jobid=num [all]
2695 \end{verbatim}
2696
2697 \begin{verbatim}
2698 .bvfs_get_jobids jobid=10
2699 1,2,5,10
2700 .bvfs_get_jobids jobid=10 all
2701 1,2,3,5,10
2702 \end{verbatim}
2703
2704 In this example, a normal restore will need to use JobIds 1,2,5,10 to
2705 compute a complete restore of the system.
2706
2707 With the \texttt{all} option, the Director will use all defined FileSet for
2708 this client.
2709
2710 \subsubsection*{Generating Bvfs cache}
2711
2712 The \texttt{.bvfs\_update} command computes the directory cache for jobs
2713 specified in argument, or for all jobs if unspecified.
2714
2715 \begin{verbatim}
2716 .bvfs_update [jobid=numlist]
2717 \end{verbatim}
2718
2719 Example:
2720 \begin{verbatim}
2721 .bvfs_update jobid=1,2,3
2722 \end{verbatim}
2723
2724 You can run the cache update process in a RunScript after the catalog backup.
2725
2726 \subsubsection*{Get all versions of a specific file}
2727
2728 Bvfs allows you to find all versions of a specific file for a given Client with
2729 the \texttt{.bvfs\_version} command. To avoid problems with encoding, this
2730 function uses only PathId and FilenameId. The jobid argument is mandatory but
2731 unused.
2732
2733 \begin{verbatim}
2734 .bvfs_versions client=filedaemon pathid=num filenameid=num jobid=1
2735 PathId FilenameId FileId JobId LStat Md5 VolName Inchanger
2736 PathId FilenameId FileId JobId LStat Md5 VolName Inchanger
2737 ...
2738 \end{verbatim}
2739
2740 Example:
2741
2742 \begin{verbatim}
2743 .bvfs_versions client=localhost-fd pathid=1 fnid=47 jobid=1
2744 1  47  52  12  gD HRid IGk D Po Po A P BAA I A   /uPgWaxMgKZlnMti7LChyA  Vol1  1
2745 \end{verbatim}
2746
2747 \subsubsection*{List directories}
2748
2749 Bvfs allows you to list directories in a specific path.
2750 \begin{verbatim}
2751 .bvfs_lsdirs pathid=num path=/apath jobid=numlist limit=num offset=num
2752 PathId  FilenameId  FileId  JobId  LStat  Path
2753 PathId  FilenameId  FileId  JobId  LStat  Path
2754 PathId  FilenameId  FileId  JobId  LStat  Path
2755 ...
2756 \end{verbatim}
2757
2758 You need to \texttt{pathid} or \texttt{path}. Using \texttt{path=""} will list
2759 ``/'' on Unix and all drives on Windows.  If FilenameId is 0, the record
2760 listed is a directory.
2761
2762 \begin{verbatim}
2763 .bvfs_lsdirs pathid=4 jobid=1,11,12
2764 4       0       0       0       A A A A A A A A A A A A A A     .
2765 5       0       0       0       A A A A A A A A A A A A A A     ..
2766 3       0       0       0       A A A A A A A A A A A A A A     regress/
2767 \end{verbatim}
2768
2769 In this example, to list directories present in \texttt{regress/}, you can use
2770 \begin{verbatim}
2771 .bvfs_lsdirs pathid=3 jobid=1,11,12
2772 3       0       0       0       A A A A A A A A A A A A A A     .
2773 4       0       0       0       A A A A A A A A A A A A A A     ..
2774 2       0       0       0       A A A A A A A A A A A A A A     tmp/
2775 \end{verbatim}
2776
2777 \subsubsection*{List files}
2778
2779 Bvfs allows you to list files in a specific path.
2780 \begin{verbatim}
2781 .bvfs_lsfiles pathid=num path=/apath jobid=numlist limit=num offset=num
2782 PathId  FilenameId  FileId  JobId  LStat  Path
2783 PathId  FilenameId  FileId  JobId  LStat  Path
2784 PathId  FilenameId  FileId  JobId  LStat  Path
2785 ...
2786 \end{verbatim}
2787
2788 You need to \texttt{pathid} or \texttt{path}. Using \texttt{path=""} will list
2789 ``/'' on Unix and all drives on Windows. If FilenameId is 0, the record listed
2790 is a directory.
2791
2792 \begin{verbatim}
2793 .bvfs_lsfiles pathid=4 jobid=1,11,12
2794 4       0       0       0       A A A A A A A A A A A A A A     .
2795 5       0       0       0       A A A A A A A A A A A A A A     ..
2796 1       0       0       0       A A A A A A A A A A A A A A     regress/
2797 \end{verbatim}
2798
2799 In this example, to list files present in \texttt{regress/}, you can use
2800 \begin{verbatim}
2801 .bvfs_lsfiles pathid=1 jobid=1,11,12
2802 1   47   52   12    gD HRid IGk BAA I BMqcPH BMqcPE BMqe+t A     titi
2803 1   49   53   12    gD HRid IGk BAA I BMqe/K BMqcPE BMqe+t B     toto
2804 1   48   54   12    gD HRie IGk BAA I BMqcPH BMqcPE BMqe+3 A     tutu
2805 1   45   55   12    gD HRid IGk BAA I BMqe/K BMqcPE BMqe+t B     ficheriro1.txt
2806 1   46   56   12    gD HRie IGk BAA I BMqe/K BMqcPE BMqe+3 D     ficheriro2.txt
2807 \end{verbatim}
2808
2809 \subsubsection*{Restore set of files}
2810
2811 Bvfs allows you to create a SQL table that contains files that you want to
2812 restore. This table can be provided to a restore command with the file option.
2813
2814 \begin{verbatim}
2815 .bvfs_restore fileid=numlist dirid=numlist hardlink=numlist path=b2num
2816 OK
2817 restore file=?b2num ...
2818 \end{verbatim}
2819
2820 To include a directory (with \texttt{dirid}), Bvfs needs to run a query to
2821 select all files. This query could be time consuming.
2822
2823 \texttt{hardlink} list is always composed of a series of two numbers (jobid,
2824 fileindex). This information can be found in the LinkFI field of the LStat
2825 packet.
2826
2827 The \texttt{path} argument represents the name of the table that Bvfs will
2828 store results. The format of this table is \texttt{b2[0-9]+}. (Should start by
2829 b2 and followed by digits).
2830
2831 Example:
2832
2833 \begin{verbatim}
2834 .bvfs_restore fileid=1,2,3,4 hardlink=10,15,10,20 jobid=10 path=b20001
2835 OK
2836 \end{verbatim}
2837
2838 \subsubsection*{Cleanup after Restore}
2839
2840 To drop the table used by the restore command, you can use the
2841 \texttt{.bvfs\_cleanup} command.
2842
2843 \begin{verbatim}
2844 .bvfs_cleanup path=b20001
2845 \end{verbatim}
2846
2847 \subsubsection*{Clearing the BVFS Cache}
2848
2849 To clear the BVFS cache, you can use the \texttt{.bvfs\_clear\_cache} command.
2850
2851 \begin{verbatim}
2852 .bvfs_clear_cache yes
2853 OK
2854 \end{verbatim}
2855
2856 \subsection{Changes in the Pruning Algorithm}
2857
2858 We rewrote the job pruning algorithm in this version. Previously, in some users
2859 reported that the pruning process at the end of jobs was very long. It should
2860 not be longer the case. Now, Bacula won't prune automatically a Job if this
2861 particular Job is needed to restore data. Example:
2862
2863 \begin{verbatim}
2864 JobId: 1  Level: Full
2865 JobId: 2  Level: Incremental
2866 JobId: 3  Level: Incremental
2867 JobId: 4  Level: Differential
2868 .. Other incrementals up to now
2869 \end{verbatim}
2870
2871 In this example, if the Job Retention defined in the Pool or in the Client
2872 resource causes that Jobs with Jobid in 1,2,3,4 can be pruned, Bacula will
2873 detect that JobId 1 and 4 are essential to restore data at the current state
2874 and will prune only JobId 2 and 3.
2875
2876 \texttt{Important}, this change affect only the automatic pruning step after a
2877 Job and the \texttt{prune jobs} Bconsole command. If a volume expires after the
2878 \texttt{VolumeRetention} period, important jobs can be pruned.
2879
2880 \subsection{Ability to Verify any specified Job}
2881 You now have the ability to tell Bacula which Job should verify instead of
2882 automatically verify just the last one.
2883
2884 This feature can be used with VolumeToCatalog, DiskToCatalog and Catalog level.
2885
2886 To verify a given job, just specify the Job jobid in argument when starting the
2887 job.
2888 \begin{verbatim}
2889 *run job=VerifyVolume jobid=1 level=VolumeToCatalog
2890 Run Verify job
2891 JobName:     VerifyVolume
2892 Level:       VolumeToCatalog
2893 Client:      127.0.0.1-fd
2894 FileSet:     Full Set
2895 Pool:        Default (From Job resource)
2896 Storage:     File (From Job resource)
2897 Verify Job:  VerifyVol.2010-09-08_14.17.17_03
2898 Verify List: /tmp/regress/working/VerifyVol.bsr
2899 When:        2010-09-08 14:17:31
2900 Priority:    10
2901 OK to run? (yes/mod/no):
2902 \end{verbatim}
2903
2904 \medskip
2905 This project was funded by Bacula Systems and is available with Bacula
2906 Enterprise Edition and Community Edition.
2907
2908 \subsection{Additions to RunScript variables}
2909 You can have access to JobBytes and JobFiles using \%b and \%F in your runscript
2910 command. The Client address is now available through \%h.
2911
2912 \begin{verbatim}
2913 RunAfterJob = "/bin/echo Job=%j JobBytes=%b JobFiles=%F ClientAddress=%h"
2914 \end{verbatim}
2915
2916 %\subsection{Changes in drivetype.exe}
2917 %
2918 %Now the \texttt{drivetype.exe} program allows you to list all local hard
2919 %drives. It can help to build dynamic FileSet on Windows.
2920 %
2921 %\begin{verbatim}
2922 %File = "\\|\"c:/program files/bacula/bin32/drivetype\" -l -a"
2923 %\end{verbatim}
2924 %
2925
2926 \subsection{Additions to the Plugin API}
2927 The bfuncs structure has been extended to include a number of
2928 new entrypoints.
2929
2930 \subsubsection{bfuncs}
2931 The bFuncs structure defines the callback entry points within Bacula
2932 that the plugin can use register events, get Bacula values, set
2933 Bacula values, and send messages to the Job output or debug output.
2934
2935 The exact definition as of this writing is:
2936 \begin{verbatim}
2937 typedef struct s_baculaFuncs {
2938    uint32_t size;
2939    uint32_t version;
2940    bRC (*registerBaculaEvents)(bpContext *ctx, ...);
2941    bRC (*getBaculaValue)(bpContext *ctx, bVariable var, void *value);
2942    bRC (*setBaculaValue)(bpContext *ctx, bVariable var, void *value);
2943    bRC (*JobMessage)(bpContext *ctx, const char *file, int line,
2944        int type, utime_t mtime, const char *fmt, ...);
2945    bRC (*DebugMessage)(bpContext *ctx, const char *file, int line,
2946        int level, const char *fmt, ...);
2947    void *(*baculaMalloc)(bpContext *ctx, const char *file, int line,
2948        size_t size);
2949    void (*baculaFree)(bpContext *ctx, const char *file, int line, void *mem);
2950    
2951    /* New functions follow */
2952    bRC (*AddExclude)(bpContext *ctx, const char *file);
2953    bRC (*AddInclude)(bpContext *ctx, const char *file);
2954    bRC (*AddIncludeOptions)(bpContext *ctx, const char *opts);
2955    bRC (*AddRegex)(bpContext *ctx, const char *item, int type);
2956    bRC (*AddWild)(bpContext *ctx, const char *item, int type);
2957    bRC (*checkChanges)(bpContext *ctx, struct save_pkt *sp);
2958
2959 } bFuncs;
2960 \end{verbatim}
2961
2962 \begin{description}
2963 \item [AddExclude] can be called to exclude a file. The file
2964   string passed may include wildcards that will be interpreted by
2965   the {\bf fnmatch} subroutine. This function can be called 
2966   multiple times, and each time the file specified will be added
2967   to the list of files to be excluded. Note, this function only
2968   permits adding excludes of specific file or directory names,
2969   or files matched by the rather simple fnmatch mechanism.
2970   See below for information on doing wild-card and regex excludes.
2971
2972 \item [NewPreInclude] can be called to create a new Include block. This
2973   block will be added after the current defined Include block. This
2974   function can be called multiple times, but each time, it will create
2975   a new Include section (not normally needed). This function should
2976   be called only if you want to add an entirely new Include block.
2977
2978 \item [NewInclude] can be called to create a new Include block. This
2979   block will be added before any user defined Include blocks. This
2980   function can be called multiple times, but each time, it will create
2981   a new Include section (not normally needed). This function should
2982   be called only if you want to add an entirely new Include block.
2983
2984 \item [AddInclude] can be called to add new files/directories to
2985   be included.  They are added to the current Include block. If
2986   NewInclude has not been included, the current Include block is
2987   the last one that the user created. This function
2988   should be used only if you want to add totally new files/directories
2989   to be included in the backup. 
2990
2991 \item [NewOptions] adds a new Options block to the current Include
2992   in front of any other Options blocks. This permits the plugin to
2993   add exclude directives (wild-cards and regexes) in front of the
2994   user Options, and thus prevent certain files from being backed up.
2995   This can be useful if the plugin backs up files, and they should
2996   not be also backed up by the main Bacula code.  This function
2997   may be called multiple times, and each time, it creates a new
2998   prepended Options block. Note: normally you want to call this 
2999   entry point prior to calling AddOptions, AddRegex, or AddWild.
3000   
3001 \item [AddOptions] allows the plugin it set options in
3002   the current Options block, which is normally created with the
3003   NewOptions call just prior to adding Include Options.
3004   The permitted options are passed as a character string, where
3005   each character has a specific meaning as defined below:
3006
3007   \begin{description}
3008   \item [a] always replace files (default).
3009   \item [e] exclude rather than include.
3010   \item [h] no recursion into subdirectories.
3011   \item [H] do not handle hard links.
3012   \item [i] ignore case in wildcard and regex matches.
3013   \item [M] compute an MD5 sum.
3014   \item [p] use a portable data format on Windows (not recommended).
3015   \item [R] backup resource forks and Findr Info.
3016   \item [r] read from a fifo
3017   \item [S1] compute an SHA1 sum.
3018   \item [S2] compute an SHA256 sum.
3019   \item [S3] comput an SHA512 sum.
3020   \item [s] handle sparse files.
3021   \item [m] use st\_mtime only for file differences.
3022   \item [k] restore the st\_atime after accessing a file.
3023   \item [A] enable ACL backup.
3024   \item [Vxxx:] specify verify options. Must terminate with :
3025   \item [Cxxx:] specify accurate options. Must terminate with :
3026   \item [Jxxx:] specify base job Options. Must terminate with :
3027   \item [Pnnn:] specify integer nnn paths to strip. Must terminate with :
3028   \item [w] if newer
3029   \item [Zn] specify gzip compression level n.
3030   \item [K] do not use st\_atime in backup decision.
3031   \item [c] check if file changed during backup.
3032   \item [N] honor no dump flag.
3033   \item [X] enable backup of extended attributes.
3034   \end{description}
3035
3036 \item [AddRegex] adds a regex expression to the current Options block.
3037   The following options are permitted:
3038   \begin{description}
3039   \item [ ] (a blank) regex applies to whole path and filename.
3040   \item [F] regex applies only to the filename (directory or path stripped).
3041   \item [D] regex applies only to the directory (path) part of the name.
3042   \end{description}
3043
3044 \item [AddWild] adds a wildcard expression to the current Options block.
3045   The following options are permitted:
3046   \begin{description}
3047   \item [ ] (a blank) regex applies to whole path and filename.
3048   \item [F] regex applies only to the filename (directory or path stripped).
3049   \item [D] regex applies only to the directory (path) part of the name.
3050   \end{description}
3051
3052 \item [checkChanges] call the \texttt{check\_changes()} function in Bacula code
3053   that can use Accurate code to compare the file information in argument with
3054   the previous file information. The \texttt{delta\_seq} attribute of the
3055   \texttt{save\_pkt} will be updated, and the call will return
3056   \texttt{bRC\_Seen} if the core code wouldn't decide to backup it.
3057   
3058 \end{description}
3059   
3060
3061 \subsubsection{Bacula events}
3062 The list of events has been extended to include:
3063
3064 \begin{verbatim}
3065 typedef enum {
3066   bEventJobStart        = 1,
3067   bEventJobEnd          = 2,
3068   bEventStartBackupJob  = 3,
3069   bEventEndBackupJob    = 4,
3070   bEventStartRestoreJob = 5,
3071   bEventEndRestoreJob   = 6,
3072   bEventStartVerifyJob  = 7,
3073   bEventEndVerifyJob    = 8,
3074   bEventBackupCommand   = 9,
3075   bEventRestoreCommand  = 10,
3076   bEventLevel           = 11,
3077   bEventSince           = 12,
3078    
3079   /* New events */
3080   bEventCancelCommand                   = 13,
3081   bEventVssBackupAddComponents          = 14,
3082   bEventVssRestoreLoadComponentMetadata = 15,
3083   bEventVssRestoreSetComponentsSelected = 16,
3084   bEventRestoreObject                   = 17,
3085   bEventEndFileSet                      = 18,
3086   bEventPluginCommand                   = 19,
3087   bEventVssBeforeCloseRestore           = 20,
3088   bEventVssPrepareSnapshot              = 21
3089
3090 } bEventType;
3091 \end{verbatim}
3092
3093 \begin{description}
3094 \item [bEventCancelCommand] is called whenever the currently
3095   running Job is canceled */
3096
3097 \item [bEventVssBackupAddComponents] 
3098
3099 \item [bEventVssPrepareSnapshot] is called before creating VSS snapshots, it
3100   provides a char[27] table where the plugin can add Windows drives that will
3101   be used during the Job. You need to add them without duplicates, and you can
3102   use in \texttt{fd\_common.h} \texttt{add\_drive()} and \texttt{copy\_drives()}
3103   for this purpose.
3104 \end{description}
3105
3106 \subsection{ACL enhancements}
3107
3108 The following enhancements are made to the Bacula Filed with regards to
3109 Access Control Lists (ACLs)
3110
3111 \begin{itemize}
3112 \item Added support for AIX 5.3 and later new aclx\_get interface which supports
3113   POSIX and NFSv4 ACLs.
3114 \item Added support for new acl types on FreeBSD 8.1 and later which supports
3115   POSIX and NFSv4 ACLs.
3116 \item Some generic cleanups for internal ACL handling.
3117 \item Fix for acl storage on OSX
3118 \item Cleanup of configure checks for ACL detection, now configure only
3119   tests for a certain interface type based on the operating system
3120   this should give less false positives on detection. Also when ACLs
3121   are detected no other acl checks are performed anymore.
3122 \end{itemize}
3123
3124 \medskip
3125 This project was funded by Planets Communications B.V. and ELM Consultancy B.V.
3126 and is available with Bacula Enterprise Edition and Community Edition.
3127
3128 \subsection{XATTR enhancements}
3129
3130 The following enhancements are made to the Bacula Filed with regards to
3131 Extended Attributes (XATTRs)
3132
3133 \begin{itemize}
3134 \item Added support for IRIX extended attributes using the attr\_get interface.
3135 \item Added support for Tru64 (OSF1) extended attributes using the
3136   getproplist interface.
3137 \item Added support for AIX extended attributes available in AIX 6.x
3138   and higher using the listea/getea/setea interface.
3139 \item Added some debugging to generic xattr code so it easier to
3140   debug.
3141 \item Cleanup of configure checks for XATTR detection, now configure only
3142   tests for a certain interface type based on the operating system
3143   this should give less false positives on detection. Also when xattrs
3144   are detected no other xattr checks are performed anymore.
3145 \end{itemize}
3146
3147 \medskip
3148 This project was funded by Planets Communications B.V. and ELM Consultancy B.V.
3149 and is available with Bacula Enterprise Edition and Community Edition.
3150
3151 \subsection{Class Based Database Backend Drivers}
3152
3153 The main Bacula Director code is independent of the SQL backend
3154 in version 5.2.0 and greater.  This means that the Bacula Director can be
3155 packaged by itself, then each of the different SQL backends supported can
3156 be packaged separately.  It is possible to build all the DB backends at the
3157 same time by including multiple database options at the same time.
3158
3159 ./configure can be run with multiple database configure options.
3160 \begin{verbatim}
3161    --with-sqlite3
3162    --with-mysql
3163    --with-postgresql
3164 \end{verbatim}
3165
3166 Order of testing for databases is:
3167 \begin{itemize}
3168 \item postgresql
3169 \item mysql
3170 \item sqlite3
3171 \end{itemize}
3172
3173 Each configured backend generates a file named:
3174 \verb+libbaccats-<sql_backend_name>-<version>.so+
3175 A dummy catalog library is created named libbaccats-version.so
3176
3177 At configure time the first detected backend is used as the so called
3178 default backend and at install time the dummy
3179 \verb+libbaccats-<version>.so+ is replaced with the default backend type.
3180
3181 If you configure all three backends you get three backend libraries and the
3182 postgresql gets installed as the default.
3183
3184 When you want to switch to another database, first save any old catalog you
3185 may have then you can copy one of the three backend libraries over the
3186 \verb+libbaccats-<version>.so+ e.g.
3187
3188 An actual command, depending on your Bacula version might be:
3189 \begin{verbatim}
3190    cp libbaccats-postgresql-5.2.2.so libbaccats-5.2.2.so
3191 \end{verbatim}
3192
3193 where the \verb+5.2.2+ must be replaced by the Bacula release
3194 version number.
3195
3196 Then you must update the default backend in the following files:
3197
3198 \begin{verbatim}
3199   create_bacula_database
3200   drop_bacula_database
3201   drop_bacula_tables
3202   grant_bacula_privileges
3203   make_bacula_tables
3204   make_catalog_backup
3205   update_bacula_tables
3206 \end{verbatim}
3207
3208 And re-run all the above scripts.  Please note, this means
3209 you will have a new empty database and if you had a previous
3210 one it will be lost.
3211
3212 All current database backend drivers for catalog information are rewritten
3213 to use a set of multi inherited C++ classes which abstract the specific
3214 database specific internals and make sure we have a more stable generic
3215 interface with the rest of SQL code.  From now on there is a strict
3216 boundary between the SQL code and the low-level database functions.  This
3217 new interface should also make it easier to add a new backend for a
3218 currently unsupported database.  As part of the rewrite the SQLite 2 code
3219 was removed (e.g.  only SQLite 3 is now supported).  An extra bonus of the
3220 new code is that you can configure multiple backends in the configure and
3221 build all backends in one compile session and select the correct database
3222 backend at install time.  This should make it a lot easier for packages
3223 maintainers.
3224
3225
3226
3227 \medskip
3228 We also added cursor support for PostgreSQL backend, this improves memory
3229 usage for large installation.
3230
3231 \medskip
3232 This project was implemented by Planets Communications B.V. and ELM
3233 Consultancy B.V. and Bacula Systems and is available with both the Bacula
3234 Enterprise Edition and the Community Edition.
3235
3236 \subsection{Hash List Enhancements}
3237
3238 The htable hash table class has been extended with extra hash functions for
3239 handling next to char pointer hashes also 32 bits and 64 bits hash keys.
3240 Also the hash table initialization routines have been enhanced with
3241 support for passing a hint as to the number of initial pages to use
3242 for the size of the hash table. Until now the hash table always used
3243 a fixed value of 10 Mb. The private hash functions of the mountpoint entry
3244 cache have been rewritten to use the new htable class with a small memory
3245 footprint.
3246
3247 \medskip
3248 This project was funded by Planets Communications B.V. and ELM Consultancy B.V.
3249 and Bacula Systems and is available with Bacula Enterprise Edition and
3250 Community Edition.
3251
3252 %%
3253 %%
3254 %%% =====================================================================
3255 %%
3256 %%
3257
3258
3259 \section{Release Version 5.0.3}
3260
3261 There are no new features in version 5.0.2.  This version simply fixes a
3262 number of bugs found in version 5.0.1 during the ongoing development
3263 process.
3264
3265 \section{Release Version 5.0.2}
3266
3267 There are no new features in version 5.0.2.  This version simply fixes a
3268 number of bugs found in version 5.0.1 during the ongoing development
3269 process.
3270
3271 %%
3272 %%
3273
3274 \section{New Features in 5.0.1}
3275
3276 This chapter presents the new features that are in the released Bacula version
3277 5.0.1. This version mainly fixes a number of bugs found in version 5.0.0 during
3278 the ongoing development process.
3279
3280 \subsection{Truncate Volume after Purge}
3281 \label{sec:actiononpurge}
3282
3283 The Pool directive \textbf{ActionOnPurge=Truncate} instructs Bacula to truncate
3284 the volume when it is purged with the new command \texttt{purge volume
3285   action}. It is useful to prevent disk based volumes from consuming too much
3286 space.
3287
3288 \begin{verbatim}
3289 Pool {
3290   Name = Default
3291   Action On Purge = Truncate
3292   ...
3293 }
3294 \end{verbatim}
3295
3296 As usual you can also set this property with the \texttt{update volume} command
3297 \begin{verbatim}
3298 *update volume=xxx ActionOnPurge=Truncate
3299 *update volume=xxx actiononpurge=None
3300 \end{verbatim}
3301
3302 To ask Bacula to truncate your \texttt{Purged} volumes, you need to use the
3303 following command in interactive mode or in a RunScript as shown after:
3304 \begin{verbatim}
3305 *purge volume action=truncate storage=File allpools
3306 # or by default, action=all
3307 *purge volume action storage=File pool=Default
3308 \end{verbatim}
3309
3310 This is possible to specify the volume name, the media type, the pool, the
3311 storage, etc\dots (see \texttt{help purge}) Be sure that your storage device is
3312 idle when you decide to run this command.
3313
3314 \begin{verbatim}
3315 Job {
3316  Name = CatalogBackup
3317  ...
3318  RunScript {
3319    RunsWhen=After
3320    RunsOnClient=No
3321    Console = "purge volume action=all allpools storage=File"
3322  }
3323 }
3324 \end{verbatim}
3325
3326 \textbf{Important note}: This feature doesn't work as
3327 expected in version 5.0.0. Please do not use it before version 5.0.1.
3328
3329 \subsection{Allow Higher Duplicates}
3330 This directive did not work correctly and has been depreciated
3331 (disabled) in version 5.0.1. Please remove it from your bacula-dir.conf
3332 file as it will be removed in a future release.
3333
3334 \subsection{Cancel Lower Level Duplicates}
3335 This directive was added in Bacula version 5.0.1.  It compares the
3336 level of a new backup job to old jobs of the same name, if any,
3337 and will kill the job which has a lower level than the other one.
3338 If the levels are the same (i.e. both are Full backups), then 
3339 nothing is done and the other Cancel XXX Duplicate directives
3340 will be examined.
3341
3342 \section{New Features in 5.0.0}
3343
3344 \subsection{Maximum Concurrent Jobs for Devices}
3345 \label{sec:maximumconcurrentjobdevice}
3346
3347 {\bf Maximum Concurrent Jobs} is a new Device directive in the Storage
3348 Daemon configuration permits setting the maximum number of Jobs that can
3349 run concurrently on a specified Device.  Using this directive, it is
3350 possible to have different Jobs using multiple drives, because when the
3351 Maximum Concurrent Jobs limit is reached, the Storage Daemon will start new
3352 Jobs on any other available compatible drive.  This facilitates writing to
3353 multiple drives with multiple Jobs that all use the same Pool.
3354
3355 This project was funded by Bacula Systems.
3356
3357 \subsection{Restore from Multiple Storage Daemons}
3358 \index[general]{Restore}
3359
3360 Previously, you were able to restore from multiple devices in a single Storage
3361 Daemon. Now, Bacula is able to restore from multiple Storage Daemons. For
3362 example, if your full backup runs on a Storage Daemon with an autochanger, and
3363 your incremental jobs use another Storage Daemon with lots of disks, Bacula
3364 will switch automatically from one Storage Daemon to an other within the same
3365 Restore job.
3366
3367 You must upgrade your File Daemon to version 3.1.3 or greater to use this
3368 feature.
3369
3370 This project was funded by Bacula Systems with the help of Equiinet.
3371
3372 \subsection{File Deduplication using Base Jobs}
3373 A base job is sort of like a Full save except that you will want the FileSet to
3374 contain only files that are unlikely to change in the future (i.e.  a snapshot
3375 of most of your system after installing it).  After the base job has been run,
3376 when you are doing a Full save, you specify one or more Base jobs to be used.
3377 All files that have been backed up in the Base job/jobs but not modified will
3378 then be excluded from the backup.  During a restore, the Base jobs will be
3379 automatically pulled in where necessary.
3380
3381 This is something none of the competition does, as far as we know (except
3382 perhaps BackupPC, which is a Perl program that saves to disk only).  It is big
3383 win for the user, it makes Bacula stand out as offering a unique optimization
3384 that immediately saves time and money.  Basically, imagine that you have 100
3385 nearly identical Windows or Linux machine containing the OS and user files.
3386 Now for the OS part, a Base job will be backed up once, and rather than making
3387 100 copies of the OS, there will be only one.  If one or more of the systems
3388 have some files updated, no problem, they will be automatically restored.
3389
3390 See the \ilink{Base Job Chapter}{basejobs} for more information.
3391
3392 This project was funded by Bacula Systems.
3393
3394 \subsection{AllowCompression = \lt{}yes\vb{}no\gt{}}
3395 \index[dir]{AllowCompression}
3396
3397 This new directive may be added to Storage resource within the Director's
3398 configuration to allow users to selectively disable the client compression for
3399 any job which writes to this storage resource.
3400
3401 For example:
3402 \begin{verbatim}
3403 Storage {
3404   Name = UltriumTape
3405   Address = ultrium-tape
3406   Password = storage_password # Password for Storage Daemon
3407   Device = Ultrium
3408   Media Type = LTO 3
3409   AllowCompression = No # Tape drive has hardware compression
3410 }
3411 \end{verbatim}
3412 The above example would cause any jobs running with the UltriumTape storage
3413 resource to run without compression from the client file daemons.  This
3414 effectively overrides any compression settings defined at the FileSet level.
3415
3416 This feature is probably most useful if you have a tape drive which supports
3417 hardware compression.  By setting the \texttt{AllowCompression = No} directive
3418 for your tape drive storage resource, you can avoid additional load on the file
3419 daemon and possibly speed up tape backups.
3420
3421 This project was funded by Collaborative Fusion, Inc.
3422
3423 \subsection{Accurate Fileset Options}
3424 \label{sec:accuratefileset}
3425
3426 In previous versions, the accurate code used the file creation and modification
3427 times to determine if a file was modified or not. Now you can specify which
3428 attributes to use (time, size, checksum, permission, owner, group, \dots),
3429 similar to the Verify options.
3430
3431 \begin{verbatim}
3432 FileSet {
3433   Name = Full
3434   Include = {
3435     Options {
3436        Accurate = mcs
3437        Verify   = pin5
3438     }
3439     File = /
3440   }
3441 }
3442 \end{verbatim}
3443
3444 \begin{description}  
3445 \item {\bf i}  compare the inodes  
3446 \item {\bf p}  compare the permission bits  
3447 \item {\bf n}  compare the number of links  
3448 \item {\bf u}  compare the user id  
3449 \item {\bf g}  compare the group id  
3450 \item {\bf s}  compare the size  
3451 \item {\bf a}  compare the access time  
3452 \item {\bf m}  compare the modification time (st\_mtime)  
3453 \item {\bf c}  compare the change time (st\_ctime)  
3454 \item {\bf d}  report file size decreases  
3455 \item {\bf 5}  compare the MD5 signature  
3456 \item {\bf 1}  compare the SHA1 signature  
3457 \end{description}
3458
3459 \textbf{Important note:} If you decide to use checksum in Accurate jobs,
3460 the File Daemon will have to read all files even if they normally would not
3461 be saved.  This increases the I/O load, but also the accuracy of the
3462 deduplication.  By default, Bacula will check modification/creation time
3463 and size.
3464
3465 This project was funded by Bacula Systems.
3466
3467 \subsection{Tab-completion for Bconsole}
3468 \label{sec:tabcompletion}
3469
3470 If you build \texttt{bconsole} with readline support, you will be able to use
3471 the new auto-completion mode. This mode supports all commands, gives help
3472 inside command, and lists resources when required. It works also in the restore
3473 mode.
3474
3475 To use this feature, you should have readline development package loaded on
3476 your system, and use the following option in configure.
3477 \begin{verbatim}
3478 ./configure --with-readline=/usr/include/readline --disable-conio ...
3479 \end{verbatim}
3480
3481 The new bconsole won't be able to tab-complete with older directors.
3482
3483 This project was funded by Bacula Systems.
3484
3485 \subsection{Pool File and Job Retention}
3486 \label{sec:poolfilejobretention}
3487
3488 We added two new Pool directives, \texttt{FileRetention} and
3489 \texttt{JobRetention}, that take precedence over Client directives of the same
3490 name. It allows you to control the Catalog pruning algorithm Pool by Pool. For
3491 example, you can decide to increase Retention times for Archive or OffSite Pool.
3492
3493 It seems obvious to us, but apparently not to some users, that given the
3494 definition above that the Pool File and Job Retention periods is a global
3495 override for the normal Client based pruning, which means that when the
3496 Job is pruned, the pruning will apply globally to that particular Job.
3497
3498 Currently, there is a bug in the implementation that causes any Pool 
3499 retention periods specified to apply to {\bf all} Pools for that
3500 particular Client.  Thus we suggest that you avoid using these two
3501 directives until this implementation problem is corrected.
3502
3503 \subsection{Read-only File Daemon using capabilities}
3504 \label{sec:fdreadonly}
3505 This feature implements support of keeping \textbf{ReadAll} capabilities after
3506 UID/GID switch, this allows FD to keep root read but drop write permission.
3507
3508 It introduces new \texttt{bacula-fd} option (\texttt{-k}) specifying that
3509 \textbf{ReadAll} capabilities should be kept after UID/GID switch.
3510
3511 \begin{verbatim}
3512 root@localhost:~# bacula-fd -k -u nobody -g nobody
3513 \end{verbatim}
3514
3515 The code for this feature was contributed by our friends at AltLinux.
3516
3517 \subsection{Bvfs API}
3518 \label{sec:bvfs}
3519
3520 To help developers of restore GUI interfaces, we have added new \textsl{dot
3521   commands} that permit browsing the catalog in a very simple way.
3522
3523 \begin{itemize}
3524 \item \texttt{.bvfs\_update [jobid=x,y,z]} This command is required to update
3525   the Bvfs cache in the catalog. You need to run it before any access to the
3526   Bvfs layer.
3527
3528 \item \texttt{.bvfs\_lsdirs jobid=x,y,z path=/path | pathid=101} This command
3529   will list all directories in the specified \texttt{path} or
3530   \texttt{pathid}. Using \texttt{pathid} avoids problems with character
3531   encoding of path/filenames.
3532
3533 \item \texttt{.bvfs\_lsfiles jobid=x,y,z path=/path | pathid=101} This command
3534   will list all files in the specified \texttt{path} or \texttt{pathid}. Using
3535   \texttt{pathid} avoids problems with character encoding.
3536 \end{itemize}
3537
3538 You can use \texttt{limit=xxx} and \texttt{offset=yyy} to limit the amount of
3539 data that will be displayed.
3540
3541 \begin{verbatim}
3542 * .bvfs_update jobid=1,2
3543 * .bvfs_update
3544 * .bvfs_lsdir path=/ jobid=1,2
3545 \end{verbatim}
3546
3547 This project was funded by Bacula Systems.
3548
3549 \subsection{Testing your Tape Drive}
3550 \label{sec:btapespeed}
3551
3552 To determine the best configuration of your tape drive, you can run the new
3553 \texttt{speed} command available in the \texttt{btape} program.
3554
3555 This command can have the following arguments:
3556 \begin{itemize}
3557 \item[\texttt{file\_size=n}] Specify the Maximum File Size for this test
3558   (between 1 and 5GB). This counter is in GB.
3559 \item[\texttt{nb\_file=n}] Specify the number of file to be written. The amount
3560   of data should be greater than your memory ($file\_size*nb\_file$).
3561 \item[\texttt{skip\_zero}] This flag permits to skip tests with constant
3562   data.
3563 \item[\texttt{skip\_random}] This flag permits to skip tests with random
3564   data.
3565 \item[\texttt{skip\_raw}] This flag permits to skip tests with raw access.
3566 \item[\texttt{skip\_block}] This flag permits to skip tests with Bacula block
3567   access.
3568 \end{itemize}
3569
3570 \begin{verbatim}
3571 *speed file_size=3 skip_raw
3572 btape.c:1078 Test with zero data and bacula block structure.
3573 btape.c:956 Begin writing 3 files of 3.221 GB with blocks of 129024 bytes.
3574 ++++++++++++++++++++++++++++++++++++++++++
3575 btape.c:604 Wrote 1 EOF to "Drive-0" (/dev/nst0)
3576 btape.c:406 Volume bytes=3.221 GB. Write rate = 44.128 MB/s
3577 ...
3578 btape.c:383 Total Volume bytes=9.664 GB. Total Write rate = 43.531 MB/s
3579
3580 btape.c:1090 Test with random data, should give the minimum throughput.
3581 btape.c:956 Begin writing 3 files of 3.221 GB with blocks of 129024 bytes.
3582 +++++++++++++++++++++++++++++++++++++++++++
3583 btape.c:604 Wrote 1 EOF to "Drive-0" (/dev/nst0)
3584 btape.c:406 Volume bytes=3.221 GB. Write rate = 7.271 MB/s
3585 +++++++++++++++++++++++++++++++++++++++++++
3586 ...
3587 btape.c:383 Total Volume bytes=9.664 GB. Total Write rate = 7.365 MB/s
3588
3589 \end{verbatim}
3590
3591 When using compression, the random test will give your the minimum throughput
3592 of your drive . The test using constant string will give you the maximum speed
3593 of your hardware chain. (CPU, memory, SCSI card, cable, drive, tape).
3594
3595 You can change the block size in the Storage Daemon configuration file.
3596
3597 \subsection{New {\bf Block Checksum} Device Directive}
3598 You may now turn off the Block Checksum (CRC32) code
3599 that Bacula uses when writing blocks to a Volume.  This is
3600 done by adding:
3601
3602 \begin{verbatim}
3603 Block Checksum = no
3604 \end{verbatim}
3605
3606 doing so can reduce the Storage daemon CPU usage slightly.  It
3607 will also permit Bacula to read a Volume that has corrupted data.
3608
3609 The default is {\bf yes} -- i.e. the checksum is computed on write
3610 and checked on read. 
3611
3612 We do not recommend to turn this off particularly on older tape
3613 drives or for disk Volumes where doing so may allow corrupted data
3614 to go undetected.
3615
3616 \subsection{New Bat Features}
3617
3618 Those new features were funded by Bacula Systems.
3619
3620 \subsubsection{Media List View}
3621
3622 By clicking on ``Media'', you can see the list of all your volumes. You will be
3623 able to filter by Pool, Media Type, Location,\dots And sort the result directly
3624 in the table. The old ``Media'' view is now known as ``Pool''.
3625 \begin{figure}[htbp]
3626   \centering
3627   \includegraphics[width=0.8\linewidth]{bat-mediaview}
3628   \label{fig:mediaview}
3629 \end{figure}
3630
3631
3632 \subsubsection{Media Information View}
3633
3634 By double-clicking on a volume (on the Media list, in the Autochanger content
3635 or in the Job information panel), you can access a detailed overview of your
3636 Volume. (cf figure \vref{fig:mediainfo}.)
3637 \begin{figure}[htbp]
3638   \centering
3639   \includegraphics[width=0.8\linewidth]{bat11}  
3640   \caption{Media information}
3641   \label{fig:mediainfo}
3642 \end{figure}
3643
3644 \subsubsection{Job Information View}
3645
3646 By double-clicking on a Job record (on the Job run list or in the Media
3647 information panel), you can access a detailed overview of your Job. (cf
3648 figure \vref{fig:jobinfo}.)
3649 \begin{figure}[htbp]
3650   \centering
3651   \includegraphics[width=0.8\linewidth]{bat12}  
3652   \caption{Job information}
3653   \label{fig:jobinfo}
3654 \end{figure}
3655
3656 \subsubsection{Autochanger Content View}
3657
3658 By double-clicking on a Storage record (on the Storage list panel), you can
3659 access a detailed overview of your Autochanger. (cf figure \vref{fig:jobinfo}.)
3660 \begin{figure}[htbp]
3661   \centering
3662   \includegraphics[width=0.8\linewidth]{bat13}  
3663   \caption{Autochanger content}
3664   \label{fig:achcontent}
3665 \end{figure}
3666
3667 To use this feature, you need to use the latest mtx-changer script
3668 version. (With new \texttt{listall} and \texttt{transfer} commands)
3669
3670 \subsection{Bat on Windows}
3671 We have ported {\bf bat} to Windows and it is now installed 
3672 by default when the installer is run.  It works quite well 
3673 on Win32, but has not had a lot of testing there, so your
3674 feedback would be welcome.  Unfortunately, even though it is
3675 installed by default, it does not yet work on 64 bit Windows
3676 operating systems.
3677
3678 \subsection{New Win32 Installer}
3679 The Win32 installer has been modified in several very important
3680 ways.  
3681 \begin{itemize}
3682 \item You must deinstall any current version of the
3683 Win32 File daemon before upgrading to the new one. 
3684 If you forget to do so, the new installation will fail.
3685 To correct this failure, you must manually shutdown 
3686 and deinstall the old File daemon. 
3687 \item All files (other than menu links) are installed
3688 in {\bf c:/Program Files/Bacula}.  
3689 \item The installer no longer sets this
3690 file to require administrator privileges by default. If you want
3691 to do so, please do it manually using the {\bf cacls} program.
3692 For example:
3693 \begin{verbatim}
3694 cacls "C:\Program Files\Bacula" /T /G SYSTEM:F Administrators:F
3695 \end{verbatim}
3696 \item The server daemons (Director and Storage daemon) are
3697 no longer included in the Windows installer.  If you want the
3698 Windows servers, you will either need to build them yourself (note
3699 they have not been ported to 64 bits), or you can contact 
3700 Bacula Systems about this.
3701 \end{itemize}
3702
3703 \subsection{Win64 Installer}
3704 We have corrected a number of problems that required manual
3705 editing of the conf files.  In most cases, it should now
3706 install and work.  {\bf bat} is by default installed in
3707 {\bf c:/Program Files/Bacula/bin32} rather than
3708 {\bf c:/Program Files/Bacula} as is the case with the 32
3709 bit Windows installer.
3710
3711 \subsection{Linux Bare Metal Recovery USB Key}
3712 We have made a number of significant improvements in the
3713 Bare Metal Recovery USB key.  Please see the README files
3714 it the {\bf rescue} release for more details.  
3715
3716 We are working on an equivalent USB key for Windows bare
3717 metal recovery, but it will take some time to develop it (best
3718 estimate 3Q2010 or 4Q2010)
3719
3720
3721 \subsection{bconsole Timeout Option}
3722 You can now use the -u option of {\bf bconsole} to set a timeout in seconds
3723 for commands. This is useful with GUI programs that use {\bf bconsole}
3724 to interface to the Director.
3725
3726 \subsection{Important Changes}
3727 \label{sec:importantchanges}
3728
3729 \begin{itemize}
3730 \item You are now allowed to Migrate, Copy, and Virtual Full to read and write
3731   to the same Pool. The Storage daemon ensures that you do not read and
3732   write to the same Volume.
3733 \item The \texttt{Device Poll Interval} is now 5 minutes. (previously did not
3734   poll by default).
3735 \item Virtually all the features of {\bf mtx-changer} have
3736   now been parametrized, which allows you to configure
3737   mtx-changer without changing it. There is a new configuration file {\bf mtx-changer.conf} 
3738   that contains variables that you can set to configure mtx-changer.
3739   This configuration file will not be overwritten during upgrades.
3740   We encourage you to submit any changes
3741   that are made to mtx-changer and to parametrize it all in
3742   mtx-changer.conf so that all configuration will be done by
3743   changing only mtx-changer.conf.
3744 \item The new \texttt{mtx-changer} script has two new options, \texttt{listall}
3745   and \texttt{transfer}. Please configure them as appropriate
3746   in mtx-changer.conf.
3747 \item To enhance security of the \texttt{BackupCatalog} job, we provide a new
3748   script (\texttt{make\_catalog\_backup.pl}) that does not expose your catalog
3749   password. If you want to use the new script, you will need to 
3750   manually change the \texttt{BackupCatalog} Job definition.
3751 \item The \texttt{bconsole} \texttt{help} command now accepts
3752   an argument, which if provided produces information on that
3753   command (ex: \texttt{help run}).
3754 \end{itemize}
3755
3756
3757 \subsubsection*{Truncate volume after purge}
3758
3759 Note that the Truncate Volume after purge feature doesn't work as expected
3760 in 5.0.0 version. Please, don't use it before version 5.0.1.
3761
3762 \subsubsection{Custom Catalog queries}
3763
3764 If you wish to add specialized commands that list the contents of the catalog,
3765 you can do so by adding them to the \texttt{query.sql} file. This
3766 \texttt{query.sql} file is now empty by default.  The file
3767 \texttt{examples/sample-query.sql} has an a number of sample commands
3768 you might find useful.
3769
3770 \subsubsection{Deprecated parts}
3771
3772 The following items have been \textbf{deprecated} for a long time, and are now
3773 removed from the code.
3774 \begin{itemize}
3775 \item Gnome console
3776 \item Support for SQLite 2
3777 \end{itemize}
3778
3779 \subsection{Misc Changes}
3780 \label{sec:miscchanges}
3781
3782 \begin{itemize}
3783 \item Updated Nagios check\_bacula
3784 \item Updated man files
3785 \item Added OSX package generation script in platforms/darwin
3786 \item Added Spanish and Ukrainian Bacula translations
3787 \item Enable/disable command shows only Jobs that can change
3788 \item Added \texttt{show disabled} command to show disabled Jobs
3789 \item Many ACL improvements
3790 \item Added Level to FD status Job output
3791 \item Begin Ingres DB driver (not yet working)
3792 \item Split RedHat spec files into bacula, bat, mtx, and docs
3793 \item Reorganized the manuals (fewer separate manuals)
3794 \item Added lock/unlock order protection in lock manager
3795 \item Allow 64 bit sizes for a number of variables
3796 \item Fixed several deadlocks or potential race conditions in the SD
3797 \end{itemize}
3798
3799 \chapter{Released Version 3.0.3 and 3.0.3a}
3800
3801 There are no new features in version 3.0.3.  This version simply fixes a
3802 number of bugs found in version 3.0.2 during the ongoing development
3803 process.
3804
3805 \section{New Features in Released Version 3.0.2}
3806
3807 This chapter presents the new features added to the
3808 Released Bacula Version 3.0.2.
3809
3810 \subsection{Full Restore from a Given JobId}
3811 \index[general]{Restore menu}
3812
3813 This feature allows selecting a single JobId and having Bacula
3814 automatically select all the other jobs that comprise a full backup up to
3815 and including the selected date (through JobId).
3816
3817 Assume we start with the following jobs:
3818 \begin{verbatim}
3819 +-------+--------------+---------------------+-------+----------+------------+
3820 | jobid | client       | starttime           | level | jobfiles | jobbytes   |
3821 +-------+--------------+---------------------+-------+----------+------------
3822 | 6     | localhost-fd | 2009-07-15 11:45:49 | I     | 2        | 0          |
3823 | 5     | localhost-fd | 2009-07-15 11:45:45 | I     | 15       | 44143      |
3824 | 3     | localhost-fd | 2009-07-15 11:45:38 | I     | 1        | 10         |
3825 | 1     | localhost-fd | 2009-07-15 11:45:30 | F     | 1527     | 44143073   |
3826 +-------+--------------+---------------------+-------+----------+------------+
3827 \end{verbatim}
3828
3829 Below is an example of this new feature (which is number 12 in the
3830 menu).
3831
3832 \begin{verbatim}
3833 * restore
3834 To select the JobIds, you have the following choices:
3835      1: List last 20 Jobs run
3836      2: List Jobs where a given File is saved
3837 ...
3838     12: Select full restore to a specified Job date
3839     13: Cancel
3840
3841 Select item:  (1-13): 12
3842 Enter JobId to get the state to restore: 5
3843 Selecting jobs to build the Full state at 2009-07-15 11:45:45
3844 You have selected the following JobIds: 1,3,5
3845
3846 Building directory tree for JobId(s) 1,3,5 ...  +++++++++++++++++++
3847 1,444 files inserted into the tree.
3848 \end{verbatim}
3849
3850 This project was funded by Bacula Systems.
3851
3852 \subsection{Source Address}
3853 \index[general]{Source Address}
3854
3855 A feature has been added which allows the administrator to specify the address
3856 from which the Director and File daemons will establish connections.  This
3857 may be used to simplify system configuration overhead when working in complex
3858 networks utilizing multi-homing and policy-routing.
3859
3860 To accomplish this, two new configuration directives have been implemented:
3861 \begin{verbatim}
3862 FileDaemon {
3863   FDSourceAddress=10.0.1.20    # Always initiate connections from this address
3864 }
3865
3866 Director {
3867   DirSourceAddress=10.0.1.10   # Always initiate connections from this address
3868 }
3869 \end{verbatim}
3870
3871 Simply adding specific host routes on the OS
3872 would have an undesirable side-effect: any
3873 application trying to contact the destination host would be forced to use the
3874 more specific route possibly diverting management traffic onto a backup VLAN.
3875 Instead of adding host routes for each client connected to a multi-homed backup
3876 server (for example where there are management and backup VLANs), one can
3877 use the new directives to specify a specific source address at the application
3878 level.
3879
3880 Additionally, this allows the simplification and abstraction of firewall rules
3881 when dealing with a Hot-Standby director or storage daemon configuration.  The
3882 Hot-standby pair may share a CARP address, which connections must be sourced
3883 from, while system services listen and act from the unique interface addresses.
3884
3885 This project was funded by Collaborative Fusion, Inc.
3886
3887 \subsection{Show volume availability when doing restore}
3888
3889 When doing a restore the selection dialog ends by displaying this
3890 screen:
3891
3892 \begin{verbatim}
3893   The job will require the following
3894    Volume(s)                 Storage(s)                SD Device(s)
3895    ===========================================================================
3896    *000741L3                  LTO-4                     LTO3 
3897    *000866L3                  LTO-4                     LTO3 
3898    *000765L3                  LTO-4                     LTO3 
3899    *000764L3                  LTO-4                     LTO3 
3900    *000756L3                  LTO-4                     LTO3 
3901    *001759L3                  LTO-4                     LTO3 
3902    *001763L3                  LTO-4                     LTO3 
3903     001762L3                  LTO-4                     LTO3 
3904     001767L3                  LTO-4                     LTO3 
3905
3906 Volumes marked with ``*'' are online (in the autochanger).
3907 \end{verbatim}
3908
3909 This should help speed up large restores by minimizing the time spent
3910 waiting for the operator to discover that he must change tapes in the library.
3911
3912 This project was funded by Bacula Systems.
3913
3914 \subsection{Accurate estimate command}
3915
3916 The \texttt{estimate} command can now use the accurate code to detect changes
3917 and give a better estimation.
3918
3919 You can set the accurate behavior on the command line by using
3920 \texttt{accurate=yes\vb{}no} or use the Job setting as default value.
3921
3922 \begin{verbatim}
3923 * estimate listing accurate=yes level=incremental job=BackupJob
3924 \end{verbatim}
3925
3926 This project was funded by Bacula Systems.
3927
3928 \section{New Features in 3.0.0}
3929 \label{NewFeaturesChapter}
3930 \index[general]{New Features}
3931
3932 This chapter presents the new features added to the development 2.5.x
3933 versions to be released as Bacula version 3.0.0 sometime in April 2009.
3934
3935 \subsection{Accurate Backup}
3936 \index[general]{Accurate Backup}
3937
3938 As with most other backup programs, by default Bacula decides what files to
3939 backup for Incremental and Differential backup by comparing the change
3940 (st\_ctime) and modification (st\_mtime) times of the file to the time the last
3941 backup completed.  If one of those two times is later than the last backup
3942 time, then the file will be backed up.  This does not, however, permit tracking
3943 what files have been deleted and will miss any file with an old time that may
3944 have been restored to or moved onto the client filesystem.
3945
3946 \subsubsection{Accurate = \lt{}yes\vb{}no\gt{}}
3947 If the {\bf Accurate = \lt{}yes\vb{}no\gt{}} directive is enabled (default no) in
3948 the Job resource, the job will be run as an Accurate Job. For a {\bf Full}
3949 backup, there is no difference, but for {\bf Differential} and {\bf
3950   Incremental} backups, the Director will send a list of all previous files
3951 backed up, and the File daemon will use that list to determine if any new files
3952 have been added or or moved and if any files have been deleted. This allows
3953 Bacula to make an accurate backup of your system to that point in time so that
3954 if you do a restore, it will restore your system exactly.  
3955
3956 One note of caution
3957 about using Accurate backup is that it requires more resources (CPU and memory)
3958 on both the Director and the Client machines to create the list of previous
3959 files backed up, to send that list to the File daemon, for the File daemon to
3960 keep the list (possibly very big) in memory, and for the File daemon to do
3961 comparisons between every file in the FileSet and the list.  In particular,
3962 if your client has lots of files (more than a few million), you will need
3963 lots of memory on the client machine.
3964
3965 Accurate must not be enabled when backing up with a plugin that is not
3966 specially designed to work with Accurate. If you enable it, your restores
3967 will probably not work correctly.
3968
3969 This project was funded by Bacula Systems.
3970                                        
3971
3972
3973 \subsection{Copy Jobs}
3974 \index[general]{Copy Jobs}
3975
3976 A new {\bf Copy} job type 'C' has been implemented. It is similar to the
3977 existing Migration feature with the exception that the Job that is copied is
3978 left unchanged.  This essentially creates two identical copies of the same
3979 backup. However, the copy is treated as a copy rather than a backup job, and
3980 hence is not directly available for restore.  The {\bf restore} command lists
3981 copy jobs and allows selection of copies by using \texttt{jobid=}
3982 option. If the keyword {\bf copies} is present on the command line, Bacula will
3983 display the list of all copies for selected jobs.
3984
3985 \begin{verbatim}
3986 * restore copies
3987 [...]
3988 These JobIds have copies as follows:
3989 +-------+------------------------------------+-----------+------------------+
3990 | JobId | Job                                | CopyJobId | MediaType        |
3991 +-------+------------------------------------+-----------+------------------+
3992 | 2     | CopyJobSave.2009-02-17_16.31.00.11 | 7         | DiskChangerMedia |
3993 +-------+------------------------------------+-----------+------------------+
3994 +-------+-------+----------+----------+---------------------+------------------+
3995 | JobId | Level | JobFiles | JobBytes | StartTime           | VolumeName       |
3996 +-------+-------+----------+----------+---------------------+------------------+
3997 | 19    | F     | 6274     | 76565018 | 2009-02-17 16:30:45 | ChangerVolume002 |
3998 | 2     | I     | 1        | 5        | 2009-02-17 16:30:51 | FileVolume001    |
3999 +-------+-------+----------+----------+---------------------+------------------+
4000 You have selected the following JobIds: 19,2
4001
4002 Building directory tree for JobId(s) 19,2 ...  ++++++++++++++++++++++++++++++++++++++++++++
4003 5,611 files inserted into the tree.
4004 ...
4005 \end{verbatim}
4006
4007
4008 The Copy Job runs without using the File daemon by copying the data from the
4009 old backup Volume to a different Volume in a different Pool. See the Migration
4010 documentation for additional details. For copy Jobs there is a new selection
4011 directive named {\bf PoolUncopiedJobs} which selects all Jobs that were
4012 not already copied to another Pool. 
4013
4014 As with Migration, the Client, Volume, Job, or SQL query, are
4015 other possible ways of selecting the Jobs to be copied. Selection
4016 types like SmallestVolume, OldestVolume, PoolOccupancy and PoolTime also
4017 work, but are probably more suited for Migration Jobs. 
4018
4019 If Bacula finds a Copy of a job record that is purged (deleted) from the catalog,
4020 it will promote the Copy to a \textsl{real} backup job and will make it available for
4021 automatic restore. If more than one Copy is available, it will promote the copy
4022 with the smallest JobId.
4023
4024 A nice solution which can be built with the new Copy feature is often
4025 called disk-to-disk-to-tape backup (DTDTT). A sample config could
4026 look something like the one below:
4027
4028 \begin{verbatim}
4029 Pool {
4030   Name = FullBackupsVirtualPool
4031   Pool Type = Backup
4032   Purge Oldest Volume = Yes
4033   Storage = vtl
4034   NextPool = FullBackupsTapePool
4035 }
4036
4037 Pool {
4038   Name = FullBackupsTapePool
4039   Pool Type = Backup
4040   Recycle = Yes
4041   AutoPrune = Yes
4042   Volume Retention = 365 days
4043   Storage = superloader
4044 }
4045
4046 #
4047 # Fake fileset for copy jobs
4048 #
4049 Fileset {
4050   Name = None
4051   Include {
4052     Options {
4053       signature = MD5
4054     }
4055   }
4056 }
4057
4058 #
4059 # Fake client for copy jobs
4060 #
4061 Client {
4062   Name = None
4063   Address = localhost
4064   Password = "NoNe"
4065   Catalog = MyCatalog
4066 }
4067
4068 #
4069 # Default template for a CopyDiskToTape Job
4070 #
4071 JobDefs {
4072   Name = CopyDiskToTape
4073   Type = Copy
4074   Messages = StandardCopy
4075   Client = None
4076   FileSet = None
4077   Selection Type = PoolUncopiedJobs
4078   Maximum Concurrent Jobs = 10
4079   SpoolData = No
4080   Allow Duplicate Jobs = Yes
4081   Cancel Queued Duplicates = No
4082   Cancel Running Duplicates = No
4083   Priority = 13
4084 }
4085
4086 Schedule {
4087    Name = DaySchedule7:00
4088    Run = Level=Full daily at 7:00
4089 }
4090
4091 Job {
4092   Name = CopyDiskToTapeFullBackups
4093   Enabled = Yes
4094   Schedule = DaySchedule7:00
4095   Pool = FullBackupsVirtualPool
4096   JobDefs = CopyDiskToTape
4097 }
4098 \end{verbatim}
4099
4100 The example above had 2 pool which are copied using the PoolUncopiedJobs
4101 selection criteria. Normal Full backups go to the Virtual pool and are copied
4102 to the Tape pool the next morning.
4103
4104 The command \texttt{list copies [jobid=x,y,z]} lists copies for a given
4105 \textbf{jobid}.
4106
4107 \begin{verbatim}
4108 *list copies
4109 +-------+------------------------------------+-----------+------------------+
4110 | JobId | Job                                | CopyJobId | MediaType        |
4111 +-------+------------------------------------+-----------+------------------+
4112 |     9 | CopyJobSave.2008-12-20_22.26.49.05 |        11 | DiskChangerMedia |
4113 +-------+------------------------------------+-----------+------------------+
4114 \end{verbatim}
4115
4116 \subsection{ACL Updates}
4117 \index[general]{ACL Updates}
4118 The whole ACL code had been overhauled and in this version each platforms has
4119 different streams for each type of acl available on such an platform. As ACLs
4120 between platforms tend to be not that portable (most implement POSIX acls but
4121 some use an other draft or a completely different format) we currently only
4122 allow certain platform specific ACL streams to be decoded and restored on the
4123 same platform that they were created on.  The old code allowed to restore ACL
4124 cross platform but the comments already mention that not being to wise. For
4125 backward compatibility the new code will accept the two old ACL streams and
4126 handle those with the platform specific handler. But for all new backups it
4127 will save the ACLs using the new streams.
4128
4129 Currently the following platforms support ACLs:
4130
4131 \begin{itemize}
4132  \item {\bf AIX}
4133  \item {\bf Darwin/OSX}
4134  \item {\bf FreeBSD}
4135  \item {\bf HPUX}
4136  \item {\bf IRIX}
4137  \item {\bf Linux}
4138  \item {\bf Tru64}
4139  \item {\bf Solaris}
4140 \end{itemize}
4141
4142 Currently we support the following ACL types (these ACL streams use a reserved
4143 part of the stream numbers):
4144
4145 \begin{itemize}
4146 \item {\bf STREAM\_ACL\_AIX\_TEXT} 1000 AIX specific string representation from
4147   acl\_get
4148  \item {\bf STREAM\_ACL\_DARWIN\_ACCESS\_ACL} 1001 Darwin (OSX) specific acl\_t
4149    string representation from acl\_to\_text (POSIX acl)
4150   \item {\bf STREAM\_ACL\_FREEBSD\_DEFAULT\_ACL} 1002 FreeBSD specific acl\_t
4151     string representation from acl\_to\_text (POSIX acl) for default acls.
4152   \item {\bf STREAM\_ACL\_FREEBSD\_ACCESS\_ACL} 1003 FreeBSD specific acl\_t
4153     string representation from acl\_to\_text (POSIX acl) for access acls.
4154   \item {\bf STREAM\_ACL\_HPUX\_ACL\_ENTRY} 1004 HPUX specific acl\_entry
4155     string representation from acltostr (POSIX acl)
4156   \item {\bf STREAM\_ACL\_IRIX\_DEFAULT\_ACL} 1005 IRIX specific acl\_t string
4157     representation from acl\_to\_text (POSIX acl) for default acls.
4158   \item {\bf STREAM\_ACL\_IRIX\_ACCESS\_ACL} 1006 IRIX specific acl\_t string
4159     representation from acl\_to\_text (POSIX acl) for access acls.
4160   \item {\bf STREAM\_ACL\_LINUX\_DEFAULT\_ACL} 1007 Linux specific acl\_t
4161     string representation from acl\_to\_text (POSIX acl) for default acls.
4162   \item {\bf STREAM\_ACL\_LINUX\_ACCESS\_ACL} 1008 Linux specific acl\_t string
4163     representation from acl\_to\_text (POSIX acl) for access acls.
4164   \item {\bf STREAM\_ACL\_TRU64\_DEFAULT\_ACL} 1009 Tru64 specific acl\_t
4165     string representation from acl\_to\_text (POSIX acl) for default acls.
4166   \item {\bf STREAM\_ACL\_TRU64\_DEFAULT\_DIR\_ACL} 1010 Tru64 specific acl\_t
4167     string representation from acl\_to\_text (POSIX acl) for default acls.
4168   \item {\bf STREAM\_ACL\_TRU64\_ACCESS\_ACL} 1011 Tru64 specific acl\_t string
4169     representation from acl\_to\_text (POSIX acl) for access acls.
4170   \item {\bf STREAM\_ACL\_SOLARIS\_ACLENT} 1012 Solaris specific aclent\_t
4171     string representation from acltotext or acl\_totext (POSIX acl)
4172   \item {\bf STREAM\_ACL\_SOLARIS\_ACE} 1013 Solaris specific ace\_t string
4173     representation from from acl\_totext (NFSv4 or ZFS acl)
4174 \end{itemize}
4175
4176 In future versions we might support conversion functions from one type of acl
4177 into an other for types that are either the same or easily convertible. For now
4178 the streams are separate and restoring them on a platform that doesn't
4179 recognize them will give you a warning.
4180
4181 \subsection{Extended Attributes}
4182 \index[general]{Extended Attributes}
4183 Something that was on the project list for some time is now implemented for
4184 platforms that support a similar kind of interface. Its the support for backup
4185 and restore of so called extended attributes. As extended attributes are so
4186 platform specific these attributes are saved in separate streams for each
4187 platform.  Restores of the extended attributes can only be performed on the
4188 same platform the backup was done.  There is support for all types of extended
4189 attributes, but restoring from one type of filesystem onto an other type of
4190 filesystem on the same platform may lead to surprises.  As extended attributes
4191 can contain any type of data they are stored as a series of so called
4192 value-pairs.  This data must be seen as mostly binary and is stored as such.
4193 As security labels from selinux are also extended attributes this option also
4194 stores those labels and no specific code is enabled for handling selinux
4195 security labels.
4196
4197 Currently the following platforms support extended attributes:
4198 \begin{itemize}
4199  \item {\bf Darwin/OSX}
4200  \item {\bf FreeBSD}
4201  \item {\bf Linux}
4202  \item {\bf NetBSD}
4203 \end{itemize}
4204
4205 On Linux acls are also extended attributes, as such when you enable ACLs on a
4206 Linux platform it will NOT save the same data twice e.g. it will save the ACLs
4207 and not the same extended attribute.
4208
4209 To enable the backup of extended attributes please add the following to your
4210 fileset definition.
4211 \begin{verbatim}
4212   FileSet {
4213     Name = "MyFileSet"
4214     Include {
4215       Options {
4216         signature = MD5
4217         xattrsupport = yes
4218       }
4219       File = ...
4220     }
4221   }
4222 \end{verbatim}
4223
4224 \subsection{Shared objects}
4225 \index[general]{Shared objects}
4226 A default build of Bacula will now create the libraries as shared objects
4227 (.so) rather than static libraries as was previously the case.  
4228 The shared libraries are built using {\bf libtool} so it should be quite
4229 portable.
4230
4231 An important advantage of using shared objects is that on a machine with the
4232 Directory, File daemon, the Storage daemon, and a console, you will have only
4233 one copy of the code in memory rather than four copies.  Also the total size of
4234 the binary release is smaller since the library code appears only once rather
4235 than once for every program that uses it; this results in significant reduction
4236 in the size of the binaries particularly for the utility tools.
4237  
4238 In order for the system loader to find the shared objects when loading the
4239 Bacula binaries, the Bacula shared objects must either be in a shared object
4240 directory known to the loader (typically /usr/lib) or they must be in the
4241 directory that may be specified on the {\bf ./configure} line using the {\bf
4242   {-}{-}libdir} option as:
4243
4244 \begin{verbatim}
4245   ./configure --libdir=/full-path/dir
4246 \end{verbatim}
4247
4248 the default is /usr/lib. If {-}{-}libdir is specified, there should be
4249 no need to modify your loader configuration provided that
4250 the shared objects are installed in that directory (Bacula
4251 does this with the make install command). The shared objects
4252 that Bacula references are:
4253
4254 \begin{verbatim}
4255 libbaccfg.so
4256 libbacfind.so
4257 libbacpy.so
4258 libbac.so
4259 \end{verbatim}
4260
4261 These files are symbolically linked to the real shared object file,
4262 which has a version number to permit running multiple versions of
4263 the libraries if desired (not normally the case).
4264
4265 If you have problems with libtool or you wish to use the old
4266 way of building static libraries, or you want to build a static
4267 version of Bacula you may disable
4268 libtool on the configure command line with:
4269
4270 \begin{verbatim}
4271   ./configure --disable-libtool
4272 \end{verbatim}
4273
4274
4275 \subsection{Building Static versions of Bacula}
4276 \index[general]{Static linking}
4277 In order to build static versions of Bacula, in addition
4278 to configuration options that were needed you now must
4279 also add --disable-libtool.  Example
4280
4281 \begin{verbatim}
4282   ./configure --enable-static-client-only --disable-libtool
4283 \end{verbatim}
4284
4285
4286 \subsection{Virtual Backup (Vbackup)}
4287 \index[general]{Virtual Backup}
4288 \index[general]{Vbackup}
4289
4290 Bacula's virtual backup feature is often called Synthetic Backup or
4291 Consolidation in other backup products.  It permits you to consolidate the
4292 previous Full backup plus the most recent Differential backup and any
4293 subsequent Incremental backups into a new Full backup.  This new Full
4294 backup will then be considered as the most recent Full for any future
4295 Incremental or Differential backups.  The VirtualFull backup is
4296 accomplished without contacting the client by reading the previous backup
4297 data and writing it to a volume in a different pool.
4298
4299 In some respects the Vbackup feature works similar to a Migration job, in
4300 that Bacula normally reads the data from the pool specified in the 
4301 Job resource, and writes it to the {\bf Next Pool} specified in the 
4302 Job resource. Note, this means that usually the output from the Virtual
4303 Backup is written into a different pool from where your prior backups
4304 are saved. Doing it this way guarantees that you will not get a deadlock
4305 situation attempting to read and write to the same volume in the Storage
4306 daemon. If you then want to do subsequent backups, you may need to
4307 move the Virtual Full Volume back to your normal backup pool.
4308 Alternatively, you can set your {\bf Next Pool} to point to the current
4309 pool.  This will cause Bacula to read and write to Volumes in the
4310 current pool. In general, this will work, because Bacula will
4311 not allow reading and writing on the same Volume. In any case, once
4312 a VirtualFull has been created, and a restore is done involving the
4313 most current Full, it will read the Volume or Volumes by the VirtualFull 
4314 regardless of in which Pool the Volume is found.
4315
4316 The Vbackup is enabled on a Job by Job in the Job resource by specifying
4317 a level of {\bf VirtualFull}.
4318
4319 A typical Job resource definition might look like the following:
4320
4321 \begin{verbatim}
4322 Job {
4323   Name = "MyBackup"
4324   Type = Backup
4325   Client=localhost-fd
4326   FileSet = "Full Set"
4327   Storage = File
4328   Messages = Standard
4329   Pool = Default
4330   SpoolData = yes
4331 }
4332
4333 # Default pool definition
4334 Pool {
4335   Name = Default
4336   Pool Type = Backup
4337   Recycle = yes            # Automatically recycle Volumes
4338   AutoPrune = yes          # Prune expired volumes
4339   Volume Retention = 365d  # one year
4340   NextPool = Full
4341   Storage = File
4342 }
4343
4344 Pool {
4345   Name = Full
4346   Pool Type = Backup
4347   Recycle = yes            # Automatically recycle Volumes
4348   AutoPrune = yes          # Prune expired volumes
4349   Volume Retention = 365d  # one year
4350   Storage = DiskChanger
4351 }
4352
4353 # Definition of file storage device
4354 Storage {
4355   Name = File
4356   Address = localhost
4357   Password = "xxx"
4358   Device = FileStorage
4359   Media Type = File
4360   Maximum Concurrent Jobs = 5
4361 }
4362
4363 # Definition of DDS Virtual tape disk storage device
4364 Storage {
4365   Name = DiskChanger
4366   Address = localhost  # N.B. Use a fully qualified name here
4367   Password = "yyy"
4368   Device = DiskChanger
4369   Media Type = DiskChangerMedia
4370   Maximum Concurrent Jobs = 4
4371   Autochanger = yes
4372 }
4373 \end{verbatim}
4374
4375 Then in bconsole or via a Run schedule, you would run the job as:
4376
4377 \begin{verbatim}
4378 run job=MyBackup level=Full
4379 run job=MyBackup level=Incremental
4380 run job=MyBackup level=Differential
4381 run job=MyBackup level=Incremental
4382 run job=MyBackup level=Incremental
4383 \end{verbatim}
4384
4385 So providing there were changes between each of those jobs, you would end up
4386 with a Full backup, a Differential, which includes the first Incremental
4387 backup, then two Incremental backups.  All the above jobs would be written to
4388 the {\bf Default} pool.
4389
4390 To consolidate those backups into a new Full backup, you would run the
4391 following:
4392
4393 \begin{verbatim}
4394 run job=MyBackup level=VirtualFull
4395 \end{verbatim}
4396
4397 And it would produce a new Full backup without using the client, and the output
4398 would be written to the {\bf Full} Pool which uses the Diskchanger Storage.
4399
4400 If the Virtual Full is run, and there are no prior Jobs, the Virtual Full will
4401 fail with an error.
4402
4403 Note, the Start and End time of the Virtual Full backup is set to the
4404 values for the last job included in the Virtual Full (in the above example,
4405 it is an Increment). This is so that if another incremental is done, which
4406 will be based on the Virtual Full, it will backup all files from the
4407 last Job included in the Virtual Full rather than from the time the Virtual
4408 Full was actually run.
4409
4410
4411
4412 \subsection{Catalog Format}
4413 \index[general]{Catalog Format}
4414 Bacula 3.0 comes with some changes to the catalog format.  The upgrade
4415 operation will convert the FileId field of the File table from 32 bits (max 4
4416 billion table entries) to 64 bits (very large number of items).  The
4417 conversion process can take a bit of time and will likely DOUBLE THE SIZE of
4418 your catalog during the conversion.  Also you won't be able to run jobs during
4419 this conversion period.  For example, a 3 million file catalog will take 2
4420 minutes to upgrade on a normal machine.  Please don't forget to make a valid
4421 backup of your database before executing the upgrade script. See the 
4422 ReleaseNotes for additional details.
4423
4424 \subsection{64 bit Windows Client}
4425 \index[general]{Win64 Client}
4426 Unfortunately, Microsoft's implementation of Volume Shadown Copy (VSS) on
4427 their 64 bit OS versions is not compatible with a 32 bit Bacula Client.
4428 As a consequence, we are also releasing a 64 bit version of the Bacula 
4429 Windows Client (win64bacula-3.0.0.exe) that does work with VSS. 
4430 These binaries should only be installed on 64 bit Windows operating systems.
4431 What is important is not your hardware but whether or not you have
4432 a 64 bit version of the Windows OS.  
4433
4434 Compared to the Win32 Bacula Client, the 64 bit release contains a few differences:
4435 \begin{enumerate}
4436 \item Before installing the Win64 Bacula Client, you must totally
4437       deinstall any prior 2.4.x Client installation using the 
4438       Bacula deinstallation (see the menu item). You may want
4439       to save your .conf files first.
4440 \item Only the Client (File daemon) is ported to Win64, the Director
4441       and the Storage daemon are not in the 64 bit Windows installer.
4442 \item bwx-console is not yet ported.
4443 \item bconsole is ported but it has not been tested.
4444 \item The documentation is not included in the installer.
4445 \item Due to Vista security restrictions imposed on a default installation
4446       of Vista, before upgrading the Client, you must manually stop
4447       any prior version of Bacula from running, otherwise the install
4448       will fail.
4449 \item Due to Vista security restrictions imposed on a default installation
4450       of Vista, attempting to edit the conf files via the menu items
4451       will fail. You must directly edit the files with appropriate 
4452       permissions.  Generally double clicking on the appropriate .conf
4453       file will work providing you have sufficient permissions.
4454 \item All Bacula files are now installed in 
4455       {\bf C:/Program Files/Bacula} except the main menu items,
4456       which are installed as before. This vastly simplifies the installation.
4457 \item If you are running on a foreign language version of Windows, most
4458       likely {\bf C:/Program Files} does not exist, so you should use the
4459       Custom installation and enter an appropriate location to install
4460       the files.
4461 \item The 3.0.0 Win32 Client continues to install files in the locations used
4462       by prior versions. For the next version we will convert it to use
4463       the same installation conventions as the Win64 version.
4464 \end{enumerate}
4465
4466 This project was funded by Bacula Systems.
4467
4468
4469 \subsection{Duplicate Job Control}
4470 \index[general]{Duplicate Jobs}
4471 The new version of Bacula provides four new directives that
4472 give additional control over what Bacula does if duplicate jobs 
4473 are started.  A duplicate job in the sense we use it here means
4474 a second or subsequent job with the same name starts.  This
4475 happens most frequently when the first job runs longer than expected because no 
4476 tapes are available.
4477
4478 The four directives each take as an argument a {\bf yes} or {\bf no} value and
4479 are specified in the Job resource.
4480
4481 They are:
4482
4483 \subsubsection{Allow Duplicate Jobs = \lt{}yes\vb{}no\gt{}}
4484 \index[general]{Allow Duplicate Jobs}
4485   If this directive is set to {\bf yes}, duplicate jobs will be run.  If
4486   the directive is set to {\bf no} (default) then only one job of a given name
4487   may run at one time, and the action that Bacula takes to ensure only
4488   one job runs is determined by the other directives (see below).
4489  
4490   If {\bf Allow Duplicate Jobs} is set to {\bf no} and two jobs
4491   are present and none of the three directives given below permit
4492   Canceling a job, then the current job (the second one started)
4493   will be canceled.
4494
4495 \subsubsection{Allow Higher Duplicates = \lt{}yes\vb{}no\gt{}}
4496 \index[general]{Allow Higher Duplicates}
4497   This directive was in version 5.0.0, but does not work as
4498   expected. If used, it should always be set to no.  In later versions
4499   of Bacula the directive is disabled (disregarded).
4500
4501 \subsubsection{Cancel Running Duplicates = \lt{}yes\vb{}no\gt{}}
4502 \index[general]{Cancel Running Duplicates}
4503   If {\bf Allow Duplicate Jobs} is set to {\bf no} and
4504   if this directive is set to {\bf yes} any job that is already running
4505   will be canceled.  The default is {\bf no}.
4506
4507 \subsubsection{Cancel Queued Duplicates = \lt{}yes\vb{}no\gt{}}
4508 \index[general]{Cancel Queued Duplicates}
4509   If {\bf Allow Duplicate Jobs} is set to {\bf no} and
4510   if this directive is set to {\bf yes} any job that is
4511   already queued to run but not yet running will be canceled.
4512   The default is {\bf no}. 
4513
4514
4515 \subsection{TLS Authentication}
4516 \index[general]{TLS Authentication}
4517 In Bacula version 2.5.x and later, in addition to the normal Bacula
4518 CRAM-MD5 authentication that is used to authenticate each Bacula
4519 connection, you can specify that you want TLS Authentication as well,
4520 which will provide more secure authentication.
4521
4522 This new feature uses Bacula's existing TLS code (normally used for
4523 communications encryption) to do authentication.  To use it, you must
4524 specify all the TLS directives normally used to enable communications
4525 encryption (TLS Enable, TLS Verify Peer, TLS Certificate, ...) and
4526 a new directive:
4527
4528 \subsubsection{TLS Authenticate = yes}
4529 \begin{verbatim}
4530 TLS Authenticate = yes
4531 \end{verbatim}
4532
4533 in the main daemon configuration resource (Director for the Director,
4534 Client for the File daemon, and Storage for the Storage daemon).
4535
4536 When {\bf TLS Authenticate} is enabled, after doing the CRAM-MD5
4537 authentication, Bacula will also do TLS authentication, then TLS 
4538 encryption will be turned off, and the rest of the communication between
4539 the two Bacula daemons will be done without encryption.
4540
4541 If you want to encrypt communications data, use the normal TLS directives
4542 but do not turn on {\bf TLS Authenticate}.
4543
4544 \subsection{bextract non-portable Win32 data}
4545 \index[general]{bextract handles Win32 non-portable data}
4546 {\bf bextract} has been enhanced to be able to restore
4547 non-portable Win32 data to any OS.  Previous versions were 
4548 unable to restore non-portable Win32 data to machines that
4549 did not have the Win32 BackupRead and BackupWrite API calls.
4550
4551 \subsection{State File updated at Job Termination}
4552 \index[general]{State File}
4553 In previous versions of Bacula, the state file, which provides a
4554 summary of previous jobs run in the {\bf status} command output was
4555 updated only when Bacula terminated, thus if the daemon crashed, the
4556 state file might not contain all the run data.  This version of
4557 the Bacula daemons updates the state file on each job termination.
4558
4559 \subsection{MaxFullInterval = \lt{}time-interval\gt{}}
4560 \index[general]{MaxFullInterval}
4561 The new Job resource directive {\bf Max Full Interval = \lt{}time-interval\gt{}}
4562 can be used to specify the maximum time interval between {\bf Full} backup
4563 jobs. When a job starts, if the time since the last Full backup is
4564 greater than the specified interval, and the job would normally be an
4565 {\bf Incremental} or {\bf Differential}, it will be automatically
4566 upgraded to a {\bf Full} backup.
4567
4568 \subsection{MaxDiffInterval = \lt{}time-interval\gt{}}
4569 \index[general]{MaxDiffInterval}
4570 The new Job resource directive {\bf Max Diff Interval = \lt{}time-interval\gt{}}
4571 can be used to specify the maximum time interval between {\bf Differential} backup
4572 jobs. When a job starts, if the time since the last Differential backup is
4573 greater than the specified interval, and the job would normally be an
4574 {\bf Incremental}, it will be automatically
4575 upgraded to a {\bf Differential} backup.
4576
4577 \subsection{Honor No Dump Flag = \lt{}yes\vb{}no\gt{}}
4578 \index[general]{MaxDiffInterval}
4579 On FreeBSD systems, each file has a {\bf no dump flag} that can be set
4580 by the user, and when it is set it is an indication to backup programs
4581 to not backup that particular file.  This version of Bacula contains a
4582 new Options directive within a FileSet resource, which instructs Bacula to
4583 obey this flag.  The new directive is:
4584
4585 \begin{verbatim}
4586   Honor No Dump Flag = yes\vb{}no
4587 \end{verbatim}
4588
4589 The default value is {\bf no}.
4590
4591
4592 \subsection{Exclude Dir Containing = \lt{}filename-string\gt{}}
4593 \index[general]{IgnoreDir}
4594 The {\bf ExcludeDirContaining = \lt{}filename\gt{}} is a new directive that
4595 can be added to the Include section of the FileSet resource.  If the specified
4596 filename ({\bf filename-string}) is found on the Client in any directory to be
4597 backed up, the whole directory will be ignored (not backed up).  For example:
4598
4599 \begin{verbatim}
4600   # List of files to be backed up
4601   FileSet {
4602     Name = "MyFileSet"
4603     Include {
4604       Options {
4605         signature = MD5
4606       }
4607       File = /home
4608       Exclude Dir Containing = .excludeme
4609     }
4610   }
4611 \end{verbatim}
4612
4613 But in /home, there may be hundreds of directories of users and some
4614 people want to indicate that they don't want to have certain
4615 directories backed up. For example, with the above FileSet, if
4616 the user or sysadmin creates a file named {\bf .excludeme} in 
4617 specific directories, such as
4618
4619 \begin{verbatim}
4620    /home/user/www/cache/.excludeme
4621    /home/user/temp/.excludeme
4622 \end{verbatim}
4623
4624 then Bacula will not backup the two directories named:
4625
4626 \begin{verbatim}
4627    /home/user/www/cache
4628    /home/user/temp
4629 \end{verbatim}
4630
4631 NOTE: subdirectories will not be backed up.  That is, the directive
4632 applies to the two directories in question and any children (be they
4633 files, directories, etc).
4634
4635
4636 \subsection{Bacula Plugins}
4637 \index[general]{Plugin}
4638 Support for shared object plugins has been implemented in the Linux, Unix
4639 and Win32 File daemons. The API will be documented separately in
4640 the Developer's Guide or in a new document.  For the moment, there is
4641 a single plugin named {\bf bpipe} that allows an external program to
4642 get control to backup and restore a file.
4643
4644 Plugins are also planned (partially implemented) in the Director and the
4645 Storage daemon.  
4646
4647 \subsubsection{Plugin Directory}
4648 \index[general]{Plugin Directory}
4649 Each daemon (DIR, FD, SD) has a new {\bf Plugin Directory} directive that may
4650 be added to the daemon definition resource. The directory takes a quoted 
4651 string argument, which is the name of the directory in which the daemon can
4652 find the Bacula plugins. If this directive is not specified, Bacula will not
4653 load any plugins. Since each plugin has a distinctive name, all the daemons
4654 can share the same plugin directory. 
4655
4656 \subsubsection{Plugin Options}
4657 \index[general]{Plugin Options}
4658 The {\bf Plugin Options} directive takes a quoted string
4659 argument (after the equal sign) and may be specified in the
4660 Job resource.  The options specified will be passed to all plugins
4661 when they are run.  This each plugin must know what it is looking
4662 for. The value defined in the Job resource can be modified
4663 by the user when he runs a Job via the {\bf bconsole} command line 
4664 prompts.
4665
4666 Note: this directive may be specified, and there is code to modify
4667 the string in the run command, but the plugin options are not yet passed to
4668 the plugin (i.e. not fully implemented).
4669
4670 \subsubsection{Plugin Options ACL}
4671 \index[general]{Plugin Options ACL}
4672 The {\bf Plugin Options ACL} directive may be specified in the
4673 Director's Console resource. It functions as all the other ACL commands
4674 do by permitting users running restricted consoles to specify a 
4675 {\bf Plugin Options} that overrides the one specified in the Job
4676 definition. Without this directive restricted consoles may not modify
4677 the Plugin Options.
4678
4679 \subsubsection{Plugin = \lt{}plugin-command-string\gt{}}
4680 \index[general]{Plugin}
4681 The {\bf Plugin} directive is specified in the Include section of
4682 a FileSet resource where you put your {\bf File = xxx} directives.
4683 For example:
4684
4685 \begin{verbatim}
4686   FileSet {
4687     Name = "MyFileSet"
4688     Include {
4689       Options {
4690         signature = MD5
4691       }
4692       File = /home
4693       Plugin = "bpipe:..."
4694     }
4695   }
4696 \end{verbatim}
4697
4698 In the above example, when the File daemon is processing the directives
4699 in the Include section, it will first backup all the files in {\bf /home}
4700 then it will load the plugin named {\bf bpipe} (actually bpipe-dir.so) from
4701 the Plugin Directory.  The syntax and semantics of the Plugin directive
4702 require the first part of the string up to the colon (:) to be the name
4703 of the plugin. Everything after the first colon is ignored by the File daemon but
4704 is passed to the plugin. Thus the plugin writer may define the meaning of the
4705 rest of the string as he wishes.
4706
4707 Please see the next section for information about the {\bf bpipe} Bacula
4708 plugin.
4709
4710 \subsection{The bpipe Plugin}
4711 \index[general]{The bpipe Plugin}
4712 The {\bf bpipe} plugin is provided in the directory src/plugins/fd/bpipe-fd.c of
4713 the Bacula source distribution. When the plugin is compiled and linking into
4714 the resulting dynamic shared object (DSO), it will have the name {\bf bpipe-fd.so}.
4715 Please note that this is a very simple plugin that was written for
4716 demonstration and test purposes. It is and can be used in production, but
4717 that was never really intended.
4718
4719 The purpose of the plugin is to provide an interface to any system program for
4720 backup and restore. As specified above the {\bf bpipe} plugin is specified in
4721 the Include section of your Job's FileSet resource.  The full syntax of the
4722 plugin directive as interpreted by the {\bf bpipe} plugin (each plugin is free
4723 to specify the sytax as it wishes) is:
4724
4725 \begin{verbatim}
4726   Plugin = "<field1>:<field2>:<field3>:<field4>"
4727 \end{verbatim}
4728
4729 where
4730 \begin{description}
4731 \item {\bf field1} is the name of the plugin with the trailing {\bf -fd.so}
4732 stripped off, so in this case, we would put {\bf bpipe} in this field.
4733
4734 \item {\bf field2} specifies the namespace, which for {\bf bpipe} is the
4735 pseudo path and filename under which the backup will be saved. This pseudo
4736 path and filename will be seen by the user in the restore file tree.
4737 For example, if the value is {\bf /MYSQL/regress.sql}, the data
4738 backed up by the plugin will be put under that "pseudo" path and filename.
4739 You must be careful to choose a naming convention that is unique to avoid
4740 a conflict with a path and filename that actually exists on your system.
4741
4742 \item {\bf field3} for the {\bf bpipe} plugin 
4743 specifies the "reader" program that is called by the plugin during
4744 backup to read the data. {\bf bpipe} will call this program by doing a
4745 {\bf popen} on it. 
4746
4747 \item {\bf field4} for the {\bf bpipe} plugin
4748 specifies the "writer" program that is called by the plugin during
4749 restore to write the data back to the filesystem.  
4750 \end{description}
4751
4752 Please note that for two items above describing the "reader" and "writer"
4753 fields, these programs are "executed" by Bacula, which
4754 means there is no shell interpretation of any command line arguments
4755 you might use.  If you want to use shell characters (redirection of input
4756 or output, ...), then we recommend that you put your command or commands
4757 in a shell script and execute the script. In addition if you backup a
4758 file with the reader program, when running the writer program during
4759 the restore, Bacula will not automatically create the path to the file.
4760 Either the path must exist, or you must explicitly do so with your command
4761 or in a shell script.
4762
4763 Putting it all together, the full plugin directive line might look
4764 like the following:
4765
4766 \begin{verbatim}
4767 Plugin = "bpipe:/MYSQL/regress.sql:mysqldump -f 
4768           --opt --databases bacula:mysql"
4769 \end{verbatim}
4770
4771 The directive has been split into two lines, but within the {\bf bacula-dir.conf} file
4772 would be written on a single line.
4773
4774 This causes the File daemon to call the {\bf bpipe} plugin, which will write
4775 its data into the "pseudo" file {\bf /MYSQL/regress.sql} by calling the 
4776 program {\bf mysqldump -f --opt --database bacula} to read the data during
4777 backup. The mysqldump command outputs all the data for the database named
4778 {\bf bacula}, which will be read by the plugin and stored in the backup.
4779 During restore, the data that was backed up will be sent to the program
4780 specified in the last field, which in this case is {\bf mysql}.  When
4781 {\bf mysql} is called, it will read the data sent to it by the plugn
4782 then write it back to the same database from which it came ({\bf bacula}
4783 in this case).
4784
4785 The {\bf bpipe} plugin is a generic pipe program, that simply transmits 
4786 the data from a specified program to Bacula for backup, and then from Bacula to 
4787 a specified program for restore.
4788
4789 By using different command lines to {\bf bpipe},
4790 you can backup any kind of data (ASCII or binary) depending
4791 on the program called.
4792
4793 \subsection{Microsoft Exchange Server 2003/2007 Plugin}
4794 \index[general]{Microsoft Exchange Server 2003/2007 Plugin}
4795 \subsubsection{Background}
4796 The Exchange plugin was made possible by a funded development project
4797 between Equiinet Ltd -- www.equiinet.com (many thanks) and Bacula Systems.
4798 The code for the plugin was written by James Harper, and the Bacula core
4799 code by Kern Sibbald.  All the code for this funded development has become
4800 part of the Bacula project.  Thanks to everyone who made it happen.
4801
4802 \subsubsection{Concepts}
4803 Although it is possible to backup Exchange using Bacula VSS the Exchange 
4804 plugin adds a good deal of functionality, because while Bacula VSS
4805 completes a full backup (snapshot) of Exchange, it does
4806 not support Incremental or Differential backups, restoring is more
4807 complicated, and a single database restore is not possible.
4808
4809 Microsoft Exchange organises its storage into Storage Groups with
4810 Databases inside them. A default installation of Exchange will have a
4811 single Storage Group called 'First Storage Group', with two Databases
4812 inside it, "Mailbox Store (SERVER NAME)" and 
4813 "Public Folder Store (SERVER NAME)", 
4814 which hold user email and public folders respectively.
4815
4816 In the default configuration, Exchange logs everything that happens to
4817 log files, such that if you have a backup, and all the log files since,
4818 you can restore to the present time. Each Storage Group has its own set
4819 of log files and operates independently of any other Storage Groups. At
4820 the Storage Group level, the logging can be turned off by enabling a
4821 function called "Enable circular logging". At this time the Exchange
4822 plugin will not function if this option is enabled.
4823
4824 The plugin allows backing up of entire storage groups, and the restoring
4825 of entire storage groups or individual databases. Backing up and
4826 restoring at the individual mailbox or email item is not supported but
4827 can be simulated by use of the "Recovery" Storage Group (see below).
4828
4829 \subsubsection{Installing}
4830 The Exchange plugin requires a DLL that is shipped with Microsoft
4831 Exchanger Server called {\bf esebcli2.dll}. Assuming Exchange is installed
4832 correctly the Exchange plugin should find this automatically and run
4833 without any additional installation.
4834
4835 If the DLL can not be found automatically it will need to be copied into
4836 the Bacula installation
4837 directory (eg C:\verb+\+Program Files\verb+\+Bacula\verb+\+bin). The Exchange API DLL is
4838 named esebcli2.dll and is found in C:\verb+\+Program Files\verb+\+Exchsrvr\verb+\+bin on a
4839 default Exchange installation.
4840
4841 \subsubsection{Backing Up}
4842 To back up an Exchange server the Fileset definition must contain at
4843 least {\bf Plugin = "exchange:/@EXCHANGE/Microsoft Information Store"} for
4844 the backup to work correctly. The 'exchange:' bit tells Bacula to look
4845 for the exchange plugin, the '@EXCHANGE' bit makes sure all the backed
4846 up files are prefixed with something that isn't going to share a name
4847 with something outside the plugin, and the 'Microsoft Information Store'
4848 bit is required also. It is also possible to add the name of a storage
4849 group to the "Plugin =" line, eg \\
4850 {\bf Plugin = "exchange:/@EXCHANGE/Microsoft Information Store/First Storage Group"} \\
4851 if you want only a single storage group backed up.
4852
4853 Additionally, you can suffix the 'Plugin =' directive with
4854 ":notrunconfull" which will tell the plugin not to truncate the Exchange
4855 database at the end of a full backup.
4856
4857 An Incremental or Differential backup will backup only the database logs
4858 for each Storage Group by inspecting the "modified date" on each
4859 physical log file. Because of the way the Exchange API works, the last
4860 logfile backed up on each backup will always be backed up by the next
4861 Incremental or Differential backup too. This adds 5MB to each
4862 Incremental or Differential backup size but otherwise does not cause any
4863 problems.
4864
4865 By default, a normal VSS fileset containing all the drive letters will
4866 also back up the Exchange databases using VSS. This will interfere with
4867 the plugin and Exchange's shared ideas of when the last full backup was
4868 done, and may also truncate log files incorrectly. It is important,
4869 therefore, that the Exchange database files be excluded from the backup,
4870 although the folders the files are in should be included, or they will
4871 have to be recreated manually if a bare metal restore is done.
4872
4873 \begin{verbatim}
4874 FileSet {
4875    Include {
4876       File = C:/Program Files/Exchsrvr/mdbdata
4877       Plugin = "exchange:..."
4878    }
4879    Exclude {
4880       File = C:/Program Files/Exchsrvr/mdbdata/E00.chk
4881       File = C:/Program Files/Exchsrvr/mdbdata/E00.log
4882       File = C:/Program Files/Exchsrvr/mdbdata/E000000F.log
4883       File = C:/Program Files/Exchsrvr/mdbdata/E0000010.log
4884       File = C:/Program Files/Exchsrvr/mdbdata/E0000011.log
4885       File = C:/Program Files/Exchsrvr/mdbdata/E00tmp.log
4886       File = C:/Program Files/Exchsrvr/mdbdata/priv1.edb
4887    }
4888 }
4889 \end{verbatim}
4890
4891 The advantage of excluding the above files is that you can significantly
4892 reduce the size of your backup since all the important Exchange files
4893 will be properly saved by the Plugin.
4894
4895
4896 \subsubsection{Restoring}
4897 The restore operation is much the same as a normal Bacula restore, with
4898 the following provisos:
4899
4900 \begin{itemize}
4901 \item  The {\bf Where} restore option must not be specified
4902 \item Each Database directory must be marked as a whole. You cannot just
4903      select (say) the .edb file and not the others.
4904 \item If a Storage Group is restored, the directory of the Storage Group
4905      must be marked too.
4906 \item  It is possible to restore only a subset of the available log files,
4907      but they {\bf must} be contiguous. Exchange will fail to restore correctly
4908      if a log file is missing from the sequence of log files
4909 \item Each database to be restored must be dismounted and marked as "Can be
4910     overwritten by restore"
4911 \item If an entire Storage Group is to be restored (eg all databases and
4912    logs in the Storage Group), then it is best to manually delete the
4913    database files from the server (eg C:\verb+\+Program Files\verb+\+Exchsrvr\verb+\+mdbdata\verb+\+*)
4914    as Exchange can get confused by stray log files lying around.
4915 \end{itemize}
4916
4917 \subsubsection{Restoring to the Recovery Storage Group}
4918 The concept of the Recovery Storage Group is well documented by
4919 Microsoft 
4920 \elink{http://support.microsoft.com/kb/824126}{http://support.microsoft.com/kb/824126}, 
4921 but to briefly summarize...
4922
4923 Microsoft Exchange allows the creation of an additional Storage Group
4924 called the Recovery Storage Group, which is used to restore an older
4925 copy of a database (e.g. before a mailbox was deleted) into without
4926 messing with the current live data. This is required as the Standard and
4927 Small Business Server versions of Exchange can not ordinarily have more
4928 than one Storage Group.
4929
4930 To create the Recovery Storage Group, drill down to the Server in Exchange
4931 System Manager, right click, and select
4932 {\bf "New -> Recovery Storage Group..."}.  Accept or change the file
4933 locations and click OK. On the Recovery Storage Group, right click and
4934 select {\bf "Add Database to Recover..."} and select the database you will
4935 be restoring.
4936
4937 Restore only the single database nominated as the database in the
4938 Recovery Storage Group. Exchange will redirect the restore to the
4939 Recovery Storage Group automatically.
4940 Then run the restore.
4941
4942 \subsubsection{Restoring on Microsoft Server 2007}
4943 Apparently the {\bf Exmerge} program no longer exists in Microsoft Server
4944 2007, and hence you use a new procedure for recovering a single mail box.
4945 This procedure is documented by Microsoft at:
4946 \elink{http://technet.microsoft.com/en-us/library/aa997694.aspx}{http://technet.microsoft.com/en-us/library/aa997694.aspx},
4947 and involves using the {\bf Restore-Mailbox} and {\bf
4948 Get-Mailbox Statistics} shell commands.
4949
4950 \subsubsection{Caveats}
4951 This plugin is still being developed, so you should consider it
4952 currently in BETA test, and thus use in a production environment
4953 should be done only after very careful testing.
4954
4955 When doing a full backup, the Exchange database logs are truncated by
4956 Exchange as soon as the plugin has completed the backup. If the data
4957 never makes it to the backup medium (eg because of spooling) then the
4958 logs will still be truncated, but they will also not have been backed
4959 up. A solution to this is being worked on. You will have to schedule a
4960 new Full backup to ensure that your next backups will be usable.
4961
4962 The "Enable Circular Logging" option cannot be enabled or the plugin
4963 will fail.
4964
4965 Exchange insists that a successful Full backup must have taken place if
4966 an Incremental or Differential backup is desired, and the plugin will
4967 fail if this is not the case. If a restore is done, Exchange will
4968 require that a Full backup be done before an Incremental or Differential
4969 backup is done.
4970
4971 The plugin will most likely not work well if another backup application
4972 (eg NTBACKUP) is backing up the Exchange database, especially if the
4973 other backup application is truncating the log files.
4974
4975 The Exchange plugin has not been tested with the {\bf Accurate} option, so
4976 we recommend either carefully testing or that you avoid this option for
4977 the current time.
4978
4979 The Exchange plugin is not called during processing the bconsole {\bf
4980 estimate} command, and so anything that would be backed up by the plugin
4981 will not be added to the estimate total that is displayed.
4982
4983
4984 \subsection{libdbi Framework}
4985 \index[general]{libdbi Framework}
4986 As a general guideline, Bacula has support for a few catalog database drivers
4987 (MySQL, PostgreSQL, SQLite)
4988 coded natively by the Bacula team.  With the libdbi implementation, which is a
4989 Bacula driver that uses libdbi to access the catalog, we have an open field to
4990 use many different kinds database engines following the needs of users.
4991
4992 The according to libdbi (http://libdbi.sourceforge.net/) project: libdbi
4993 implements a database-independent abstraction layer in C, similar to the
4994 DBI/DBD layer in Perl. Writing one generic set of code, programmers can
4995 leverage the power of multiple databases and multiple simultaneous database
4996 connections by using this framework.
4997
4998 Currently the libdbi driver in Bacula project only supports the same drivers
4999 natively coded in Bacula.  However the libdbi project has support for many
5000 others database engines. You can view the list at
5001 http://libdbi-drivers.sourceforge.net/. In the future all those drivers can be
5002 supported by Bacula, however, they must be tested properly by the Bacula team.
5003
5004 Some of benefits of using libdbi are:
5005 \begin{itemize}
5006 \item The possibility to use proprietary databases engines in which your
5007   proprietary licenses prevent the Bacula team from developing the driver.
5008  \item The possibility to use the drivers written for the libdbi project.
5009  \item The possibility to use other database engines without recompiling Bacula
5010    to use them.  Just change one line in bacula-dir.conf
5011  \item Abstract Database access, this is, unique point to code and profiling
5012    catalog database access.
5013  \end{itemize}
5014  
5015  The following drivers have been tested:
5016  \begin{itemize}
5017  \item PostgreSQL, with and without batch insert
5018  \item Mysql, with and without batch insert
5019  \item SQLite
5020  \item SQLite3
5021  \end{itemize}
5022
5023  In the future, we will test and approve to use others databases engines
5024  (proprietary or not) like DB2, Oracle, Microsoft SQL.
5025
5026  To compile Bacula to support libdbi we need to configure the code with the
5027  --with-dbi and --with-dbi-driver=[database] ./configure options, where
5028  [database] is the database engine to be used with Bacula (of course we can
5029  change the driver in file bacula-dir.conf, see below).  We must configure the
5030  access port of the database engine with the option --with-db-port, because the
5031  libdbi framework doesn't know the default access port of each database.
5032
5033 The next phase is checking (or configuring) the bacula-dir.conf, example:
5034 \begin{verbatim}
5035 Catalog {
5036   Name = MyCatalog
5037   dbdriver = dbi:mysql; dbaddress = 127.0.0.1; dbport = 3306
5038   dbname = regress; user = regress; password = ""
5039 }
5040 \end{verbatim}
5041
5042 The parameter {\bf dbdriver} indicates that we will use the driver dbi with a
5043 mysql database.  Currently the drivers supported by Bacula are: postgresql,
5044 mysql, sqlite, sqlite3; these are the names that may be added to string "dbi:".
5045
5046 The following limitations apply when Bacula is set to use the libdbi framework:
5047  - Not tested on the Win32 platform
5048  - A little performance is lost if comparing with native database driver. 
5049    The reason is bound with the database driver provided by libdbi and the 
5050    simple fact that one more layer of code was added.
5051
5052 It is important to remember, when compiling Bacula with libdbi, the
5053 following packages are needed:
5054  \begin{itemize}
5055   \item libdbi version 1.0.0, http://libdbi.sourceforge.net/
5056   \item libdbi-drivers 1.0.0, http://libdbi-drivers.sourceforge.net/
5057  \end{itemize}
5058  
5059  You can download them and compile them on your system or install the packages
5060  from your OS distribution.
5061
5062 \subsection{Console Command Additions and Enhancements}
5063 \index[general]{Console Additions}                                 
5064
5065 \subsubsection{Display Autochanger Content}
5066 \index[general]{StatusSlots}
5067
5068 The {\bf status slots storage=\lt{}storage-name\gt{}} command displays
5069 autochanger content.
5070
5071 \footnotesize
5072 \begin{verbatim}
5073  Slot |  Volume Name  |  Status  |  Media Type       |   Pool     |
5074 ------+---------------+----------+-------------------+------------|
5075     1 |         00001 |   Append |  DiskChangerMedia |    Default |
5076     2 |         00002 |   Append |  DiskChangerMedia |    Default |
5077     3*|         00003 |   Append |  DiskChangerMedia |    Scratch |
5078     4 |               |          |                   |            |
5079 \end{verbatim}
5080 \normalsize
5081
5082 If you an asterisk ({\bf *}) appears after the slot number, you must run an
5083 {\bf update slots} command to synchronize autochanger content with your
5084 catalog.
5085
5086 \subsubsection{list joblog job=xxx or jobid=nnn}
5087 \index[general]{list joblog}
5088 A new list command has been added that allows you to list the contents
5089 of the Job Log stored in the catalog for either a Job Name (fully qualified)
5090 or for a particular JobId.  The {\bf llist} command will include a line with
5091 the time and date of the entry.
5092
5093 Note for the catalog to have Job Log entries, you must have a directive 
5094 such as:
5095
5096 \begin{verbatim}
5097   catalog = all
5098 \end{verbatim}
5099
5100 In your Director's {\bf Messages} resource.
5101
5102 \subsubsection{Use separator for multiple commands}
5103 \index[general]{Command Separator}
5104   When using bconsole with readline, you can set the command separator with 
5105   \textbf{@separator} command to one
5106   of those characters to write commands who require multiple input in one line.
5107 \begin{verbatim}
5108   !$%&'()*+,-/:;<>?[]^`{|}~
5109 \end{verbatim}
5110
5111 \subsubsection{Deleting Volumes}
5112 The delete volume bconsole command has been modified to
5113 require an asterisk (*) in front of a MediaId otherwise the
5114 value you enter is a taken to be a Volume name. This is so that
5115 users may delete numeric Volume names. The previous Bacula versions
5116 assumed that all input that started with a number was a MediaId.
5117
5118 This new behavior is indicated in the prompt if you read it
5119 carefully.
5120
5121 \subsection{Bare Metal Recovery}
5122 The old bare metal recovery project is essentially dead. One
5123 of the main features of it was that it would build a recovery
5124 CD based on the kernel on your system. The problem was that
5125 every distribution has a different boot procedure and different 
5126 scripts, and worse yet, the boot procedures and scripts change
5127 from one distribution to another.  This meant that maintaining
5128 (keeping up with the changes) the rescue CD was too much work.
5129
5130 To replace it, a new bare metal recovery USB boot stick has been developed
5131 by Bacula Systems.  This technology involves remastering a Ubuntu LiveCD to
5132 boot from a USB key.  
5133
5134 Advantages: 
5135 \begin{enumerate} 
5136 \item Recovery can be done from within graphical environment.  
5137 \item Recovery can be done in a shell.  
5138 \item Ubuntu boots on a large number of Linux systems.  
5139 \item The process of updating the system and adding new
5140    packages is not too difficult. 
5141 \item The USB key can easily be upgraded to newer Ubuntu versions.
5142 \item The USB key has writable partitions for modifications to
5143    the OS and for modification to your home directory.
5144 \item You can add new files/directories to the USB key very easily.
5145 \item You can save the environment from multiple machines on
5146    one USB key.
5147 \item Bacula Systems is funding its ongoing development.
5148 \end{enumerate}
5149
5150 The disadvantages are:
5151 \begin{enumerate}
5152 \item The USB key is usable but currently under development.
5153 \item Not everyone may be familiar with Ubuntu (no worse
5154   than using Knoppix)
5155 \item Some older OSes cannot be booted from USB. This can
5156    be resolved by first booting a Ubuntu LiveCD then plugging
5157    in the USB key.
5158 \item Currently the documentation is sketchy and not yet added
5159    to the main manual. See below ...
5160 \end{enumerate}
5161
5162 The documentation and the code can be found in the {\bf rescue} package
5163 in the directory {\bf linux/usb}.
5164
5165 \subsection{Miscellaneous}
5166 \index[general]{Misc New Features}
5167
5168 \subsubsection{Allow Mixed Priority = \lt{}yes\vb{}no\gt{}}
5169 \index[general]{Allow Mixed Priority}
5170    This directive is only implemented in version 2.5 and later.  When
5171    set to {\bf yes} (default {\bf no}), this job may run even if lower
5172    priority jobs are already running.  This means a high priority job
5173    will not have to wait for other jobs to finish before starting.
5174    The scheduler will only mix priorities when all running jobs have
5175    this set to true.
5176
5177    Note that only higher priority jobs will start early.  Suppose the
5178    director will allow two concurrent jobs, and that two jobs with
5179    priority 10 are running, with two more in the queue.  If a job with
5180    priority 5 is added to the queue, it will be run as soon as one of
5181    the running jobs finishes.  However, new priority 10 jobs will not
5182    be run until the priority 5 job has finished.
5183
5184 \subsubsection{Bootstrap File Directive -- FileRegex}
5185 \index[general]{Bootstrap File Directive}
5186   {\bf FileRegex} is a new command that can be added to the bootstrap
5187   (.bsr) file.  The value is a regular expression.  When specified, only
5188   matching filenames will be restored.
5189
5190   During a restore, if all File records are pruned from the catalog
5191   for a Job, normally Bacula can restore only all files saved. That
5192   is there is no way using the catalog to select individual files.
5193   With this new feature, Bacula will ask if you want to specify a Regex
5194   expression for extracting only a part of the full backup.
5195
5196 \begin{verbatim}
5197   Building directory tree for JobId(s) 1,3 ...
5198   There were no files inserted into the tree, so file selection
5199   is not possible.Most likely your retention policy pruned the files
5200   
5201   Do you want to restore all the files? (yes\vb{}no): no
5202   
5203   Regexp matching files to restore? (empty to abort): /tmp/regress/(bin|tests)/
5204   Bootstrap records written to /tmp/regress/working/zog4-dir.restore.1.bsr
5205 \end{verbatim}
5206
5207 \subsubsection{Bootstrap File Optimization Changes}
5208 In order to permit proper seeking on disk files, we have extended the bootstrap
5209 file format to include a {\bf VolStartAddr} and {\bf VolEndAddr} records. Each
5210 takes a 64 bit unsigned integer range (i.e. nnn-mmm) which defines the start
5211 address range and end address range respectively.  These two directives replace
5212 the {\bf VolStartFile}, {\bf VolEndFile}, {\bf VolStartBlock} and {\bf
5213   VolEndBlock} directives.  Bootstrap files containing the old directives will
5214 still work, but will not properly take advantage of proper disk seeking, and
5215 may read completely to the end of a disk volume during a restore.  With the new
5216 format (automatically generated by the new Director), restores will seek
5217 properly and stop reading the volume when all the files have been restored.
5218
5219 \subsubsection{Solaris ZFS/NFSv4 ACLs}
5220 This is an upgrade of the previous Solaris ACL backup code
5221 to the new library format, which will backup both the old
5222 POSIX(UFS) ACLs as well as the ZFS ACLs.
5223
5224 The new code can also restore POSIX(UFS) ACLs to a ZFS filesystem
5225 (it will translate the POSIX(UFS)) ACL into a ZFS/NFSv4 one) it can also
5226 be used to transfer from UFS to ZFS filesystems.
5227
5228
5229 \subsubsection{Virtual Tape Emulation}
5230 \index[general]{Virtual Tape Emulation}
5231 We now have a Virtual Tape emulator that allows us to run though 99.9\% of
5232 the tape code but actually reading and writing to a disk file. Used with the
5233 \textbf{disk-changer} script, you can now emulate an autochanger with 10 drives
5234 and 700 slots. This feature is most useful in testing.  It is enabled
5235 by using {\bf Device Type = vtape} in the Storage daemon's Device
5236 directive. This feature is only implemented on Linux machines and should not be
5237 used for production.
5238
5239 \subsubsection{Bat Enhancements}
5240 \index[general]{Bat Enhancements}
5241 Bat (the Bacula Administration Tool) GUI program has been significantly
5242 enhanced and stabilized. In particular, there are new table based status 
5243 commands; it can now be easily localized using Qt4 Linguist.
5244
5245 The Bat communications protocol has been significantly enhanced to improve
5246 GUI handling. Note, you {\bf must} use a the bat that is distributed with
5247 the Director you are using otherwise the communications protocol will not
5248 work.
5249
5250 \subsubsection{RunScript Enhancements}
5251 \index[general]{RunScript Enhancements}
5252 The {\bf RunScript} resource has been enhanced to permit multiple
5253 commands per RunScript.  Simply specify multiple {\bf Command} directives
5254 in your RunScript.
5255
5256 \begin{verbatim}
5257 Job {
5258   Name = aJob
5259   RunScript {
5260     Command = "/bin/echo test"
5261     Command = "/bin/echo an other test"
5262     Command = "/bin/echo 3 commands in the same runscript"
5263     RunsWhen = Before
5264   }
5265  ...
5266 }
5267 \end{verbatim}
5268
5269 A new Client RunScript {\bf RunsWhen} keyword of {\bf AfterVSS} has been
5270 implemented, which runs the command after the Volume Shadow Copy has been made.
5271
5272 Console commands can be specified within a RunScript by using:
5273 {\bf Console = \lt{}command\gt{}}, however, this command has not been 
5274 carefully tested and debugged and is known to easily crash the Director.
5275 We would appreciate feedback.  Due to the recursive nature of this command, we
5276 may remove it before the final release.
5277
5278 \subsubsection{Status Enhancements}
5279 \index[general]{Status Enhancements}
5280 The bconsole {\bf status dir} output has been enhanced to indicate
5281 Storage daemon job spooling and despooling activity.
5282
5283 \subsubsection{Connect Timeout}
5284 \index[general]{Connect Timeout}
5285 The default connect timeout to the File
5286 daemon has been set to 3 minutes. Previously it was 30 minutes.
5287
5288 \subsubsection{ftruncate for NFS Volumes}
5289 \index[general]{ftruncate for NFS Volumes}
5290 If you write to a Volume mounted by NFS (say on a local file server),
5291 in previous Bacula versions, when the Volume was recycled, it was not
5292 properly truncated because NFS does not implement ftruncate (file 
5293 truncate). This is now corrected in the new version because we have
5294 written code (actually a kind user) that deletes and recreates the Volume,
5295 thus accomplishing the same thing as a truncate.
5296
5297 \subsubsection{Support for Ubuntu}
5298 The new version of Bacula now recognizes the Ubuntu (and Kubuntu)
5299 version of Linux, and thus now provides correct autostart routines.
5300 Since Ubuntu officially supports Bacula, you can also obtain any
5301 recent release of Bacula from the Ubuntu repositories.
5302
5303 \subsubsection{Recycle Pool = \lt{}pool-name\gt{}}
5304 \index[general]{Recycle Pool}
5305 The new \textbf{RecyclePool} directive defines to which pool the Volume will
5306 be placed (moved) when it is recycled. Without this directive, a Volume will
5307 remain in the same pool when it is recycled. With this directive, it can be
5308 moved automatically to any existing pool during a recycle. This directive is
5309 probably most useful when defined in the Scratch pool, so that volumes will
5310 be recycled back into the Scratch pool.
5311
5312 \subsubsection{FD Version}
5313 \index[general]{FD Version}
5314 The File daemon to Director protocol now includes a version 
5315 number, which although there is no visible change for users, 
5316 will help us in future versions automatically determine
5317 if a File daemon is not compatible.
5318
5319 \subsubsection{Max Run Sched Time = \lt{}time-period-in-seconds\gt{}}
5320 \index[general]{Max Run Sched Time}
5321 The time specifies the maximum allowed time that a job may run, counted from
5322 when the job was scheduled. This can be useful to prevent jobs from running
5323 during working hours. We can see it like \texttt{Max Start Delay + Max Run
5324   Time}.
5325
5326 \subsubsection{Max Wait Time = \lt{}time-period-in-seconds\gt{}}
5327 \index[general]{Max Wait Time}
5328 Previous \textbf{MaxWaitTime} directives aren't working as expected, instead
5329 of checking the maximum allowed time that a job may block for a resource,
5330 those directives worked like \textbf{MaxRunTime}. Some users are reporting to
5331 use \textbf{Incr/Diff/Full Max Wait Time} to control the maximum run time of
5332 their job depending on the level. Now, they have to use
5333 \textbf{Incr/Diff/Full Max Run Time}.  \textbf{Incr/Diff/Full Max Wait Time}
5334 directives are now deprecated.
5335
5336 \subsubsection{Incremental|Differential Max Wait Time = \lt{}time-period-in-seconds\gt{}} 
5337 \index[general]{Incremental Max Wait Time}
5338 \index[general]{Differential Max Wait Time}
5339
5340 These directives have been deprecated in favor of
5341 \texttt{Incremental|Differential Max Run Time}.
5342
5343 \subsubsection{Max Run Time directives}
5344 \index[general]{Max Run Time directives}
5345 Using \textbf{Full/Diff/Incr Max Run Time}, it's now possible to specify the
5346 maximum allowed time that a job can run depending on the level.
5347
5348 \addcontentsline{lof}{figure}{Job time control directives}
5349 \begin{center}
5350 \includegraphics[width=\linewidth]{different_time}
5351 \end{center}
5352
5353 \subsubsection{Statistics Enhancements}
5354 \index[general]{Statistics Enhancements}
5355 If you (or probably your boss) want to have statistics on your backups to
5356 provide some \textit{Service Level Agreement} indicators, you could use a few
5357 SQL queries on the Job table to report how many:
5358
5359 \begin{itemize}
5360 \item jobs have run
5361 \item jobs have been successful
5362 \item files have been backed up
5363 \item ...
5364 \end{itemize}
5365
5366 However, these statistics are accurate only if your job retention is greater
5367 than your statistics period. Ie, if jobs are purged from the catalog, you won't
5368 be able to use them. 
5369
5370 Now, you can use the \textbf{update stats [days=num]} console command to fill
5371 the JobHistory table with new Job records. If you want to be sure to take in
5372 account only \textbf{good jobs}, ie if one of your important job has failed but
5373 you have fixed the problem and restarted it on time, you probably want to
5374 delete the first \textit{bad} job record and keep only the successful one. For
5375 that simply let your staff do the job, and update JobHistory table after two or
5376 three days depending on your organization using the \textbf{[days=num]} option.
5377
5378 These statistics records aren't used for restoring, but mainly for
5379 capacity planning, billings, etc.
5380
5381 The Bweb interface provides a statistics module that can use this feature. You
5382 can also use tools like Talend or extract information by yourself.
5383
5384 The \textbf{Statistics Retention = \lt{}time\gt{}} director directive defines
5385 the length of time that Bacula will keep statistics job records in the Catalog
5386 database after the Job End time. (In \texttt{JobHistory} table) When this time
5387 period expires, and if user runs \texttt{prune stats} command, Bacula will
5388 prune (remove) Job records that are older than the specified period.
5389
5390 You can use the following Job resource in your nightly \textbf{BackupCatalog}
5391 job to maintain statistics.
5392 \begin{verbatim}
5393 Job {
5394   Name = BackupCatalog
5395   ...
5396   RunScript {
5397     Console = "update stats days=3"
5398     Console = "prune stats yes"
5399     RunsWhen = After
5400     RunsOnClient = no
5401   }
5402 }
5403 \end{verbatim}
5404
5405 \subsubsection{ScratchPool = \lt{}pool-resource-name\gt{}}
5406 \index[general]{ScratchPool}
5407 This directive permits to specify a specific \textsl{Scratch} pool for the
5408 current pool. This is useful when using multiple storage sharing the same
5409 mediatype or when you want to dedicate volumes to a particular set of pool.
5410
5411 \subsubsection{Enhanced Attribute Despooling}
5412 \index[general]{Attribute Despooling}
5413 If the storage daemon and the Director are on the same machine, the spool file
5414 that contains attributes is read directly by the Director instead of being
5415 transmitted across the network. That should reduce load and speedup insertion.
5416
5417 \subsubsection{SpoolSize = \lt{}size-specification-in-bytes\gt{}}
5418 \index[general]{SpoolSize}
5419 A new Job directive permits to specify the spool size per job. This is used
5420 in advanced job tunning. {\bf SpoolSize={\it bytes}}
5421
5422 \subsubsection{MaximumConsoleConnections = \lt{}number\gt{}}
5423 \index[general]{MaximumConsoleConnections}
5424 A new director directive permits to specify the maximum number of Console
5425 Connections that could run concurrently. The default is set to 20, but you may
5426 set it to a larger number.
5427
5428 \subsubsection{VerId = \lt{}string\gt{}}
5429 \index[general]{VerId}
5430 A new director directive permits to specify a personnal identifier that will be
5431 displayed in the \texttt{version} command.
5432
5433 \subsubsection{dbcheck enhancements}
5434 \index[general]{dbcheck enhancements}
5435 If you are using Mysql, dbcheck will now ask you if you want to create
5436 temporary indexes to speed up orphaned Path and Filename elimination. 
5437
5438 A new \texttt{-B} option allows you to print catalog information in a simple
5439 text based format. This is useful to backup it in a secure way.
5440
5441 \begin{verbatim}
5442  $ dbcheck -B 
5443  catalog=MyCatalog
5444  db_type=SQLite
5445  db_name=regress
5446  db_driver=
5447  db_user=regress
5448  db_password=
5449  db_address=
5450  db_port=0
5451  db_socket=
5452 \end{verbatim} %$
5453
5454 You can now specify the database connection port in the command line.
5455
5456 \subsubsection{{-}{-}docdir configure option}
5457 \index[general]{{-}{-}docdir configure option}
5458 You can use {-}{-}docdir= on the ./configure command to
5459 specify the directory where you want Bacula to install the
5460 LICENSE, ReleaseNotes, ChangeLog, ... files.   The default is 
5461 {\bf /usr/share/doc/bacula}.
5462       
5463 \subsubsection{{-}{-}htmldir configure option}
5464 \index[general]{{-}{-}htmldir configure option}
5465 You can use {-}{-}htmldir= on the ./configure command to
5466 specify the directory where you want Bacula to install the bat html help
5467 files. The default is {\bf /usr/share/doc/bacula/html}
5468
5469 \subsubsection{{-}{-}with-plugindir configure option}
5470 \index[general]{{-}{-}plugindir configure option}
5471 You can use {-}{-}plugindir= on the ./configure command to
5472 specify the directory where you want Bacula to install
5473 the plugins (currently only bpipe-fd). The default is
5474 /usr/lib.