]> git.sur5r.net Git - bacula/docs/blob - docs/manuals/fr/main/newfeatures.tex
Setup fr/console
[bacula/docs] / docs / manuals / fr / main / newfeatures.tex
1 \chapter{New Features in 5.0.0}
2 \label{NewFeaturesChapter}
3
4 This chapter presents the new features that are in the
5 released Bacula version 5.0.0.
6
7 \section{Truncate volume after purge}
8 \label{sec:actiononpurge}
9
10 The Pool directive \textbf{ActionOnPurge=Truncate} instructs Bacula to truncate
11 the volume when it is purged. It is useful to prevent disk based volumes from
12 consuming too much space. 
13
14 \begin{verbatim}
15 Pool {
16   Name = Default
17   Action On Purge = Truncate
18   ...
19 }
20 \end{verbatim}
21
22 \section{Maximum Concurent Jobs for Devices}
23 \label{sec:maximumconcurentjobdevice}
24
25 {\bf Maximum Concurrent Jobs} is a new Device directive in the Storage
26 Daemon configuration permits setting the maximum number of Jobs that can
27 run concurrently on a specified Device.  Using this directive, it is
28 possible to have different Jobs using multiple drives, because when the
29 Maximum Concurrent Jobs limit is reached, the Storage Daemon will start new
30 Jobs on any other available compatible drive.  This facilitates writing to
31 multiple drives with multiple Jobs that all use the same Pool.
32
33 This project was funded by Bacula Systems.
34
35 \section{Restore from Multiple Storage Daemons}
36 \index[general]{Restore}
37
38 Previously, you were able to restore from multiple devices in a single Storage
39 Daemon. Now, Bacula is able to restore from multiple Storage Daemons. For
40 example, if your full backup runs on a Storage Daemon with an autochanger, and
41 your incremental jobs use another Storage Daemon with lots of disks, Bacula
42 will switch automatically from one Storage Daemon to an other within the same
43 Restore job.
44
45 You must upgrade your File Daemon to version 3.1.3 or greater to use this
46 feature.
47
48 This project was funded by Bacula Systems with the help of Equiinet.
49
50 \section{File Deduplication using Base Jobs}
51 A base job is sort of like a Full save except that you will want the FileSet to
52 contain only files that are unlikely to change in the future (i.e.  a snapshot
53 of most of your system after installing it).  After the base job has been run,
54 when you are doing a Full save, you specify one or more Base jobs to be used.
55 All files that have been backed up in the Base job/jobs but not modified will
56 then be excluded from the backup.  During a restore, the Base jobs will be
57 automatically pulled in where necessary.
58
59 This is something none of the competition does, as far as we know (except
60 perhaps BackupPC, which is a Perl program that saves to disk only).  It is big
61 win for the user, it makes Bacula stand out as offering a unique optimization
62 that immediately saves time and money.  Basically, imagine that you have 100
63 nearly identical Windows or Linux machine containing the OS and user files.
64 Now for the OS part, a Base job will be backed up once, and rather than making
65 100 copies of the OS, there will be only one.  If one or more of the systems
66 have some files updated, no problem, they will be automatically restored.
67
68 A new Job directive \texttt{Base=Jobx, Joby...} permits to specify the list of
69 files that will be used during Full backup as base.
70
71 \begin{verbatim}
72 Job {
73    Name = BackupLinux
74    Level= Base
75    ...
76 }
77
78 Job {
79    Name = BackupZog4
80    Base = BackupZog4, BackupLinux
81    Accurate = yes
82    ...
83 }
84 \end{verbatim}
85
86 In this example, the job \texttt{BackupZog4} will use the most recent version
87 of all files contained in \texttt{BackupZog4} and \texttt{BackupLinux}
88 jobs. Base jobs should have run with \texttt{level=Base} to be used.
89
90 By default, Bacula will compare permissions bits, user and group fields,
91 modification time, size and the checksum of the file to choose between the
92 current backup and the BaseJob file list. You can change this behavior with the
93 \texttt{BaseJob} FileSet option. This option works like the \texttt{verify=}
94 one, that is described in the \ilink{FileSet}{FileSetResource} chapter.
95
96 \begin{verbatim}
97 FileSet {
98   Name = Full
99   Include = {
100     Options {
101        BaseJob  = pmugcs5
102        Accurate = mcs5
103        Verify   = pin5
104     }
105     File = /
106   }
107 }
108 \end{verbatim}
109
110
111 This project was funded by Bacula Systems.
112
113 \section{AllowCompression = \lt{}yes\vb{}no\gt{}}
114 \index[dir]{AllowCompression}
115
116 This new directive may be added to Storage resource within the Director's
117 configuration to allow users to selectively disable the client compression for
118 any job which writes to this storage resource.
119
120 For example:
121 \begin{verbatim}
122 Storage {
123   Name = UltriumTape
124   Address = ultrium-tape
125   Password = storage_password # Password for Storage Daemon
126   Device = Ultrium
127   Media Type = LTO 3
128   AllowCompression = No # Tape drive has hardware compression
129 }
130 \end{verbatim}
131 The above example would cause any jobs running with the UltriumTape storage
132 resource to run without compression from the client file daemons.  This
133 effectively overrides any compression settings defined at the FileSet level.
134
135 This feature is probably most useful if you have a tape drive which supports
136 hardware compression.  By setting the \texttt{AllowCompression = No} directive
137 for your tape drive storage resource, you can avoid additional load on the file
138 daemon and possibly speed up tape backups.
139
140 This project was funded by Collaborative Fusion, Inc.
141
142 \section{Accurate Fileset Options}
143 \label{sec:accuratefileset}
144
145 In previous versions, the accurate code used the file creation and modification
146 times to determine if a file was modified or not. Now you can specify which
147 attributes to use (time, size, checksum, permission, owner, group, \dots),
148 similar to the Verify options.
149
150 \begin{verbatim}
151 FileSet {
152   Name = Full
153   Include = {
154     Options {
155        Accurate = mcs5
156        Verify   = pin5
157     }
158     File = /
159   }
160 }
161 \end{verbatim}
162
163 \begin{description}  
164 \item {\bf i}  compare the inodes  
165 \item {\bf p}  compare the permission bits  
166 \item {\bf n}  compare the number of links  
167 \item {\bf u}  compare the user id  
168 \item {\bf g}  compare the group id  
169 \item {\bf s}  compare the size  
170 \item {\bf a}  compare the access time  
171 \item {\bf m}  compare the modification time (st\_mtime)  
172 \item {\bf c}  compare the change time (st\_ctime)  
173 \item {\bf d}  report file size decreases  
174 \item {\bf 5}  compare the MD5 signature  
175 \item {\bf 1}  compare the SHA1 signature  
176 \end{description}
177
178 \textbf{Important note:} If you decide to use checksum in Accurate jobs,
179 the File Daemon will have to read all files even if they normally would not
180 be saved.  This increases the I/O load, but also the accuracy of the
181 deduplication.  By default, Bacula will check modification/creation time
182 and size.
183
184 This project was funded by Bacula Systems.
185
186 \section{Tab-completion for Bconsole}
187 \label{sec:tabcompletion}
188
189 If you build \texttt{bconsole} with readline support, you will be able to use
190 the new auto-completion mode. This mode supports all commands, gives help
191 inside command, and lists resources when required. It works also in the restore
192 mode.
193
194 To use this feature, you should have readline development package loaded on
195 your system, and use the following option in configure.
196 \begin{verbatim}
197 ./configure --with-readline=/usr/include/readline --disable-conio ...
198 \end{verbatim}
199
200 The new bconsole won't be able to tab-complete with older directors.
201
202 This project was funded by Bacula Systems.
203
204 \section{Pool File and Job retention}
205 \label{sec:poolfilejobretention}
206
207 % TODO check
208 We added two new Pool directives, \texttt{FileRetention} and
209 \texttt{JobRetention}, that take precedence over Client directives of the same
210 name. It allows you to control the Catalog pruning algorithm Pool by Pool. For
211 example, you can decide to increase Retention times for Archive or OffSite Pool.
212
213 \section{Read-only File Daemon using capabilities}
214 \label{sec:fdreadonly}
215 This feature implements support of keeping \textbf{ReadAll} capabilities after
216 UID/GID switch, this allows FD to keep root read but drop write permission.
217
218 It introduces new \texttt{bacula-fd} option (\texttt{-k}) specifying that
219 \textbf{ReadAll} capabilities should be kept after UID/GID switch.
220
221 \begin{verbatim}
222 root@localhost:~# bacula-fd -k -u nobody -g nobody
223 \end{verbatim}
224
225 The code for this feature was contributed by AltLinux.
226
227 \section{Bvfs API}
228 \label{sec:bvfs}
229
230 To help developers of restore GUI interfaces, we have added new \textsl{dot
231   commands} that permit browsing the catalog in a very simple way.
232
233 \begin{itemize}
234 \item \texttt{.bvfs\_update [jobid=x,y,z]} This command is required to update
235   the Bvfs cache in the catalog. You need to run it before any access to the
236   Bvfs layer.
237
238 \item \texttt{.bvfs\_lsdirs jobid=x,y,z path=/path | pathid=101} This command
239   will list all directories in the specified \texttt{path} or
240   \texttt{pathid}. Using \texttt{pathid} avoids problems with character
241   encoding of path/filenames.
242
243 \item \texttt{.bvfs\_lsfiles jobid=x,y,z path=/path | pathid=101} This command
244   will list all files in the specified \texttt{path} or \texttt{pathid}. Using
245   \texttt{pathid} avoids problems with character encoding.
246 \end{itemize}
247
248 You can use \texttt{limit=xxx} and \texttt{offset=yyy} to limit the amount of
249 data that will be displayed.
250
251 \begin{verbatim}
252 * .bvfs_update jobid=1,2
253 * .bvfs_update
254 * .bvfs_lsdir path=/ jobid=1,2
255 \end{verbatim}
256
257 This project was funded by Bacula Systems.
258
259 \section{Testing your Tape Drive}
260 \label{sec:btapespeed}
261
262 To determine the best configuration of your tape drive, you can run the new
263 \texttt{speed} command available in the \texttt{btape} program.
264
265 This command can have the following arguments:
266 \begin{itemize}
267 \item[\texttt{file\_size=n}] Specify the Maximum File Size for this test
268   (between 1 and 5GB). This counter is in GB.
269 \item[\texttt{nb\_file=n}] Specify the number of file to be written. The amount
270   of data should be greater than your memory ($file\_size*nb\_file$).
271 \item[\texttt{skip\_zero}] This flag permits to skip tests with constant
272   data.
273 \item[\texttt{skip\_random}] This flag permits to skip tests with random
274   data.
275 \item[\texttt{skip\_raw}] This flag permits to skip tests with raw access.
276 \item[\texttt{skip\_block}] This flag permits to skip tests with Bacula block
277   access.
278 \end{itemize}
279
280 \begin{verbatim}
281 *speed file_size=3 skip_raw
282 btape.c:1078 Test with zero data and bacula block structure.
283 btape.c:956 Begin writing 3 files of 3.221 GB with blocks of 129024 bytes.
284 ++++++++++++++++++++++++++++++++++++++++++
285 btape.c:604 Wrote 1 EOF to "Drive-0" (/dev/nst0)
286 btape.c:406 Volume bytes=3.221 GB. Write rate = 44.128 MB/s
287 ...
288 btape.c:383 Total Volume bytes=9.664 GB. Total Write rate = 43.531 MB/s
289
290 btape.c:1090 Test with random data, should give the minimum throughput.
291 btape.c:956 Begin writing 3 files of 3.221 GB with blocks of 129024 bytes.
292 +++++++++++++++++++++++++++++++++++++++++++
293 btape.c:604 Wrote 1 EOF to "Drive-0" (/dev/nst0)
294 btape.c:406 Volume bytes=3.221 GB. Write rate = 7.271 MB/s
295 +++++++++++++++++++++++++++++++++++++++++++
296 ...
297 btape.c:383 Total Volume bytes=9.664 GB. Total Write rate = 7.365 MB/s
298
299 \end{verbatim}
300
301 When using compression, the random test will give your the minimum throughput
302 of your drive . The test using constant string will give you the maximum speed
303 of your hardware chain. (cpu, memory, scsi card, cable, drive, tape).
304
305 You can change the block size in the Storage Daemon configuration file.
306
307 \section{New {\bf Block Checksum} Device Directive}
308 You may now turn off the Block Checksum (CRC32) code
309 that Bacula uses when writing blocks to a Volume.  This is
310 done by adding:
311
312 \begin{verbatim}
313 Block Checksum = no
314 \end{verbatim}
315
316 doing so can reduce the Storage daemon CPU usage slightly.  It
317 will also permit Bacula to read a Volume that has corrupted data.
318
319 The default is {\bf yes} -- i.e. the checksum is computed on write
320 and checked on read. 
321
322 We do not recommend to turn this off particularly on older tape
323 drives or for disk Volumes where doing so may allow corrupted data
324 to go undetected.
325
326 \section{New Bat Features}
327
328 Those new features were funded by Bacula Systems.
329
330 \subsection{Media List View}
331
332 By clicking on ``Media'', you can see the list of all your volumes. You will be
333 able to filter by Pool, Media Type, Location,\dots And sort the result directly
334 in the table. The old ``Media'' view is now known as ``Pool''.
335 \begin{figure}[htbp]
336   \centering
337   \includegraphics[width=13cm]{\idir bat-mediaview.eps}
338   \label{fig:mediaview}
339 \end{figure}
340
341
342 \subsection{Media Information View}
343
344 By double-clicking on a volume (on the Media list, in the Autochanger content
345 or in the Job information panel), you can access a detailed overview of your
346 Volume. (cf \ref{fig:mediainfo}.)
347 \begin{figure}[htbp]
348   \centering
349   \includegraphics[width=13cm]{\idir bat11.eps}  
350   \caption{Media information}
351   \label{fig:mediainfo}
352 \end{figure}
353
354 \subsection{Job Information View}
355
356 By double-clicking on a Job record (on the Job run list or in the Media
357 information panel), you can access a detailed overview of your Job. (cf
358 \ref{fig:jobinfo}.)
359 \begin{figure}[htbp]
360   \centering
361   \includegraphics[width=13cm]{\idir bat12.eps}  
362   \caption{Job information}
363   \label{fig:jobinfo}
364 \end{figure}
365
366 \subsection{Autochanger Content View}
367
368 By double-clicking on a Storage record (on the Storage list panel), you can
369 access a detailed overview of your Autochanger. (cf \ref{fig:jobinfo}.)
370 \begin{figure}[htbp]
371   \centering
372   \includegraphics[width=13cm]{\idir bat13.eps}  
373   \caption{Autochanger content}
374   \label{fig:achcontent}
375 \end{figure}
376
377 To use this feature, you need to use the latest mtx-changer script
378 version. (With new \texttt{listall} and \texttt{transfer} commands)
379
380 \section{Bat on Windows}
381 We have ported {\bf bat} to Windows and it is now installed 
382 by default when the installer is run.  It works quite well 
383 on Win32, but has not had a lot of testing there, so your
384 feedback would be welcome.  Unfortunately, eventhough it is
385 installed by default, it does not yet work on 64 bit Windows
386 operating systems.
387
388 \section{New Win32 Installer}
389 The Win32 installer has been modified in several very important
390 ways.  
391 \begin{itemize}
392 \item You must deinstall any current version of the
393 Win32 File daemon before upgrading to the new one. 
394 If you forget to do so, the new installation will fail.
395 To correct this failure, you must manually shutdown 
396 and deinstall the old File daemon. 
397 \item All files (other than menu links) are installed
398 in {\bf c:/Program Files/Bacula}.  
399 \item The installer no longer sets this
400 file to require administrator privileges by default. If you want
401 to do so, please do it manually using the {\bf cacls} program.
402 For example:
403 \begin{verbatim}
404 cacls "C:\Program Files\Bacula" /T /G SYSTEM:F Administrators:F
405 \end{verbatim}
406 \item The server daemons (Director and Storage daemon) are
407 no longer included in the Windows installer.  If you want the
408 Windows servers, you will either need to build them yourself (note
409 they have not been ported to 64 bits), or you can contact 
410 Bacula Systems about this.
411 \end{itemize}
412
413 \section{Win64 Installer}
414 We have corrected a number of problems that required manual
415 editing of the conf files.  In most cases, it should now
416 install and work.  {\bf bat} is by default installed in
417 {\bf c:/Program Files/Bacula/bin32} rather than
418 {\bf c:/Program Files/Bacula} as is the case with the 32
419 bit Windows installer.
420
421 \section{Bare Metal Recovery USB Key}
422 We have made a number of significant improvements in the
423 Bare Metal Recovery USB key.  Please see the README files
424 it the {\bf rescue} release for more details.
425
426
427
428 \section{bconsole Timeout Option}
429 You can now use the -u option of {\bf bconsole} to set a timeout in seconds
430 for commands. This is useful with GUI programs that use {\bf bconsole}
431 to interface to the Director.
432
433 \section{Important Changes}
434 \label{sec:importantchanges}
435
436 \begin{itemize}
437 \item You are now allowed to Migrate, Copy, and Virtual Full to read and write
438   to the same Pool. The Storage daemon ensures that you do not read and
439   write to the same Volume.
440 \item The \texttt{Device Poll Interval} is now 5 minutes. (previously did not
441   poll by default).
442 \item The new \texttt{mtx-changer} script has two new options, \texttt{listall}
443   and \texttt{transfer}. Be sure to apply any custom changes on to the 
444   mtx-changer script, or better yet, use mtx-changer.conf to configure
445   them.
446 \item To enhance security of the \texttt{BackupCatalog} job, we provide a new
447   script (\texttt{make\_catalog\_backup.pl}) that does not expose your catalog
448   password. If you want to use the new script, you will need to 
449   manually change the \texttt{BackupCatalog} Job definition.
450 \item The \texttt{bconsole} \texttt{help} command now accepts
451   an argument, which if provided produces information on that
452   command (ex: \texttt{help run}).
453 \end{itemize}
454
455 \subsection{Custom Catalog queries}
456
457 If you wish to add specialized commands that list the contents of the catalog,
458 you can do so by adding them to the \texttt{query.sql} file. This
459 \texttt{query.sql} file is now empty by default.  The file
460 \texttt{examples/sample-query.sql} has an a number of sample commands
461 you might find useful.
462
463 \subsection{Deprecated parts}
464
465 The following items have been \textbf{deprecated} for a long time, and are now
466 removed from the code.
467 \begin{itemize}
468 \item Gnome console
469 \item Support for SQLite 2
470 \end{itemize}
471
472 \section{Misc Changes}
473 \label{sec:miscchanges}
474
475 \begin{itemize}
476 \item Updated Nagios check\_bacula
477 \item Updated man files
478 \item Added OSX package generation script in platforms/darwin
479 \item Added Spanish and Ukrainian Bacula translations
480 \item Enable/disable command shows only Jobs that can change
481 \item Added \texttt{show disabled} command to show disabled Jobs
482 \item Many ACL improvements
483 \item Added Level to FD status Job output
484 \item Begin Ingres DB driver (not yet working)
485 \item Split RedHat spec files into bacula, bat, mtx, and docs
486 \item Reorganized the manuals (fewer separate manuals)
487 \item Added lock/unlock order protection in lock manager
488 \item Allow 64 bit sizes for a number of variables
489 \item Fixed several deadlocks or potential race conditions in the SD
490 \end{itemize}
491
492 \chapter{Released Version 3.0.3 and 3.0.3a}
493
494 There are no new features in version 3.0.3.  This version simply fixes a
495 number of bugs found in version 3.0.2 during the onging development
496 process.
497
498 \chapter{New Features in Released Version 3.0.2}
499
500 This chapter presents the new features added to the
501 Released Bacula Version 3.0.2.
502
503 \section{Full Restore from a Given JobId}
504 \index[general]{Restore menu}
505
506 This feature allows selecting a single JobId and having Bacula
507 automatically select all the other jobs that comprise a full backup up to
508 and including the selected date (through JobId).
509
510 Assume we start with the following jobs:
511 \begin{verbatim}
512 +-------+--------------+---------------------+-------+----------+------------+
513 | jobid | client       | starttime           | level | jobfiles | jobbytes   |
514 +-------+--------------+---------------------+-------+----------+------------
515 | 6     | localhost-fd | 2009-07-15 11:45:49 | I     | 2        | 0          |
516 | 5     | localhost-fd | 2009-07-15 11:45:45 | I     | 15       | 44143      |
517 | 3     | localhost-fd | 2009-07-15 11:45:38 | I     | 1        | 10         |
518 | 1     | localhost-fd | 2009-07-15 11:45:30 | F     | 1527     | 44143073   |
519 +-------+--------------+---------------------+-------+----------+------------+
520 \end{verbatim}
521
522 Below is an example of this new feature (which is number 12 in the
523 menu).
524
525 \begin{verbatim}
526 * restore
527 To select the JobIds, you have the following choices:
528      1: List last 20 Jobs run
529      2: List Jobs where a given File is saved
530 ...
531     12: Select full restore to a specified Job date
532     13: Cancel
533
534 Select item:  (1-13): 12
535 Enter JobId to get the state to restore: 5
536 Selecting jobs to build the Full state at 2009-07-15 11:45:45
537 You have selected the following JobIds: 1,3,5
538
539 Building directory tree for JobId(s) 1,3,5 ...  +++++++++++++++++++
540 1,444 files inserted into the tree.
541 \end{verbatim}
542
543 This project was funded by Bacula Systems.
544
545 \section{Source Address}
546 \index[general]{Source Address}
547
548 A feature has been added which allows the administrator to specify the address
549 from which the Director and File daemons will establish connections.  This
550 may be used to simplify system configuration overhead when working in complex
551 networks utilizing multi-homing and policy-routing.
552
553 To accomplish this, two new configuration directives have been implemented:
554 \begin{verbatim}
555 FileDaemon {
556   FDSourceAddress=10.0.1.20    # Always initiate connections from this address
557 }
558
559 Director {
560   DirSourceAddress=10.0.1.10   # Always initiate connections from this address
561 }
562 \end{verbatim}
563
564 Simply adding specific host routes on the OS
565 would have an undesirable side-effect: any
566 application trying to contact the destination host would be forced to use the
567 more specific route possibly diverting management traffic onto a backup VLAN.
568 Instead of adding host routes for each client connected to a multi-homed backup
569 server (for example where there are management and backup VLANs), one can
570 use the new directives to specify a specific source address at the application
571 level.
572
573 Additionally, this allows the simplification and abstraction of firewall rules
574 when dealing with a Hot-Standby director or storage daemon configuration.  The
575 Hot-standby pair may share a CARP address, which connections must be sourced
576 from, while system services listen and act from the unique interface addresses.
577
578 This project was funded by Collaborative Fusion, Inc.
579
580 \section{Show volume availability when doing restore}
581
582 When doing a restore the selection dialog ends by displaying this
583 screen:
584
585 \begin{verbatim}
586   The job will require the following
587    Volume(s)                 Storage(s)                SD Device(s)
588    ===========================================================================
589    *000741L3                  LTO-4                     LTO3 
590    *000866L3                  LTO-4                     LTO3 
591    *000765L3                  LTO-4                     LTO3 
592    *000764L3                  LTO-4                     LTO3 
593    *000756L3                  LTO-4                     LTO3 
594    *001759L3                  LTO-4                     LTO3 
595    *001763L3                  LTO-4                     LTO3 
596     001762L3                  LTO-4                     LTO3 
597     001767L3                  LTO-4                     LTO3 
598
599 Volumes marked with ``*'' are online (in the autochanger).
600 \end{verbatim}
601
602 This should help speed up large restores by minimizing the time spent
603 waiting for the operator to discover that he must change tapes in the library.
604
605 This project was funded by Bacula Systems.
606
607 \section{Accurate estimate command}
608
609 The \texttt{estimate} command can now use the accurate code to detect changes
610 and give a better estimation.
611
612 You can set the accurate behavior on the command line by using
613 \texttt{accurate=yes\vb{}no} or use the Job setting as default value.
614
615 \begin{verbatim}
616 * estimate listing accurate=yes level=incremental job=BackupJob
617 \end{verbatim}
618
619 This project was funded by Bacula Systems.
620
621 \chapter{New Features in 3.0.0}
622 \label{NewFeaturesChapter}
623 \index[general]{New Features}
624
625 This chapter presents the new features added to the development 2.5.x
626 versions to be released as Bacula version 3.0.0 sometime in April 2009.
627
628 \section{Accurate Backup}
629 \index[general]{Accurate Backup}
630
631 As with most other backup programs, by default Bacula decides what files to
632 backup for Incremental and Differental backup by comparing the change
633 (st\_ctime) and modification (st\_mtime) times of the file to the time the last
634 backup completed.  If one of those two times is later than the last backup
635 time, then the file will be backed up.  This does not, however, permit tracking
636 what files have been deleted and will miss any file with an old time that may
637 have been restored to or moved onto the client filesystem.
638
639 \subsection{Accurate = \lt{}yes\vb{}no\gt{}}
640 If the {\bf Accurate = \lt{}yes\vb{}no\gt{}} directive is enabled (default no) in
641 the Job resource, the job will be run as an Accurate Job. For a {\bf Full}
642 backup, there is no difference, but for {\bf Differential} and {\bf
643   Incremental} backups, the Director will send a list of all previous files
644 backed up, and the File daemon will use that list to determine if any new files
645 have been added or or moved and if any files have been deleted. This allows
646 Bacula to make an accurate backup of your system to that point in time so that
647 if you do a restore, it will restore your system exactly.  
648
649 One note of caution
650 about using Accurate backup is that it requires more resources (CPU and memory)
651 on both the Director and the Client machines to create the list of previous
652 files backed up, to send that list to the File daemon, for the File daemon to
653 keep the list (possibly very big) in memory, and for the File daemon to do
654 comparisons between every file in the FileSet and the list.  In particular,
655 if your client has lots of files (more than a few million), you will need
656 lots of memory on the client machine.
657
658 Accurate must not be enabled when backing up with a plugin that is not
659 specially designed to work with Accurate. If you enable it, your restores
660 will probably not work correctly.
661
662 This project was funded by Bacula Systems.
663                                        
664
665
666 \section{Copy Jobs}
667 \index[general]{Copy Jobs}
668
669 A new {\bf Copy} job type 'C' has been implemented. It is similar to the
670 existing Migration feature with the exception that the Job that is copied is
671 left unchanged.  This essentially creates two identical copies of the same
672 backup. However, the copy is treated as a copy rather than a backup job, and
673 hence is not directly available for restore.  The {\bf restore} command lists
674 copy jobs and allows selection of copies by using \texttt{jobid=}
675 option. If the keyword {\bf copies} is present on the command line, Bacula will
676 display the list of all copies for selected jobs.
677
678 \begin{verbatim}
679 * restore copies
680 [...]
681 These JobIds have copies as follows:
682 +-------+------------------------------------+-----------+------------------+
683 | JobId | Job                                | CopyJobId | MediaType        |
684 +-------+------------------------------------+-----------+------------------+
685 | 2     | CopyJobSave.2009-02-17_16.31.00.11 | 7         | DiskChangerMedia |
686 +-------+------------------------------------+-----------+------------------+
687 +-------+-------+----------+----------+---------------------+------------------+
688 | JobId | Level | JobFiles | JobBytes | StartTime           | VolumeName       |
689 +-------+-------+----------+----------+---------------------+------------------+
690 | 19    | F     | 6274     | 76565018 | 2009-02-17 16:30:45 | ChangerVolume002 |
691 | 2     | I     | 1        | 5        | 2009-02-17 16:30:51 | FileVolume001    |
692 +-------+-------+----------+----------+---------------------+------------------+
693 You have selected the following JobIds: 19,2
694
695 Building directory tree for JobId(s) 19,2 ...  ++++++++++++++++++++++++++++++++++++++++++++
696 5,611 files inserted into the tree.
697 ...
698 \end{verbatim}
699
700
701 The Copy Job runs without using the File daemon by copying the data from the
702 old backup Volume to a different Volume in a different Pool. See the Migration
703 documentation for additional details. For copy Jobs there is a new selection
704 directive named {\bf PoolUncopiedJobs} which selects all Jobs that were
705 not already copied to another Pool. 
706
707 As with Migration, the Client, Volume, Job, or SQL query, are
708 other possible ways of selecting the Jobs to be copied. Selection
709 types like SmallestVolume, OldestVolume, PoolOccupancy and PoolTime also
710 work, but are probably more suited for Migration Jobs. 
711
712 If Bacula finds a Copy of a job record that is purged (deleted) from the catalog,
713 it will promote the Copy to a \textsl{real} backup job and will make it available for
714 automatic restore. If more than one Copy is available, it will promote the copy
715 with the smallest JobId.
716
717 A nice solution which can be built with the new Copy feature is often
718 called disk-to-disk-to-tape backup (DTDTT). A sample config could
719 look something like the one below:
720
721 \begin{verbatim}
722 Pool {
723   Name = FullBackupsVirtualPool
724   Pool Type = Backup
725   Purge Oldest Volume = Yes
726   Storage = vtl
727   NextPool = FullBackupsTapePool
728 }
729
730 Pool {
731   Name = FullBackupsTapePool
732   Pool Type = Backup
733   Recycle = Yes
734   AutoPrune = Yes
735   Volume Retention = 365 days
736   Storage = superloader
737 }
738
739 #
740 # Fake fileset for copy jobs
741 #
742 Fileset {
743   Name = None
744   Include {
745     Options {
746       signature = MD5
747     }
748   }
749 }
750
751 #
752 # Fake client for copy jobs
753 #
754 Client {
755   Name = None
756   Address = localhost
757   Password = "NoNe"
758   Catalog = MyCatalog
759 }
760
761 #
762 # Default template for a CopyDiskToTape Job
763 #
764 JobDefs {
765   Name = CopyDiskToTape
766   Type = Copy
767   Messages = StandardCopy
768   Client = None
769   FileSet = None
770   Selection Type = PoolUncopiedJobs
771   Maximum Concurrent Jobs = 10
772   SpoolData = No
773   Allow Duplicate Jobs = Yes
774   Allow Higher Duplicates = No
775   Cancel Queued Duplicates = No
776   Cancel Running Duplicates = No
777   Priority = 13
778 }
779
780 Schedule {
781    Name = DaySchedule7:00
782    Run = Level=Full daily at 7:00
783 }
784
785 Job {
786   Name = CopyDiskToTapeFullBackups
787   Enabled = Yes
788   Schedule = DaySchedule7:00
789   Pool = FullBackupsVirtualPool
790   JobDefs = CopyDiskToTape
791 }
792 \end{verbatim}
793
794 The example above had 2 pool which are copied using the PoolUncopiedJobs
795 selection criteria. Normal Full backups go to the Virtual pool and are copied
796 to the Tape pool the next morning.
797
798 The command \texttt{list copies [jobid=x,y,z]} lists copies for a given
799 \textbf{jobid}.
800
801 \begin{verbatim}
802 *list copies
803 +-------+------------------------------------+-----------+------------------+
804 | JobId | Job                                | CopyJobId | MediaType        |
805 +-------+------------------------------------+-----------+------------------+
806 |     9 | CopyJobSave.2008-12-20_22.26.49.05 |        11 | DiskChangerMedia |
807 +-------+------------------------------------+-----------+------------------+
808 \end{verbatim}
809
810 \section{ACL Updates}
811 \index[general]{ACL Updates}
812 The whole ACL code had been overhauled and in this version each platforms has
813 different streams for each type of acl available on such an platform. As ACLs
814 between platforms tend to be not that portable (most implement POSIX acls but
815 some use an other draft or a completely different format) we currently only
816 allow certain platform specific ACL streams to be decoded and restored on the
817 same platform that they were created on.  The old code allowed to restore ACL
818 cross platform but the comments already mention that not being to wise. For
819 backward compatability the new code will accept the two old ACL streams and
820 handle those with the platform specific handler. But for all new backups it
821 will save the ACLs using the new streams.
822
823 Currently the following platforms support ACLs:
824
825 \begin{itemize}
826  \item {\bf AIX}
827  \item {\bf Darwin/OSX}
828  \item {\bf FreeBSD}
829  \item {\bf HPUX}
830  \item {\bf IRIX}
831  \item {\bf Linux}
832  \item {\bf Tru64}
833  \item {\bf Solaris}
834 \end{itemize}
835
836 Currently we support the following ACL types (these ACL streams use a reserved
837 part of the stream numbers):
838
839 \begin{itemize}
840 \item {\bf STREAM\_ACL\_AIX\_TEXT} 1000 AIX specific string representation from
841   acl\_get
842  \item {\bf STREAM\_ACL\_DARWIN\_ACCESS\_ACL} 1001 Darwin (OSX) specific acl\_t
843    string representation from acl\_to\_text (POSIX acl)
844   \item {\bf STREAM\_ACL\_FREEBSD\_DEFAULT\_ACL} 1002 FreeBSD specific acl\_t
845     string representation from acl\_to\_text (POSIX acl) for default acls.
846   \item {\bf STREAM\_ACL\_FREEBSD\_ACCESS\_ACL} 1003 FreeBSD specific acl\_t
847     string representation from acl\_to\_text (POSIX acl) for access acls.
848   \item {\bf STREAM\_ACL\_HPUX\_ACL\_ENTRY} 1004 HPUX specific acl\_entry
849     string representation from acltostr (POSIX acl)
850   \item {\bf STREAM\_ACL\_IRIX\_DEFAULT\_ACL} 1005 IRIX specific acl\_t string
851     representation from acl\_to\_text (POSIX acl) for default acls.
852   \item {\bf STREAM\_ACL\_IRIX\_ACCESS\_ACL} 1006 IRIX specific acl\_t string
853     representation from acl\_to\_text (POSIX acl) for access acls.
854   \item {\bf STREAM\_ACL\_LINUX\_DEFAULT\_ACL} 1007 Linux specific acl\_t
855     string representation from acl\_to\_text (POSIX acl) for default acls.
856   \item {\bf STREAM\_ACL\_LINUX\_ACCESS\_ACL} 1008 Linux specific acl\_t string
857     representation from acl\_to\_text (POSIX acl) for access acls.
858   \item {\bf STREAM\_ACL\_TRU64\_DEFAULT\_ACL} 1009 Tru64 specific acl\_t
859     string representation from acl\_to\_text (POSIX acl) for default acls.
860   \item {\bf STREAM\_ACL\_TRU64\_DEFAULT\_DIR\_ACL} 1010 Tru64 specific acl\_t
861     string representation from acl\_to\_text (POSIX acl) for default acls.
862   \item {\bf STREAM\_ACL\_TRU64\_ACCESS\_ACL} 1011 Tru64 specific acl\_t string
863     representation from acl\_to\_text (POSIX acl) for access acls.
864   \item {\bf STREAM\_ACL\_SOLARIS\_ACLENT} 1012 Solaris specific aclent\_t
865     string representation from acltotext or acl\_totext (POSIX acl)
866   \item {\bf STREAM\_ACL\_SOLARIS\_ACE} 1013 Solaris specific ace\_t string
867     representation from from acl\_totext (NFSv4 or ZFS acl)
868 \end{itemize}
869
870 In future versions we might support conversion functions from one type of acl
871 into an other for types that are either the same or easily convertable. For now
872 the streams are seperate and restoring them on a platform that doesn't
873 recognize them will give you a warning.
874
875 \section{Extended Attributes}
876 \index[general]{Extended Attributes}
877 Something that was on the project list for some time is now implemented for
878 platforms that support a similar kind of interface. Its the support for backup
879 and restore of so called extended attributes. As extended attributes are so
880 platform specific these attributes are saved in seperate streams for each
881 platform.  Restores of the extended attributes can only be performed on the
882 same platform the backup was done.  There is support for all types of extended
883 attributes, but restoring from one type of filesystem onto an other type of
884 filesystem on the same platform may lead to supprises.  As extended attributes
885 can contain any type of data they are stored as a series of so called
886 value-pairs.  This data must be seen as mostly binary and is stored as such.
887 As security labels from selinux are also extended attributes this option also
888 stores those labels and no specific code is enabled for handling selinux
889 security labels.
890
891 Currently the following platforms support extended attributes:
892 \begin{itemize}
893  \item {\bf Darwin/OSX}
894  \item {\bf FreeBSD}
895  \item {\bf Linux}
896  \item {\bf NetBSD}
897 \end{itemize}
898
899 On linux acls are also extended attributes, as such when you enable ACLs on a
900 Linux platform it will NOT save the same data twice e.g. it will save the ACLs
901 and not the same exteneded attribute.
902
903 To enable the backup of extended attributes please add the following to your
904 fileset definition.
905 \begin{verbatim}
906   FileSet {
907     Name = "MyFileSet"
908     Include {
909       Options {
910         signature = MD5
911         xattrsupport = yes
912       }
913       File = ...
914     }
915   }
916 \end{verbatim}
917
918 \section{Shared objects}
919 \index[general]{Shared objects}
920 A default build of Bacula will now create the libraries as shared objects
921 (.so) rather than static libraries as was previously the case.  
922 The shared libraries are built using {\bf libtool} so it should be quite
923 portable.
924
925 An important advantage of using shared objects is that on a machine with the
926 Directory, File daemon, the Storage daemon, and a console, you will have only
927 one copy of the code in memory rather than four copies.  Also the total size of
928 the binary release is smaller since the library code appears only once rather
929 than once for every program that uses it; this results in significant reduction
930 in the size of the binaries particularly for the utility tools.
931  
932 In order for the system loader to find the shared objects when loading the
933 Bacula binaries, the Bacula shared objects must either be in a shared object
934 directory known to the loader (typically /usr/lib) or they must be in the
935 directory that may be specified on the {\bf ./configure} line using the {\bf
936   {-}{-}libdir} option as:
937
938 \begin{verbatim}
939   ./configure --libdir=/full-path/dir
940 \end{verbatim}
941
942 the default is /usr/lib. If {-}{-}libdir is specified, there should be
943 no need to modify your loader configuration provided that
944 the shared objects are installed in that directory (Bacula
945 does this with the make install command). The shared objects
946 that Bacula references are:
947
948 \begin{verbatim}
949 libbaccfg.so
950 libbacfind.so
951 libbacpy.so
952 libbac.so
953 \end{verbatim}
954
955 These files are symbolically linked to the real shared object file,
956 which has a version number to permit running multiple versions of
957 the libraries if desired (not normally the case).
958
959 If you have problems with libtool or you wish to use the old
960 way of building static libraries, or you want to build a static
961 version of Bacula you may disable
962 libtool on the configure command line with:
963
964 \begin{verbatim}
965   ./configure --disable-libtool
966 \end{verbatim}
967
968
969 \section{Building Static versions of Bacula}
970 \index[general]{Static linking}
971 In order to build static versions of Bacula, in addition
972 to configuration options that were needed you now must
973 also add --disable-libtool.  Example
974
975 \begin{verbatim}
976   ./configure --enable-static-client-only --disable-libtool
977 \end{verbatim}
978
979
980 \section{Virtual Backup (Vbackup)}
981 \index[general]{Virtual Backup}
982 \index[general]{Vbackup}
983
984 Bacula's virtual backup feature is often called Synthetic Backup or
985 Consolidation in other backup products.  It permits you to consolidate the
986 previous Full backup plus the most recent Differential backup and any
987 subsequent Incremental backups into a new Full backup.  This new Full
988 backup will then be considered as the most recent Full for any future
989 Incremental or Differential backups.  The VirtualFull backup is
990 accomplished without contacting the client by reading the previous backup
991 data and writing it to a volume in a different pool.
992
993 In some respects the Vbackup feature works similar to a Migration job, in
994 that Bacula normally reads the data from the pool specified in the 
995 Job resource, and writes it to the {\bf Next Pool} specified in the 
996 Job resource. Note, this means that usually the output from the Virtual
997 Backup is written into a different pool from where your prior backups
998 are saved. Doing it this way guarantees that you will not get a deadlock
999 situation attempting to read and write to the same volume in the Storage
1000 daemon. If you then want to do subsequent backups, you may need to
1001 move the Virtual Full Volume back to your normal backup pool.
1002 Alternatively, you can set your {\bf Next Pool} to point to the current
1003 pool.  This will cause Bacula to read and write to Volumes in the
1004 current pool. In general, this will work, because Bacula will
1005 not allow reading and writing on the same Volume. In any case, once
1006 a VirtualFull has been created, and a restore is done involving the
1007 most current Full, it will read the Volume or Volumes by the VirtualFull 
1008 regardless of in which Pool the Volume is found.
1009
1010 The Vbackup is enabled on a Job by Job in the Job resource by specifying
1011 a level of {\bf VirtualFull}.
1012
1013 A typical Job resource definition might look like the following:
1014
1015 \begin{verbatim}
1016 Job {
1017   Name = "MyBackup"
1018   Type = Backup
1019   Client=localhost-fd
1020   FileSet = "Full Set"
1021   Storage = File
1022   Messages = Standard
1023   Pool = Default
1024   SpoolData = yes
1025 }
1026
1027 # Default pool definition
1028 Pool {
1029   Name = Default
1030   Pool Type = Backup
1031   Recycle = yes            # Automatically recycle Volumes
1032   AutoPrune = yes          # Prune expired volumes
1033   Volume Retention = 365d  # one year
1034   NextPool = Full
1035   Storage = File
1036 }
1037
1038 Pool {
1039   Name = Full
1040   Pool Type = Backup
1041   Recycle = yes            # Automatically recycle Volumes
1042   AutoPrune = yes          # Prune expired volumes
1043   Volume Retention = 365d  # one year
1044   Storage = DiskChanger
1045 }
1046
1047 # Definition of file storage device
1048 Storage {
1049   Name = File
1050   Address = localhost
1051   Password = "xxx"
1052   Device = FileStorage
1053   Media Type = File
1054   Maximum Concurrent Jobs = 5
1055 }
1056
1057 # Definition of DDS Virtual tape disk storage device
1058 Storage {
1059   Name = DiskChanger
1060   Address = localhost  # N.B. Use a fully qualified name here
1061   Password = "yyy"
1062   Device = DiskChanger
1063   Media Type = DiskChangerMedia
1064   Maximum Concurrent Jobs = 4
1065   Autochanger = yes
1066 }
1067 \end{verbatim}
1068
1069 Then in bconsole or via a Run schedule, you would run the job as:
1070
1071 \begin{verbatim}
1072 run job=MyBackup level=Full
1073 run job=MyBackup level=Incremental
1074 run job=MyBackup level=Differential
1075 run job=MyBackup level=Incremental
1076 run job=MyBackup level=Incremental
1077 \end{verbatim}
1078
1079 So providing there were changes between each of those jobs, you would end up
1080 with a Full backup, a Differential, which includes the first Incremental
1081 backup, then two Incremental backups.  All the above jobs would be written to
1082 the {\bf Default} pool.
1083
1084 To consolidate those backups into a new Full backup, you would run the
1085 following:
1086
1087 \begin{verbatim}
1088 run job=MyBackup level=VirtualFull
1089 \end{verbatim}
1090
1091 And it would produce a new Full backup without using the client, and the output
1092 would be written to the {\bf Full} Pool which uses the Diskchanger Storage.
1093
1094 If the Virtual Full is run, and there are no prior Jobs, the Virtual Full will
1095 fail with an error.
1096
1097 Note, the Start and End time of the Virtual Full backup is set to the
1098 values for the last job included in the Virtual Full (in the above example,
1099 it is an Increment). This is so that if another incremental is done, which
1100 will be based on the Virtual Full, it will backup all files from the
1101 last Job included in the Virtual Full rather than from the time the Virtual
1102 Full was actually run.
1103
1104
1105
1106 \section{Catalog Format}
1107 \index[general]{Catalog Format}
1108 Bacula 3.0 comes with some changes to the catalog format.  The upgrade
1109 operation will convert the FileId field of the File table from 32 bits (max 4
1110 billion table entries) to 64 bits (very large number of items).  The
1111 conversion process can take a bit of time and will likely DOUBLE THE SIZE of
1112 your catalog during the conversion.  Also you won't be able to run jobs during
1113 this conversion period.  For example, a 3 million file catalog will take 2
1114 minutes to upgrade on a normal machine.  Please don't forget to make a valid
1115 backup of your database before executing the upgrade script. See the 
1116 ReleaseNotes for additional details.
1117
1118 \section{64 bit Windows Client}
1119 \index[general]{Win64 Client}
1120 Unfortunately, Microsoft's implementation of Volume Shadown Copy (VSS) on
1121 their 64 bit OS versions is not compatible with a 32 bit Bacula Client.
1122 As a consequence, we are also releasing a 64 bit version of the Bacula 
1123 Windows Client (win64bacula-3.0.0.exe) that does work with VSS. 
1124 These binaries should only be installed on 64 bit Windows operating systems.
1125 What is important is not your hardware but whether or not you have
1126 a 64 bit version of the Windows OS.  
1127
1128 Compared to the Win32 Bacula Client, the 64 bit release contains a few differences:
1129 \begin{enumerate}
1130 \item Before installing the Win64 Bacula Client, you must totally
1131       deinstall any prior 2.4.x Client installation using the 
1132       Bacula deinstallation (see the menu item). You may want
1133       to save your .conf files first.
1134 \item Only the Client (File daemon) is ported to Win64, the Director
1135       and the Storage daemon are not in the 64 bit Windows installer.
1136 \item bwx-console is not yet ported.
1137 \item bconsole is ported but it has not been tested.
1138 \item The documentation is not included in the installer.
1139 \item Due to Vista security restrictions imposed on a default installation
1140       of Vista, before upgrading the Client, you must manually stop
1141       any prior version of Bacula from running, otherwise the install
1142       will fail.
1143 \item Due to Vista security restrictions imposed on a default installation
1144       of Vista, attempting to edit the conf files via the menu items
1145       will fail. You must directly edit the files with appropriate 
1146       permissions.  Generally double clicking on the appropriate .conf
1147       file will work providing you have sufficient permissions.
1148 \item All Bacula files are now installed in 
1149       {\bf C:/Program Files/Bacula} except the main menu items,
1150       which are installed as before. This vastly simplifies the installation.
1151 \item If you are running on a foreign language version of Windows, most
1152       likely {\bf C:/Program Files} does not exist, so you should use the
1153       Custom installation and enter an appropriate location to install
1154       the files.
1155 \item The 3.0.0 Win32 Client continues to install files in the locations used
1156       by prior versions. For the next version we will convert it to use
1157       the same installation conventions as the Win64 version.
1158 \end{enumerate}
1159
1160 This project was funded by Bacula Systems.
1161
1162
1163 \section{Duplicate Job Control}
1164 \index[general]{Duplicate Jobs}
1165 The new version of Bacula provides four new directives that
1166 give additional control over what Bacula does if duplicate jobs 
1167 are started.  A duplicate job in the sense we use it here means
1168 a second or subsequent job with the same name starts.  This
1169 happens most frequently when the first job runs longer than expected because no 
1170 tapes are available.
1171
1172 The four directives each take as an argument a {\bf yes} or {\bf no} value and
1173 are specified in the Job resource.
1174
1175 They are:
1176
1177 \subsection{Allow Duplicate Jobs = \lt{}yes\vb{}no\gt{}}
1178 \index[general]{Allow Duplicate Jobs}
1179   If this directive is enabled duplicate jobs will be run.  If
1180   the directive is set to {\bf no} (default) then only one job of a given name
1181   may run at one time, and the action that Bacula takes to ensure only
1182   one job runs is determined by the other directives (see below).
1183  
1184   If {\bf Allow Duplicate Jobs} is set to {\bf no} and two jobs
1185   are present and none of the three directives given below permit
1186   cancelling a job, then the current job (the second one started)
1187   will be cancelled.
1188
1189
1190 \subsection{Allow Higher Duplicates = \lt{}yes\vb{}no\gt{}}
1191 \index[general]{Allow Higher Duplicates}
1192   If this directive is set to {\bf yes} (default) the job with a higher
1193   priority (lower priority number) will be permitted to run, and
1194   the current job will be cancelled.  If the
1195   priorities of the two jobs are the same, the outcome is determined by
1196   other directives (see below).
1197
1198 \subsection{Cancel Queued Duplicates = \lt{}yes\vb{}no\gt{}}
1199 \index[general]{Cancel Queued Duplicates}
1200   If {\bf Allow Duplicate Jobs} is set to {\bf no} and
1201   if this directive is set to {\bf yes} any job that is
1202   already queued to run but not yet running will be canceled.
1203   The default is {\bf no}. 
1204
1205 \subsection{Cancel Running Duplicates = \lt{}yes\vb{}no\gt{}}
1206 \index[general]{Cancel Running Duplicates}
1207   If {\bf Allow Duplicate Jobs} is set to {\bf no} and
1208   if this directive is set to {\bf yes} any job that is already running
1209   will be canceled.  The default is {\bf no}.
1210
1211
1212 \section{TLS Authentication}
1213 \index[general]{TLS Authentication}
1214 In Bacula version 2.5.x and later, in addition to the normal Bacula
1215 CRAM-MD5 authentication that is used to authenticate each Bacula
1216 connection, you can specify that you want TLS Authentication as well,
1217 which will provide more secure authentication.
1218
1219 This new feature uses Bacula's existing TLS code (normally used for
1220 communications encryption) to do authentication.  To use it, you must
1221 specify all the TLS directives normally used to enable communications
1222 encryption (TLS Enable, TLS Verify Peer, TLS Certificate, ...) and
1223 a new directive:
1224
1225 \subsection{TLS Authenticate = yes}
1226 \begin{verbatim}
1227 TLS Authenticate = yes
1228 \end{verbatim}
1229
1230 in the main daemon configuration resource (Director for the Director,
1231 Client for the File daemon, and Storage for the Storage daemon).
1232
1233 When {\bf TLS Authenticate} is enabled, after doing the CRAM-MD5
1234 authentication, Bacula will also do TLS authentication, then TLS 
1235 encryption will be turned off, and the rest of the communication between
1236 the two Bacula daemons will be done without encryption.
1237
1238 If you want to encrypt communications data, use the normal TLS directives
1239 but do not turn on {\bf TLS Authenticate}.
1240
1241 \section{bextract non-portable Win32 data}
1242 \index[general]{bextract handles Win32 non-portable data}
1243 {\bf bextract} has been enhanced to be able to restore
1244 non-portable Win32 data to any OS.  Previous versions were 
1245 unable to restore non-portable Win32 data to machines that
1246 did not have the Win32 BackupRead and BackupWrite API calls.
1247
1248 \section{State File updated at Job Termination}
1249 \index[general]{State File}
1250 In previous versions of Bacula, the state file, which provides a
1251 summary of previous jobs run in the {\bf status} command output was
1252 updated only when Bacula terminated, thus if the daemon crashed, the
1253 state file might not contain all the run data.  This version of
1254 the Bacula daemons updates the state file on each job termination.
1255
1256 \section{MaxFullInterval = \lt{}time-interval\gt{}}
1257 \index[general]{MaxFullInterval}
1258 The new Job resource directive {\bf Max Full Interval = \lt{}time-interval\gt{}}
1259 can be used to specify the maximum time interval between {\bf Full} backup
1260 jobs. When a job starts, if the time since the last Full backup is
1261 greater than the specified interval, and the job would normally be an
1262 {\bf Incremental} or {\bf Differential}, it will be automatically
1263 upgraded to a {\bf Full} backup.
1264
1265 \section{MaxDiffInterval = \lt{}time-interval\gt{}}
1266 \index[general]{MaxDiffInterval}
1267 The new Job resource directive {\bf Max Diff Interval = \lt{}time-interval\gt{}}
1268 can be used to specify the maximum time interval between {\bf Differential} backup
1269 jobs. When a job starts, if the time since the last Differential backup is
1270 greater than the specified interval, and the job would normally be an
1271 {\bf Incremental}, it will be automatically
1272 upgraded to a {\bf Differential} backup.
1273
1274 \section{Honor No Dump Flag = \lt{}yes\vb{}no\gt{}}
1275 \index[general]{MaxDiffInterval}
1276 On FreeBSD systems, each file has a {\bf no dump flag} that can be set
1277 by the user, and when it is set it is an indication to backup programs
1278 to not backup that particular file.  This version of Bacula contains a
1279 new Options directive within a FileSet resource, which instructs Bacula to
1280 obey this flag.  The new directive is:
1281
1282 \begin{verbatim}
1283   Honor No Dump Flag = yes\vb{}no
1284 \end{verbatim}
1285
1286 The default value is {\bf no}.
1287
1288
1289 \section{Exclude Dir Containing = \lt{}filename-string\gt{}}
1290 \index[general]{IgnoreDir}
1291 The {\bf ExcludeDirContaining = \lt{}filename\gt{}} is a new directive that
1292 can be added to the Include section of the FileSet resource.  If the specified
1293 filename ({\bf filename-string}) is found on the Client in any directory to be
1294 backed up, the whole directory will be ignored (not backed up).  For example:
1295
1296 \begin{verbatim}
1297   # List of files to be backed up
1298   FileSet {
1299     Name = "MyFileSet"
1300     Include {
1301       Options {
1302         signature = MD5
1303       }
1304       File = /home
1305       Exclude Dir Containing = .excludeme
1306     }
1307   }
1308 \end{verbatim}
1309
1310 But in /home, there may be hundreds of directories of users and some
1311 people want to indicate that they don't want to have certain
1312 directories backed up. For example, with the above FileSet, if
1313 the user or sysadmin creates a file named {\bf .excludeme} in 
1314 specific directories, such as
1315
1316 \begin{verbatim}
1317    /home/user/www/cache/.excludeme
1318    /home/user/temp/.excludeme
1319 \end{verbatim}
1320
1321 then Bacula will not backup the two directories named:
1322
1323 \begin{verbatim}
1324    /home/user/www/cache
1325    /home/user/temp
1326 \end{verbatim}
1327
1328 NOTE: subdirectories will not be backed up.  That is, the directive
1329 applies to the two directories in question and any children (be they
1330 files, directories, etc).
1331
1332
1333 \section{Bacula Plugins}
1334 \index[general]{Plugin}
1335 Support for shared object plugins has been implemented in the Linux, Unix
1336 and Win32 File daemons. The API will be documented separately in
1337 the Developer's Guide or in a new document.  For the moment, there is
1338 a single plugin named {\bf bpipe} that allows an external program to
1339 get control to backup and restore a file.
1340
1341 Plugins are also planned (partially implemented) in the Director and the
1342 Storage daemon.  
1343
1344 \subsection{Plugin Directory}
1345 \index[general]{Plugin Directory}
1346 Each daemon (DIR, FD, SD) has a new {\bf Plugin Directory} directive that may
1347 be added to the daemon definition resource. The directory takes a quoted 
1348 string argument, which is the name of the directory in which the daemon can
1349 find the Bacula plugins. If this directive is not specified, Bacula will not
1350 load any plugins. Since each plugin has a distinctive name, all the daemons
1351 can share the same plugin directory. 
1352
1353 \subsection{Plugin Options}
1354 \index[general]{Plugin Options}
1355 The {\bf Plugin Options} directive takes a quoted string
1356 arguement (after the equal sign) and may be specified in the
1357 Job resource.  The options specified will be passed to all plugins
1358 when they are run.  This each plugin must know what it is looking
1359 for. The value defined in the Job resource can be modified
1360 by the user when he runs a Job via the {\bf bconsole} command line 
1361 prompts.
1362
1363 Note: this directive may be specified, and there is code to modify
1364 the string in the run command, but the plugin options are not yet passed to
1365 the plugin (i.e. not fully implemented).
1366
1367 \subsection{Plugin Options ACL}
1368 \index[general]{Plugin Options ACL}
1369 The {\bf Plugin Options ACL} directive may be specified in the
1370 Director's Console resource. It functions as all the other ACL commands
1371 do by permitting users running restricted consoles to specify a 
1372 {\bf Plugin Options} that overrides the one specified in the Job
1373 definition. Without this directive restricted consoles may not modify
1374 the Plugin Options.
1375
1376 \subsection{Plugin = \lt{}plugin-command-string\gt{}}
1377 \index[general]{Plugin}
1378 The {\bf Plugin} directive is specified in the Include section of
1379 a FileSet resource where you put your {\bf File = xxx} directives.
1380 For example:
1381
1382 \begin{verbatim}
1383   FileSet {
1384     Name = "MyFileSet"
1385     Include {
1386       Options {
1387         signature = MD5
1388       }
1389       File = /home
1390       Plugin = "bpipe:..."
1391     }
1392   }
1393 \end{verbatim}
1394
1395 In the above example, when the File daemon is processing the directives
1396 in the Include section, it will first backup all the files in {\bf /home}
1397 then it will load the plugin named {\bf bpipe} (actually bpipe-dir.so) from
1398 the Plugin Directory.  The syntax and semantics of the Plugin directive
1399 require the first part of the string up to the colon (:) to be the name
1400 of the plugin. Everything after the first colon is ignored by the File daemon but
1401 is passed to the plugin. Thus the plugin writer may define the meaning of the
1402 rest of the string as he wishes.
1403
1404 Please see the next section for information about the {\bf bpipe} Bacula
1405 plugin.
1406
1407 \section{The bpipe Plugin}
1408 \index[general]{The bpipe Plugin}
1409 The {\bf bpipe} plugin is provided in the directory src/plugins/fd/bpipe-fd.c of
1410 the Bacula source distribution. When the plugin is compiled and linking into
1411 the resulting dynamic shared object (DSO), it will have the name {\bf bpipe-fd.so}.
1412
1413 The purpose of the plugin is to provide an interface to any system program for
1414 backup and restore. As specified above the {\bf bpipe} plugin is specified in
1415 the Include section of your Job's FileSet resource.  The full syntax of the
1416 plugin directive as interpreted by the {\bf bpipe} plugin (each plugin is free
1417 to specify the sytax as it wishes) is:
1418
1419 \begin{verbatim}
1420   Plugin = "<field1>:<field2>:<field3>:<field4>"
1421 \end{verbatim}
1422
1423 where
1424 \begin{description}
1425 \item {\bf field1} is the name of the plugin with the trailing {\bf -fd.so}
1426 stripped off, so in this case, we would put {\bf bpipe} in this field.
1427
1428 \item {\bf field2} specifies the namespace, which for {\bf bpipe} is the
1429 pseudo path and filename under which the backup will be saved. This pseudo
1430 path and filename will be seen by the user in the restore file tree.
1431 For example, if the value is {\bf /MYSQL/regress.sql}, the data
1432 backed up by the plugin will be put under that "pseudo" path and filename.
1433 You must be careful to choose a naming convention that is unique to avoid
1434 a conflict with a path and filename that actually exists on your system.
1435
1436 \item {\bf field3} for the {\bf bpipe} plugin 
1437 specifies the "reader" program that is called by the plugin during
1438 backup to read the data. {\bf bpipe} will call this program by doing a
1439 {\bf popen} on it.
1440
1441 \item {\bf field4} for the {\bf bpipe} plugin
1442 specifies the "writer" program that is called by the plugin during
1443 restore to write the data back to the filesystem.  
1444 \end{description}
1445
1446 Putting it all together, the full plugin directive line might look
1447 like the following:
1448
1449 \begin{verbatim}
1450 Plugin = "bpipe:/MYSQL/regress.sql:mysqldump -f 
1451           --opt --databases bacula:mysql"
1452 \end{verbatim}
1453
1454 The directive has been split into two lines, but within the {\bf bacula-dir.conf} file
1455 would be written on a single line.
1456
1457 This causes the File daemon to call the {\bf bpipe} plugin, which will write
1458 its data into the "pseudo" file {\bf /MYSQL/regress.sql} by calling the 
1459 program {\bf mysqldump -f --opt --database bacula} to read the data during
1460 backup. The mysqldump command outputs all the data for the database named
1461 {\bf bacula}, which will be read by the plugin and stored in the backup.
1462 During restore, the data that was backed up will be sent to the program
1463 specified in the last field, which in this case is {\bf mysql}.  When
1464 {\bf mysql} is called, it will read the data sent to it by the plugn
1465 then write it back to the same database from which it came ({\bf bacula}
1466 in this case).
1467
1468 The {\bf bpipe} plugin is a generic pipe program, that simply transmits 
1469 the data from a specified program to Bacula for backup, and then from Bacula to 
1470 a specified program for restore.
1471
1472 By using different command lines to {\bf bpipe},
1473 you can backup any kind of data (ASCII or binary) depending
1474 on the program called.
1475
1476 \section{Microsoft Exchange Server 2003/2007 Plugin}
1477 \index[general]{Microsoft Exchange Server 2003/2007 Plugin}
1478 \subsection{Background}
1479 The Exchange plugin was made possible by a funded development project
1480 between Equiinet Ltd -- www.equiinet.com (many thanks) and Bacula Systems.
1481 The code for the plugin was written by James Harper, and the Bacula core
1482 code by Kern Sibbald.  All the code for this funded development has become
1483 part of the Bacula project.  Thanks to everyone who made it happen.
1484
1485 \subsection{Concepts}
1486 Although it is possible to backup Exchange using Bacula VSS the Exchange 
1487 plugin adds a good deal of functionality, because while Bacula VSS
1488 completes a full backup (snapshot) of Exchange, it does
1489 not support Incremental or Differential backups, restoring is more
1490 complicated, and a single database restore is not possible.
1491
1492 Microsoft Exchange organises its storage into Storage Groups with
1493 Databases inside them. A default installation of Exchange will have a
1494 single Storage Group called 'First Storage Group', with two Databases
1495 inside it, "Mailbox Store (SERVER NAME)" and 
1496 "Public Folder Store (SERVER NAME)", 
1497 which hold user email and public folders respectively.
1498
1499 In the default configuration, Exchange logs everything that happens to
1500 log files, such that if you have a backup, and all the log files since,
1501 you can restore to the present time. Each Storage Group has its own set
1502 of log files and operates independently of any other Storage Groups. At
1503 the Storage Group level, the logging can be turned off by enabling a
1504 function called "Enable circular logging". At this time the Exchange
1505 plugin will not function if this option is enabled.
1506
1507 The plugin allows backing up of entire storage groups, and the restoring
1508 of entire storage groups or individual databases. Backing up and
1509 restoring at the individual mailbox or email item is not supported but
1510 can be simulated by use of the "Recovery" Storage Group (see below).
1511
1512 \subsection{Installing}
1513 The Exchange plugin requires a DLL that is shipped with Microsoft
1514 Exchanger Server called {\bf esebcli2.dll}. Assuming Exchange is installed
1515 correctly the Exchange plugin should find this automatically and run
1516 without any additional installation.
1517
1518 If the DLL can not be found automatically it will need to be copied into
1519 the Bacula installation
1520 directory (eg C:\verb+\+Program Files\verb+\+Bacula\verb+\+bin). The Exchange API DLL is
1521 named esebcli2.dll and is found in C:\verb+\+Program Files\verb+\+Exchsrvr\verb+\+bin on a
1522 default Exchange installation.
1523
1524 \subsection{Backing Up}
1525 To back up an Exchange server the Fileset definition must contain at
1526 least {\bf Plugin = "exchange:/@EXCHANGE/Microsoft Information Store"} for
1527 the backup to work correctly. The 'exchange:' bit tells Bacula to look
1528 for the exchange plugin, the '@EXCHANGE' bit makes sure all the backed
1529 up files are prefixed with something that isn't going to share a name
1530 with something outside the plugin, and the 'Microsoft Information Store'
1531 bit is required also. It is also possible to add the name of a storage
1532 group to the "Plugin =" line, eg \\
1533 {\bf Plugin = "exchange:/@EXCHANGE/Microsoft Information Store/First Storage Group"} \\
1534 if you want only a single storage group backed up.
1535
1536 Additionally, you can suffix the 'Plugin =' directive with
1537 ":notrunconfull" which will tell the plugin not to truncate the Exchange
1538 database at the end of a full backup.
1539
1540 An Incremental or Differential backup will backup only the database logs
1541 for each Storage Group by inspecting the "modified date" on each
1542 physical log file. Because of the way the Exchange API works, the last
1543 logfile backed up on each backup will always be backed up by the next
1544 Incremental or Differential backup too. This adds 5MB to each
1545 Incremental or Differential backup size but otherwise does not cause any
1546 problems.
1547
1548 By default, a normal VSS fileset containing all the drive letters will
1549 also back up the Exchange databases using VSS. This will interfere with
1550 the plugin and Exchange's shared ideas of when the last full backup was
1551 done, and may also truncate log files incorrectly. It is important,
1552 therefore, that the Exchange database files be excluded from the backup,
1553 although the folders the files are in should be included, or they will
1554 have to be recreated manually if a baremetal restore is done.
1555
1556 \begin{verbatim}
1557 FileSet {
1558    Include {
1559       File = C:/Program Files/Exchsrvr/mdbdata
1560       Plugin = "exchange:..."
1561    }
1562    Exclude {
1563       File = C:/Program Files/Exchsrvr/mdbdata/E00.chk
1564       File = C:/Program Files/Exchsrvr/mdbdata/E00.log
1565       File = C:/Program Files/Exchsrvr/mdbdata/E000000F.log
1566       File = C:/Program Files/Exchsrvr/mdbdata/E0000010.log
1567       File = C:/Program Files/Exchsrvr/mdbdata/E0000011.log
1568       File = C:/Program Files/Exchsrvr/mdbdata/E00tmp.log
1569       File = C:/Program Files/Exchsrvr/mdbdata/priv1.edb
1570    }
1571 }
1572 \end{verbatim}
1573
1574 The advantage of excluding the above files is that you can significantly
1575 reduce the size of your backup since all the important Exchange files
1576 will be properly saved by the Plugin.
1577
1578
1579 \subsection{Restoring}
1580 The restore operation is much the same as a normal Bacula restore, with
1581 the following provisos:
1582
1583 \begin{itemize}
1584 \item  The {\bf Where} restore option must not be specified
1585 \item Each Database directory must be marked as a whole. You cannot just
1586      select (say) the .edb file and not the others.
1587 \item If a Storage Group is restored, the directory of the Storage Group
1588      must be marked too.
1589 \item  It is possible to restore only a subset of the available log files,
1590      but they {\bf must} be contiguous. Exchange will fail to restore correctly
1591      if a log file is missing from the sequence of log files
1592 \item Each database to be restored must be dismounted and marked as "Can be
1593     overwritten by restore"
1594 \item If an entire Storage Group is to be restored (eg all databases and
1595    logs in the Storage Group), then it is best to manually delete the
1596    database files from the server (eg C:\verb+\+Program Files\verb+\+Exchsrvr\verb+\+mdbdata\verb+\+*)
1597    as Exchange can get confused by stray log files lying around.
1598 \end{itemize}
1599
1600 \subsection{Restoring to the Recovery Storage Group}
1601 The concept of the Recovery Storage Group is well documented by
1602 Microsoft 
1603 \elink{http://support.microsoft.com/kb/824126}{http://support.microsoft.com/kb/824126}, 
1604 but to briefly summarize...
1605
1606 Microsoft Exchange allows the creation of an additional Storage Group
1607 called the Recovery Storage Group, which is used to restore an older
1608 copy of a database (e.g. before a mailbox was deleted) into without
1609 messing with the current live data. This is required as the Standard and
1610 Small Business Server versions of Exchange can not ordinarily have more
1611 than one Storage Group.
1612
1613 To create the Recovery Storage Group, drill down to the Server in Exchange
1614 System Manager, right click, and select
1615 {\bf "New -> Recovery Storage Group..."}.  Accept or change the file
1616 locations and click OK. On the Recovery Storage Group, right click and
1617 select {\bf "Add Database to Recover..."} and select the database you will
1618 be restoring.
1619
1620 Restore only the single database nominated as the database in the
1621 Recovery Storage Group. Exchange will redirect the restore to the
1622 Recovery Storage Group automatically.
1623 Then run the restore.
1624
1625 \subsection{Restoring on Microsoft Server 2007}
1626 Apparently the {\bf Exmerge} program no longer exists in Microsoft Server
1627 2007, and henc you use a new proceedure for recovering a single mail box.
1628 This procedure is ducomented by Microsoft at:
1629 \elink{http://technet.microsoft.com/en-us/library/aa997694.aspx}{http://technet.microsoft.com/en-us/library/aa997694.aspx},
1630 and involves using the {\bf Restore-Mailbox} and {\bf
1631 Get-MailboxStatistics} shell commands.
1632
1633 \subsection{Caveats}
1634 This plugin is still being developed, so you should consider it
1635 currently in BETA test, and thus use in a production environment
1636 should be done only after very careful testing.
1637
1638 When doing a full backup, the Exchange database logs are truncated by
1639 Exchange as soon as the plugin has completed the backup. If the data
1640 never makes it to the backup medium (eg because of spooling) then the
1641 logs will still be truncated, but they will also not have been backed
1642 up. A solution to this is being worked on. You will have to schedule a
1643 new Full backup to ensure that your next backups will be usable.
1644
1645 The "Enable Circular Logging" option cannot be enabled or the plugin
1646 will fail.
1647
1648 Exchange insists that a successful Full backup must have taken place if
1649 an Incremental or Differential backup is desired, and the plugin will
1650 fail if this is not the case. If a restore is done, Exchange will
1651 require that a Full backup be done before an Incremental or Differential
1652 backup is done.
1653
1654 The plugin will most likely not work well if another backup application
1655 (eg NTBACKUP) is backing up the Exchange database, especially if the
1656 other backup application is truncating the log files.
1657
1658 The Exchange plugin has not been tested with the {\bf Accurate} option, so
1659 we recommend either carefully testing or that you avoid this option for
1660 the current time.
1661
1662 The Exchange plugin is not called during processing the bconsole {\bf
1663 estimate} command, and so anything that would be backed up by the plugin
1664 will not be added to the estimate total that is displayed.
1665
1666
1667 \section{libdbi Framework}
1668 \index[general]{libdbi Framework}
1669 As a general guideline, Bacula has support for a few catalog database drivers
1670 (MySQL, PostgreSQL, SQLite)
1671 coded natively by the Bacula team.  With the libdbi implementation, which is a
1672 Bacula driver that uses libdbi to access the catalog, we have an open field to
1673 use many different kinds database engines following the needs of users.
1674
1675 The according to libdbi (http://libdbi.sourceforge.net/) project: libdbi
1676 implements a database-independent abstraction layer in C, similar to the
1677 DBI/DBD layer in Perl. Writing one generic set of code, programmers can
1678 leverage the power of multiple databases and multiple simultaneous database
1679 connections by using this framework.
1680
1681 Currently the libdbi driver in Bacula project only supports the same drivers
1682 natively coded in Bacula.  However the libdbi project has support for many
1683 others database engines. You can view the list at
1684 http://libdbi-drivers.sourceforge.net/. In the future all those drivers can be
1685 supported by Bacula, however, they must be tested properly by the Bacula team.
1686
1687 Some of benefits of using libdbi are:
1688 \begin{itemize}
1689 \item The possibility to use proprietary databases engines in which your
1690   proprietary licenses prevent the Bacula team from developing the driver.
1691  \item The possibility to use the drivers written for the libdbi project.
1692  \item The possibility to use other database engines without recompiling Bacula
1693    to use them.  Just change one line in bacula-dir.conf
1694  \item Abstract Database access, this is, unique point to code and profiling
1695    catalog database access.
1696  \end{itemize}
1697  
1698  The following drivers have been tested:
1699  \begin{itemize}
1700  \item PostgreSQL, with and without batch insert
1701  \item Mysql, with and without batch insert
1702  \item SQLite
1703  \item SQLite3
1704  \end{itemize}
1705
1706  In the future, we will test and approve to use others databases engines
1707  (proprietary or not) like DB2, Oracle, Microsoft SQL.
1708
1709  To compile Bacula to support libdbi we need to configure the code with the
1710  --with-dbi and --with-dbi-driver=[database] ./configure options, where
1711  [database] is the database engine to be used with Bacula (of course we can
1712  change the driver in file bacula-dir.conf, see below).  We must configure the
1713  access port of the database engine with the option --with-db-port, because the
1714  libdbi framework doesn't know the default access port of each database.
1715
1716 The next phase is checking (or configuring) the bacula-dir.conf, example:
1717 \begin{verbatim}
1718 Catalog {
1719   Name = MyCatalog
1720   dbdriver = dbi:mysql; dbaddress = 127.0.0.1; dbport = 3306
1721   dbname = regress; user = regress; password = ""
1722 }
1723 \end{verbatim}
1724
1725 The parameter {\bf dbdriver} indicates that we will use the driver dbi with a
1726 mysql database.  Currently the drivers supported by Bacula are: postgresql,
1727 mysql, sqlite, sqlite3; these are the names that may be added to string "dbi:".
1728
1729 The following limitations apply when Bacula is set to use the libdbi framework:
1730  - Not tested on the Win32 platform
1731  - A little performance is lost if comparing with native database driver. 
1732    The reason is bound with the database driver provided by libdbi and the 
1733    simple fact that one more layer of code was added.
1734
1735 It is important to remember, when compiling Bacula with libdbi, the
1736 following packages are needed:
1737  \begin{itemize}
1738   \item libdbi version 1.0.0, http://libdbi.sourceforge.net/
1739   \item libdbi-drivers 1.0.0, http://libdbi-drivers.sourceforge.net/
1740  \end{itemize}
1741  
1742  You can download them and compile them on your system or install the packages
1743  from your OS distribution.
1744
1745 \section{Console Command Additions and Enhancements}
1746 \index[general]{Console Additions}                                 
1747
1748 \subsection{Display Autochanger Content}
1749 \index[general]{StatusSlots}
1750
1751 The {\bf status slots storage=\lt{}storage-name\gt{}} command displays
1752 autochanger content.
1753
1754 \footnotesize
1755 \begin{verbatim}
1756  Slot |  Volume Name  |  Status  |  Media Type       |   Pool     |
1757 ------+---------------+----------+-------------------+------------|
1758     1 |         00001 |   Append |  DiskChangerMedia |    Default |
1759     2 |         00002 |   Append |  DiskChangerMedia |    Default |
1760     3*|         00003 |   Append |  DiskChangerMedia |    Scratch |
1761     4 |               |          |                   |            |
1762 \end{verbatim}
1763 \normalsize
1764
1765 If you an asterisk ({\bf *}) appears after the slot number, you must run an
1766 {\bf update slots} command to synchronize autochanger content with your
1767 catalog.
1768
1769 \subsection{list joblog job=xxx or jobid=nnn}
1770 \index[general]{list joblog}
1771 A new list command has been added that allows you to list the contents
1772 of the Job Log stored in the catalog for either a Job Name (fully qualified)
1773 or for a particular JobId.  The {\bf llist} command will include a line with
1774 the time and date of the entry.
1775
1776 Note for the catalog to have Job Log entries, you must have a directive 
1777 such as:
1778
1779 \begin{verbatim}
1780   catalog = all
1781 \end{verbatim}
1782
1783 In your Director's {\bf Messages} resource.
1784
1785 \subsection{Use separator for multiple commands}
1786 \index[general]{Command Separator}
1787   When using bconsole with readline, you can set the command separator with 
1788   \textbf{@separator} command to one
1789   of those characters to write commands who require multiple input in one line.
1790 \begin{verbatim}
1791   !$%&'()*+,-/:;<>?[]^`{|}~
1792 \end{verbatim}
1793
1794 \subsection{Deleting Volumes}
1795 The delete volume bconsole command has been modified to
1796 require an asterisk (*) in front of a MediaId otherwise the
1797 value you enter is a taken to be a Volume name. This is so that
1798 users may delete numeric Volume names. The previous Bacula versions
1799 assumed that all input that started with a number was a MediaId.
1800
1801 This new behavior is indicated in the prompt if you read it
1802 carefully.
1803
1804 \section{Bare Metal Recovery}
1805 The old bare metal recovery project is essentially dead. One
1806 of the main features of it was that it would build a recovery
1807 CD based on the kernel on your system. The problem was that
1808 every distribution has a different boot procedure and different 
1809 scripts, and worse yet, the boot procedures and scripts change
1810 from one distribution to another.  This meant that maintaining
1811 (keeping up with the changes) the rescue CD was too much work.
1812
1813 To replace it, a new bare metal recovery USB boot stick has been developed
1814 by Bacula Systems.  This technology involves remastering a Ubuntu LiveCD to
1815 boot from a USB key.  
1816
1817 Advantages: 
1818 \begin{enumerate} 
1819 \item Recovery can be done from within graphical environment.  
1820 \item Recovery can be done in a shell.  
1821 \item Ubuntu boots on a large number of Linux systems.  
1822 \item The process of updating the system and adding new
1823    packages is not too difficult. 
1824 \item The USB key can easily be upgraded to newer Ubuntu versions.
1825 \item The USB key has writable partitions for modifications to
1826    the OS and for modification to your home directory.
1827 \item You can add new files/directories to the USB key very easily.
1828 \item You can save the environment from multiple machines on
1829    one USB key.
1830 \item Bacula Systems is funding its ongoing development.
1831 \end{enumerate}
1832
1833 The disadvantages are:
1834 \begin{enumerate}
1835 \item The USB key is usable but currently under development.
1836 \item Not everyone may be familiar with Ubuntu (no worse
1837   than using Knoppix)
1838 \item Some older OSes cannot be booted from USB. This can
1839    be resolved by first booting a Ubuntu LiveCD then plugging
1840    in the USB key.
1841 \item Currently the documentation is sketchy and not yet added
1842    to the main manual. See below ...
1843 \end{enumerate}
1844
1845 The documentation and the code can be found in the {\bf rescue} package
1846 in the directory {\bf linux/usb}.
1847
1848 \section{Miscellaneous}
1849 \index[general]{Misc New Features}
1850
1851 \subsection{Allow Mixed Priority = \lt{}yes\vb{}no\gt{}}
1852 \index[general]{Allow Mixed Priority}
1853    This directive is only implemented in version 2.5 and later.  When
1854    set to {\bf yes} (default {\bf no}), this job may run even if lower
1855    priority jobs are already running.  This means a high priority job
1856    will not have to wait for other jobs to finish before starting.
1857    The scheduler will only mix priorities when all running jobs have
1858    this set to true.
1859
1860    Note that only higher priority jobs will start early.  Suppose the
1861    director will allow two concurrent jobs, and that two jobs with
1862    priority 10 are running, with two more in the queue.  If a job with
1863    priority 5 is added to the queue, it will be run as soon as one of
1864    the running jobs finishes.  However, new priority 10 jobs will not
1865    be run until the priority 5 job has finished.
1866
1867 \subsection{Bootstrap File Directive -- FileRegex}
1868 \index[general]{Bootstrap File Directive}
1869   {\bf FileRegex} is a new command that can be added to the bootstrap
1870   (.bsr) file.  The value is a regular expression.  When specified, only
1871   matching filenames will be restored.
1872
1873   During a restore, if all File records are pruned from the catalog
1874   for a Job, normally Bacula can restore only all files saved. That
1875   is there is no way using the catalog to select individual files.
1876   With this new feature, Bacula will ask if you want to specify a Regex
1877   expression for extracting only a part of the full backup.
1878
1879 \begin{verbatim}
1880   Building directory tree for JobId(s) 1,3 ...
1881   There were no files inserted into the tree, so file selection
1882   is not possible.Most likely your retention policy pruned the files
1883   
1884   Do you want to restore all the files? (yes\vb{}no): no
1885   
1886   Regexp matching files to restore? (empty to abort): /tmp/regress/(bin|tests)/
1887   Bootstrap records written to /tmp/regress/working/zog4-dir.restore.1.bsr
1888 \end{verbatim}
1889
1890 \subsection{Bootstrap File Optimization Changes}
1891 In order to permit proper seeking on disk files, we have extended the bootstrap
1892 file format to include a {\bf VolStartAddr} and {\bf VolEndAddr} records. Each
1893 takes a 64 bit unsigned integer range (i.e. nnn-mmm) which defines the start
1894 address range and end address range respectively.  These two directives replace
1895 the {\bf VolStartFile}, {\bf VolEndFile}, {\bf VolStartBlock} and {\bf
1896   VolEndBlock} directives.  Bootstrap files containing the old directives will
1897 still work, but will not properly take advantage of proper disk seeking, and
1898 may read completely to the end of a disk volume during a restore.  With the new
1899 format (automatically generated by the new Director), restores will seek
1900 properly and stop reading the volume when all the files have been restored.
1901
1902 \subsection{Solaris ZFS/NFSv4 ACLs}
1903 This is an upgrade of the previous Solaris ACL backup code
1904 to the new library format, which will backup both the old
1905 POSIX(UFS) ACLs as well as the ZFS ACLs.
1906
1907 The new code can also restore POSIX(UFS) ACLs to a ZFS filesystem
1908 (it will translate the POSIX(UFS)) ACL into a ZFS/NFSv4 one) it can also
1909 be used to transfer from UFS to ZFS filesystems.
1910
1911
1912 \subsection{Virtual Tape Emulation}
1913 \index[general]{Virtual Tape Emulation}
1914 We now have a Virtual Tape emulator that allows us to run though 99.9\% of
1915 the tape code but actually reading and writing to a disk file. Used with the
1916 \textbf{disk-changer} script, you can now emulate an autochanger with 10 drives
1917 and 700 slots. This feature is most useful in testing.  It is enabled
1918 by using {\bf Device Type = vtape} in the Storage daemon's Device
1919 directive. This feature is only implemented on Linux machines and should not be
1920 used for production.
1921
1922 \subsection{Bat Enhancements}
1923 \index[general]{Bat Enhancements}
1924 Bat (the Bacula Administration Tool) GUI program has been significantly
1925 enhanced and stabilized. In particular, there are new table based status 
1926 commands; it can now be easily localized using Qt4 Linguist.
1927
1928 The Bat communications protocol has been significantly enhanced to improve
1929 GUI handling. Note, you {\bf must} use a the bat that is distributed with
1930 the Director you are using otherwise the communications protocol will not
1931 work.
1932
1933 \subsection{RunScript Enhancements}
1934 \index[general]{RunScript Enhancements}
1935 The {\bf RunScript} resource has been enhanced to permit multiple
1936 commands per RunScript.  Simply specify multiple {\bf Command} directives
1937 in your RunScript.
1938
1939 \begin{verbatim}
1940 Job {
1941   Name = aJob
1942   RunScript {
1943     Command = "/bin/echo test"
1944     Command = "/bin/echo an other test"
1945     Command = "/bin/echo 3 commands in the same runscript"
1946     RunsWhen = Before
1947   }
1948  ...
1949 }
1950 \end{verbatim}
1951
1952 A new Client RunScript {\bf RunsWhen} keyword of {\bf AfterVSS} has been
1953 implemented, which runs the command after the Volume Shadow Copy has been made.
1954
1955 Console commands can be specified within a RunScript by using:
1956 {\bf Console = \lt{}command\gt{}}, however, this command has not been 
1957 carefully tested and debugged and is known to easily crash the Director.
1958 We would appreciate feedback.  Due to the recursive nature of this command, we
1959 may remove it before the final release.
1960
1961 \subsection{Status Enhancements}
1962 \index[general]{Status Enhancements}
1963 The bconsole {\bf status dir} output has been enhanced to indicate
1964 Storage daemon job spooling and despooling activity.
1965
1966 \subsection{Connect Timeout}
1967 \index[general]{Connect Timeout}
1968 The default connect timeout to the File
1969 daemon has been set to 3 minutes. Previously it was 30 minutes.
1970
1971 \subsection{ftruncate for NFS Volumes}
1972 \index[general]{ftruncate for NFS Volumes}
1973 If you write to a Volume mounted by NFS (say on a local file server),
1974 in previous Bacula versions, when the Volume was recycled, it was not
1975 properly truncated because NFS does not implement ftruncate (file 
1976 truncate). This is now corrected in the new version because we have
1977 written code (actually a kind user) that deletes and recreates the Volume,
1978 thus accomplishing the same thing as a truncate.
1979
1980 \subsection{Support for Ubuntu}
1981 The new version of Bacula now recognizes the Ubuntu (and Kubuntu)
1982 version of Linux, and thus now provides correct autostart routines.
1983 Since Ubuntu officially supports Bacula, you can also obtain any
1984 recent release of Bacula from the Ubuntu repositories.
1985
1986 \subsection{Recycle Pool = \lt{}pool-name\gt{}}
1987 \index[general]{Recycle Pool}
1988 The new \textbf{RecyclePool} directive defines to which pool the Volume will
1989 be placed (moved) when it is recycled. Without this directive, a Volume will
1990 remain in the same pool when it is recycled. With this directive, it can be
1991 moved automatically to any existing pool during a recycle. This directive is
1992 probably most useful when defined in the Scratch pool, so that volumes will
1993 be recycled back into the Scratch pool.
1994
1995 \subsection{FD Version}
1996 \index[general]{FD Version}
1997 The File daemon to Director protocol now includes a version 
1998 number, which although there is no visible change for users, 
1999 will help us in future versions automatically determine
2000 if a File daemon is not compatible.
2001
2002 \subsection{Max Run Sched Time = \lt{}time-period-in-seconds\gt{}}
2003 \index[general]{Max Run Sched Time}
2004 The time specifies the maximum allowed time that a job may run, counted from
2005 when the job was scheduled. This can be useful to prevent jobs from running
2006 during working hours. We can see it like \texttt{Max Start Delay + Max Run
2007   Time}.
2008
2009 \subsection{Max Wait Time = \lt{}time-period-in-seconds\gt{}}
2010 \index[general]{Max Wait Time}
2011 Previous \textbf{MaxWaitTime} directives aren't working as expected, instead
2012 of checking the maximum allowed time that a job may block for a resource,
2013 those directives worked like \textbf{MaxRunTime}. Some users are reporting to
2014 use \textbf{Incr/Diff/Full Max Wait Time} to control the maximum run time of
2015 their job depending on the level. Now, they have to use
2016 \textbf{Incr/Diff/Full Max Run Time}.  \textbf{Incr/Diff/Full Max Wait Time}
2017 directives are now deprecated.
2018
2019 \subsection{Incremental|Differential Max Wait Time = \lt{}time-period-in-seconds\gt{}} 
2020 \index[general]{Incremental Max Wait Time}
2021 \index[general]{Differential Max Wait Time}
2022
2023 These directives have been deprecated in favor of
2024 \texttt{Incremental|Differential Max Run Time}.
2025
2026 \subsection{Max Run Time directives}
2027 \index[general]{Max Run Time directives}
2028 Using \textbf{Full/Diff/Incr Max Run Time}, it's now possible to specify the
2029 maximum allowed time that a job can run depending on the level.
2030
2031 \addcontentsline{lof}{figure}{Job time control directives}
2032 \includegraphics{\idir different_time.eps}
2033
2034 \subsection{Statistics Enhancements}
2035 \index[general]{Statistics Enhancements}
2036 If you (or probably your boss) want to have statistics on your backups to
2037 provide some \textit{Service Level Agreement} indicators, you could use a few
2038 SQL queries on the Job table to report how many:
2039
2040 \begin{itemize}
2041 \item jobs have run
2042 \item jobs have been successful
2043 \item files have been backed up
2044 \item ...
2045 \end{itemize}
2046
2047 However, these statistics are accurate only if your job retention is greater
2048 than your statistics period. Ie, if jobs are purged from the catalog, you won't
2049 be able to use them. 
2050
2051 Now, you can use the \textbf{update stats [days=num]} console command to fill
2052 the JobHistory table with new Job records. If you want to be sure to take in
2053 account only \textbf{good jobs}, ie if one of your important job has failed but
2054 you have fixed the problem and restarted it on time, you probably want to
2055 delete the first \textit{bad} job record and keep only the successful one. For
2056 that simply let your staff do the job, and update JobHistory table after two or
2057 three days depending on your organization using the \textbf{[days=num]} option.
2058
2059 These statistics records aren't used for restoring, but mainly for
2060 capacity planning, billings, etc.
2061
2062 The Bweb interface provides a statistics module that can use this feature. You
2063 can also use tools like Talend or extract information by yourself.
2064
2065 The \textbf{Statistics Retention = \lt{}time\gt{}} director directive defines
2066 the length of time that Bacula will keep statistics job records in the Catalog
2067 database after the Job End time. (In \texttt{JobHistory} table) When this time
2068 period expires, and if user runs \texttt{prune stats} command, Bacula will
2069 prune (remove) Job records that are older than the specified period.
2070
2071 You can use the following Job resource in your nightly \textbf{BackupCatalog}
2072 job to maintain statistics.
2073 \begin{verbatim}
2074 Job {
2075   Name = BackupCatalog
2076   ...
2077   RunScript {
2078     Console = "update stats days=3"
2079     Console = "prune stats yes"
2080     RunsWhen = After
2081     RunsOnClient = no
2082   }
2083 }
2084 \end{verbatim}
2085
2086 \subsection{ScratchPool = \lt{}pool-resource-name\gt{}}
2087 \index[general]{ScratchPool}
2088 This directive permits to specify a specific \textsl{Scratch} pool for the
2089 current pool. This is useful when using multiple storage sharing the same
2090 mediatype or when you want to dedicate volumes to a particular set of pool.
2091
2092 \subsection{Enhanced Attribute Despooling}
2093 \index[general]{Attribute Despooling}
2094 If the storage daemon and the Director are on the same machine, the spool file
2095 that contains attributes is read directly by the Director instead of being
2096 transmitted across the network. That should reduce load and speedup insertion.
2097
2098 \subsection{SpoolSize = \lt{}size-specification-in-bytes\gt{}}
2099 \index[general]{SpoolSize}
2100 A new Job directive permits to specify the spool size per job. This is used
2101 in advanced job tunning. {\bf SpoolSize={\it bytes}}
2102
2103 \subsection{MaxConsoleConnections = \lt{}number\gt{}}
2104 \index[general]{MaxConsoleConnections}
2105 A new director directive permits to specify the maximum number of Console
2106 Connections that could run concurrently. The default is set to 20, but you may
2107 set it to a larger number.
2108
2109 \subsection{VerId = \lt{}string\gt{}}
2110 \index[general]{VerId}
2111 A new director directive permits to specify a personnal identifier that will be
2112 displayed in the \texttt{version} command.
2113
2114 \subsection{dbcheck enhancements}
2115 \index[general]{dbcheck enhancements}
2116 If you are using Mysql, dbcheck will now ask you if you want to create
2117 temporary indexes to speed up orphaned Path and Filename elimination. 
2118
2119 A new \texttt{-B} option allows you to print catalog information in a simple
2120 text based format. This is useful to backup it in a secure way.
2121
2122 \begin{verbatim}
2123  $ dbcheck -B 
2124  catalog=MyCatalog
2125  db_type=SQLite
2126  db_name=regress
2127  db_driver=
2128  db_user=regress
2129  db_password=
2130  db_address=
2131  db_port=0
2132  db_socket=
2133 \end{verbatim} %$
2134
2135 You can now specify the database connection port in the command line.
2136
2137 \subsection{{-}{-}docdir configure option}
2138 \index[general]{{-}{-}docdir configure option}
2139 You can use {-}{-}docdir= on the ./configure command to
2140 specify the directory where you want Bacula to install the
2141 LICENSE, ReleaseNotes, ChangeLog, ... files.   The default is 
2142 {\bf /usr/share/doc/bacula}.
2143       
2144 \subsection{{-}{-}htmldir configure option}
2145 \index[general]{{-}{-}htmldir configure option}
2146 You can use {-}{-}htmldir= on the ./configure command to
2147 specify the directory where you want Bacula to install the bat html help
2148 files. The default is {\bf /usr/share/doc/bacula/html}
2149
2150 \subsection{{-}{-}with-plugindir configure option}
2151 \index[general]{{-}{-}plugindir configure option}
2152 You can use {-}{-}plugindir= on the ./configure command to
2153 specify the directory where you want Bacula to install
2154 the plugins (currently only bpipe-fd). The default is
2155 /usr/lib.