1 \chapter{New Features in 7.4.0}
2 This chapter presents the new features that have been added to
3 the various versions of Bacula.
5 \section{New Features in 7.4.3}
6 \subsection{RunScripts}
7 There are two new RunScript short cut directives implemented in
8 the Director. They are:
13 ConsoleRunBeforeJob = "console-command"
21 ConsoleRunAfterJob = "console-command"
26 As with other RunScript commands, you may have multiple copies
27 of either the {\bf ConsoleRunBeforeJob} or the {\bf ConsoleRunAfterJob}
28 in the same Job resource definition.
30 Please note that not all console commands are permitted, and that
31 if you run a console command that requires a response, the results
32 are not determined (i.e. it will probably fail).
35 \section{New Features in 7.4.0}
36 \subsection{Verify Volume Data}
38 It is now possible to have a Verify Job configured with \texttt{level=Data} to
39 reread all records from a job and optionally check the size and the checksum
43 # Verify Job definition
47 Client = 127.0.0.1-fd # Use local file daemon
48 FileSet = Dummy # Will be adapted during the job
49 Storage = File # Should be the right one
54 # Backup Job definition
75 To run the Verify job, it is possible to use the ``jobid'' parameter of the ``run'' command.
78 *run job=VerifyData jobid=10
84 Pool: Default (From Job resource)
85 Storage: File (From Job resource)
86 Verify Job: MyBackupJob.2015-11-11_09.41.55_03
87 Verify List: /opt/bacula/working/working/VerifyVol.bsr
88 When: 2015-11-11 09:47:38
90 OK to run? (yes/mod/no): yes
95 11-Nov 09:46 my-dir JobId 13: Bacula 7.4.0 (13Nov15):
96 Build OS: x86_64-unknown-linux-gnu archlinux
98 Job: VerifyData.2015-11-11_09.46.29_03
104 Start time: 11-Nov-2015 09:46:31
105 End time: 11-Nov-2015 09:46:32
106 Files Expected: 1,116
107 Files Examined: 1,116
108 Non-fatal FD errors: 0
110 FD termination status: Verify differences
111 SD termination status: OK
112 Termination: Verify Differences
115 The current Verify Data implementation requires specifying the correct Storage
116 resource in the Verify job. The Storage resource can be changed with the bconsole
117 command line and with the menu.
119 \subsection{Bconsole ``list jobs'' command options}
121 The \texttt{list jobs} bconsole command now accepts new command line options:
124 \item \textbf{joberrors} Display jobs with JobErrors
125 \item \textbf{jobstatus=T} Display jobs with the specified status code
126 \item \textbf{client=cli} Display jobs for a specified client
127 \item \textbf{order=asc/desc} Change the output format of the job list. The
128 jobs are sorted by start time and JobId, the sort can use ascendant (asc) or
129 descendant (desc) (default) value.
132 \subsection{Minor Enhancements}
134 \subsubsection{New Bconsole "Tee All" Command}
136 The ``@tall'' command allows logging all input/output from a console session.
144 \subsection{Windows Encrypted File System (EFS) Support}
146 The Bacula Enterprise Windows File Daemon for the community version
147 7.4.0 now automatically supports files and
148 directories that are encrypted on Windows filesystem.
150 \subsection{SSL Connections to MySQL}
152 There are five new Directives for the Catalog resource in the
153 {\bf bacula-dir.conf} file that you can use to encrypt the
154 communications between Bacula and MySQL for additional
158 \item [dbsslkey] takes a string variable that specifies the filename of an
160 \item [dbsslcert] takes a string variable that specifies the filename of an
161 SSL certificate file.
162 \item [dbsslca] takes a string variable that specifies the filename of a
163 SSL CA (certificate authority) certificate.
164 \item [dbsslcipher] takes a string variable that specifies the cipher
168 \subsection{Max Virtual Full Interval}
169 This is a new Job resource directive that specifies the time in seconds
170 that is a maximum time between Virtual Full jobs. It is much like the
171 Max Full Interval directive but applies to Virtual Full jobs rather
174 \subsection{New List Volumes Output}
175 The {\bf list} and {\bf llist} commands have been modified so that when
176 listing Volumes a new pseudo field {\bf expiresin} will be printed. This
177 field is the number of seconds in which the retention period will expire.
178 If the retention period has already expired the value will be zero. Any
179 non-zero value means that the retention period is still in effect.
181 An example with many columns shorted for display purpose is:
188 +----+---------------+-----------+---------+-------------+-----------+
189 | id | volumename | volstatus | enabled | volbytes | expiresin |
190 +----+---------------+-----------+---------+-------------+-----------+
191 | 1 | TestVolume001 | Full | 1 | 249,940,696 | 0 |
192 | 2 | TestVolume002 | Full | 1 | 249,961,704 | 1 |
193 | 3 | TestVolume003 | Full | 1 | 249,961,704 | 2 |
194 | 4 | TestVolume004 | Append | 1 | 127,367,896 | 3 |
195 +----+---------------+-----------+---------+-------------+-----------+
200 \chapter{New Features in 7.2.0}
201 This chapter presents the new features that have been added to
202 the various versions of Bacula.
204 \section{New Features in 7.2.0}
206 \subsection{New Job Edit Codes \%E \%R}
207 In various places such as RunScripts, you have now access to \%E to get the
208 number of non-fatal errors for the current Job and \%R to get the number of
209 bytes read from disk or from the network during a job.
211 \subsection{Enable/Disable commands}
212 The \textbf{bconsole} \textbf{enable} and \textbf{disable} commands have
213 been extended from enabling/disabling Jobs to include Clients, Schedule,
214 and Storage devices. Examples:
217 disable Job=NightlyBackup Client=Windows-fd
220 will disable the Job named \textbf{NightlyBackup} as well as the
221 client named \textbf{Windows-fd}.
224 disable Storage=LTO-changer Drive=1
227 will disable the first drive in the autochanger named \textbf{LTO-changer}.
229 Please note that doing a \textbf{reload} command will set any values
230 changed by the enable/disable commands back to the values in the
231 bacula-dir.conf file.
233 The Client and Schedule resources in the bacula-dir.conf file now permit
234 the directive Enable = yes or Enable = no.
239 \subsection{Snapshot Management}
241 Bacula 7.2 is now able to handle Snapshots on Linux/Unix
242 systems. Snapshots can be automatically created and used to backup files. It is
243 also possible to manage Snapshots from Bacula's \texttt{bconsole} tool through a
246 \subsubsection{Snapshot Backends}
248 The following Snapshot backends are supported with Bacula Enterprise 8.2:
253 \item LVM\footnote{Some restrictions described in \vref{LVMBackend} applies to
257 By default, Snapshots are mounted (or directly available) under
258 \textbf{.snapshots} directory on the root filesystem. (On ZFS, the default
259 is \textbf{.zfs/snapshots}).
263 The Snapshot backend program is called \textbf{bsnapshot} and is available in
264 the \textbf{bacula-enterprise-snapshot} package. In order to use the Snapshot
265 Management feature, the package must be installed on the Client.
268 \label{bsnapshotconf}
269 The \textbf{bsnapshot} program can be configured using
270 \texttt{/opt/bacula/etc/bsnapshot.conf} file. The following parameters can
271 be adjusted in the configuration file:
274 \item \texttt{trace=<file>} Specify a trace file
275 \item \texttt{debug=<num>} Specify a debug level
276 \item \texttt{sudo=<yes/no>} Use sudo to run commands
277 \item \texttt{disabled=<yes/no>} Disable snapshot support
278 \item \texttt{retry=<num>} Configure the number of retries for some operations
279 \item \texttt{snapshot\_dir=<dirname>} Use a custom name for the Snapshot directory. (\textbf{.SNAPSHOT}, \textbf{.snapdir}, etc...)
280 \item \texttt{lvm\_snapshot\_size=<lvpath:size>} Specify a custom snapshot size for a given LVM volume
284 # cat /opt/bacula/etc/bsnapshot.conf
287 lvm_snapshot_size=/dev/ubuntu-vg/root:5%
291 \subsubsection{Application Quiescing}
293 When using Snapshots, it is very important to quiesce applications that are
294 running on the system. The simplest way to quiesce an application is to stop
295 it. Usually, taking the Snapshot is very fast, and the downtime is only about a
296 couple of seconds. If downtime is not possible and/or the application provides
297 a way to quiesce, a more advanced script can be used. An example is
298 described on \vref{SnapRunScriptExample}.
300 \subsubsection{New Director Directives}
302 The use of the Snapshot Engine on the FileDaemon is determined by the
303 new \textbf{Enable Snapshot} FileSet directive. The default is \textbf{no}.
309 Enable Snapshot = yes
312 Options = { Compression = LZO }
318 By default, Snapshots are deleted from the Client at the end of the backup. To
319 keep Snapshots on the Client and record them in the Catalog for a determined
320 period, it is possible to use the \textbf{Snapshot Retention} directive in the
321 Client or in the Job resource. The default value is 0 secconds. If, for a given Job,
322 both Client and Job \textbf{Snapshot Retention} directives are set, the Job
323 directive will be used.
330 Snapshot Retention = 5 days
334 To automatically prune Snapshots, it is possible to use the following RunScript
344 Console = "prune snapshot client=%c yes"
355 In RunScripts, the \texttt{AfterSnapshot} keyword for the \texttt{RunsWhen} directive will
356 allow a command to be run just after the Snapshot creation. \texttt{AfterSnapshot} is a
357 synonym for the \texttt{AfterVSS} keyword.
359 \label{SnapRunScriptExample}
364 Command = "/etc/init.d/mysql start"
365 RunsWhen = AfterSnapshot
369 Command = "/etc/init.d/mysql stop"
376 \subsubsection{Job Output Information}
378 Information about Snapshots are displayed in the Job output. The list of all
379 devices used by the Snapshot Engine is displayed, and the Job summary
380 indicates if Snapshots were available.
383 JobId 3: Create Snapshot of /home/build
384 JobId 3: Create Snapshot of /home/build/subvol
385 JobId 3: Delete snapshot of /home/build
386 JobId 3: Delete snapshot of /home/build/subvol
388 JobId 3: Bacula 127.0.0.1-dir 7.2.0 (23Jul15):
389 Build OS: x86_64-unknown-linux-gnu archlinux
391 Job: Incremental.2015-02-24_11.20.27_08
396 Termination: Backup OK
400 \subsubsection{New ``snapshot'' Bconsole Commands}
402 The new \textbf{snapshot} command will display by default the following menu:
406 1: List snapshots in Catalog
407 2: List snapshots on Client
410 5: Update snapshot parameters
411 6: Update catalog with Client snapshots
413 Select action to perform on Snapshot Engine (1-7):
416 The \textbf{snapshot} command can also have the following parameters:
418 [client=<client-name> | job=<job-name> | jobid=<jobid>]
419 [delete | list | listclient | prune | sync | update]
422 It is also possible to use traditional \texttt{list}, \texttt{llist},
423 \texttt{update}, \texttt{prune} or \texttt{delete} commands on Snapshots.
426 *llist snapshot jobid=5
428 name: NightlySave.2015-02-24_12.01.00_04
429 createdate: 2015-02-24 12:01:03
433 volume: /home/.snapshots/NightlySave.2015-02-24_12.01.00_04
441 * snapshot listclient
442 Automatically selected Client: 127.0.0.1-fd
443 Connecting to Client 127.0.0.1-fd at 127.0.0.1:8102
444 Snapshot NightlySave.2015-02-24_12.01.00_04:
445 Volume: /home/.snapshots/NightlySave.2015-02-24_12.01.00_04
447 CreateDate: 2015-02-24 12:01:03
455 With the \textsl{Update catalog with Client snapshots} option (or
456 \textbf{snapshot sync}), the Director contacts the FileDaemon, lists snapshots
457 of the system and creates catalog records of the Snapshots.
461 Automatically selected Client: 127.0.0.1-fd
462 Connecting to Client 127.0.0.1-fd at 127.0.0.1:8102
463 Snapshot NightlySave.2015-02-24_12.35.47_06:
464 Volume: /home/.snapshots/NightlySave.2015-02-24_12.35.47_06
466 CreateDate: 2015-02-24 12:35:47
470 Snapshot added in Catalog
474 name: NightlySave.2015-02-24_12.35.47_06
475 createdate: 2015-02-24 12:35:47
479 volume: /home/.snapshots/NightlySave.2015-02-24_12.35.47_06
493 \subsubsection{LVM Backend Restrictions}
496 LVM Snapshots are quite primitive compared to ZFS, BTRFS, NetApp and other
497 systems. For example, it is not possible to use Snapshots if the Volume Group
498 (VG) is full. The administrator must keep some free space in the VG
499 to create Snapshots. The amount of free space required depends on the activity of the
500 Logical Volume (LV). \textbf{bsnapshot} uses 10\% of the LV by
501 default. This number can be configured per LV in the
502 \textbf{bsnapshot.conf} file.
505 [root@system1]# vgdisplay
514 Alloc PE / Size 125 / 500,00 MiB
515 Free PE / Size 7507 / 29,32 GiB
519 It is also not advisable to leave snapshots on the LVM backend. Having multiple
520 snapshots of the same LV on LVM will slow down the system.
522 \subsubsection{Debug Options}
524 To get low level information about the Snapshot Engine, the debug tag ``snapshot''
525 should be used in the \textbf{setdebug} command.
528 * setdebug level=10 tags=snapshot client
529 * setdebug level=10 tags=snapshot dir
532 \subsection{Minor Enhancements}
533 \subsubsection{Storage Daemon Reports Disk Usage}
535 The \texttt{status storage} command now reports the space available on disk devices:
540 Device file: "FileStorage" (/bacula/arch1) is not open.
541 Available Space=5.762 GB
544 Device file: "FileStorage1" (/bacula/arch2) is not open.
545 Available Space=5.862 GB
548 \subsection{Data Encryption Cipher Configuration}
549 Bacula Enterprise version 8.0 and later now allows configuration of the data
550 encryption cipher and the digest algorithm. Previously, the cipher was forced to AES 128,
551 but it is now possible to choose between the following ciphers:
554 \item AES128 (default)
560 The digest algorithm was set to SHA1 or SHA256 depending on the local OpenSSL
561 options. We advise you to not modify the PkiDigest default setting. Please,
562 refer to the OpenSSL documentation to understand the pros and cons regarding these options.
571 \subsubsection*{New Option Letter ``M'' for Accurate Directive in FileSet}
573 % waa - 20150317 - is 8.0.5 correct here?
574 Added in version 8.0.5, the new ``M'' option letter for the Accurate directive
575 in the FileSet Options block, which allows comparing the modification time and/or
576 creation time against the last backup timestamp. This is in contrast to the
577 existing options letters ``m'' and/or ``c'', mtime and ctime, which are checked
578 against the stored catalog values, which can vary accross different machines
579 when using the BaseJob feature.
581 The advantage of the new ``M'' option letter for Jobs that refer to BaseJobs is
582 that it will instruct Bacula to backup files based on the last backup time, which
583 is more useful because the mtime/ctime timestamps may differ on various Clients,
584 causing files to be needlessly backed up.
617 Accurate = Ms # check for mtime/ctime of last backup timestamp and Size
626 \subsubsection*{New Debug Options}
628 In Bacula Enterprise version 8.0 and later, we introduced a new \texttt{options} parameter for
629 the \texttt{setdebug} bconsole command.
633 The following arguments to the new \texttt{option} parameter are available to control debug functions.
636 \item [0] Clear debug flags
637 \item [i] Turn off, ignore bwrite() errors on restore on File Daemon
638 \item [d] Turn off decomp of BackupRead() streams on File Daemon
639 \item [t] Turn on timestamps in traces
640 \item [T] Turn off timestamps in traces
642 % waa - 20150306 - does this "c" item mean to say "Truncate trace file if one exists, otherwise append to it" ???
643 \item [c] Truncate trace file if trace file is activated
645 \item [l] Turn on recoding events on P() and V()
646 \item [p] Turn on the display of the event ring when doing a bactrace
651 The following command will enable debugging for the File Daemon, truncate an existing trace file,
652 and turn on timestamps when writing to the trace file.
655 * setdebug level=10 trace=1 options=ct fd
660 It is now possible to use a \textsl{class} of debug messages called \texttt{tags}
661 to control the debug output of Bacula daemons.
664 \item [all] Display all debug messages
665 \item [bvfs] Display BVFS debug messages
666 \item [sql] Display SQL related debug messages
667 \item [memory] Display memory and poolmem allocation messages
668 \item [scheduler] Display scheduler related debug messages
672 * setdebug level=10 tags=bvfs,sql,memory
673 * setdebug level=10 tags=!bvfs
675 # bacula-dir -t -d 200,bvfs,sql
678 The \texttt{tags} option is composed of a list of tags. Tags are separated by
679 ``,'' or ``+'' or ``-'' or ``!''. To disable a specific tag, use ``-'' or ``!''
680 in front of the tag. Note that more tags are planned for future versions.
682 %%\LTXtable{\linewidth}{table_debugtags}
684 \subsection{Read Only Storage Devices}
685 This version of Bacula allows you to define a Storage deamon device
686 to be read-only. If the {\bf Read Only} directive is specified and
687 enabled, the drive can only be used for read operations.
688 The {\bf Read Only} directive can be defined in any bacula-sd.conf
689 Device resource, and is most useful for reserving one or more
690 drives for restores. An example is:
696 \subsection{New Truncate Command}
697 We have added a new truncate command to bconsole which
698 will truncate a volume if the volume is purged, and if
699 the volume is also marked {\bf Action On Purge = Truncate}.
700 This feature was originally added in Bacula version 5.0.1,
701 but the mechanism for actually doing the truncate required
702 the user to enter a complicated command such as:
705 purge volume action=truncate storage=File pool=Default
708 The above command is now simplified to be:
711 truncate storage=File pool=Default
714 \subsection{New Resume Command}
715 The new \texttt{resume} command does exactly the same thing as a
716 {\bf restart} command, but for some users the
717 name may be more logical because in general the
718 {\bf restart} command is used to resume running
719 a Job that was incomplete.
721 \subsection{New Prune ``Expired'' Volume Command}
722 In Bacula Enterprise 6.4, it is now possible to prune all volumes
723 (from a pool, or globally) that are ``expired''. This option can be
724 scheduled after or before the backup of the catalog and can be
725 combined with the \texttt{Truncate On Purge} option. The \texttt{prune expired volme} command may
726 be used instead of the \texttt{manual\_prune.pl} script.
729 * prune expired volume
731 * prune expired volume pool=FullPool
734 To schedule this option automatically, it can be added to the Catalog backup job
742 Console = "prune expired volume yes"
749 \subsection{New Job Edit Codes \%P \%C}
750 In various places such as RunScripts, you have now access to \%P to get the
751 current Bacula process ID (PID) and \%C to know if the current job is a
754 \subsection{Enhanced Status and Error Messages}
755 We have enhanced the Storage daemon status output to be more
756 readable. This is important when there are a large number of
757 devices. In addition to formatting changes, it also includes more
758 details on which devices are reading and writing.
760 A number of error messages have been enhanced to have more specific
761 data on what went wrong.
763 If a file changes size while being backed up the old and new size
766 \subsection{Miscellaneous New Features}
768 \item Allow unlimited line lengths in .conf files (previously limited
771 \item Allow /dev/null in ChangerCommand to indicated a Virtual Autochanger.
773 \item Add a --fileprune option to the manual\_prune.pl script.
775 \item Add a -m option to make\_catalog\_backup.pl to do maintenance
778 \item Safer code that cleans up the working directory when starting
779 the daemons. It limits what files can be deleted, hence enhances
782 \item Added a new .ls command in bconsole to permit browsing a client's
785 \item Fixed a number of bugs, includes some obscure seg faults, and a
786 race condition that occurred infrequently when running Copy, Migration,
787 or Virtual Full backups.
789 \item Upgraded to a newer version of Qt4 for bat. All indications
790 are that this will improve bat's stability on Windows machines.
792 \item The Windows installers now detect and refuse to install on
793 an OS that does not match the 32/64 bit value of the installer.
796 \subsection{FD Storage Address}
798 When the Director is behind a NAT, in a WAN area, to connect to
800 the StorageDaemon, the Director uses an ``external'' ip address,
801 and the FileDaemon should use an ``internal'' IP address to contact the
804 The normal way to handle this situation is to use a canonical name such as
805 ``storage-server'' that will be resolved on the Director side as the WAN
806 address and on the Client side as the LAN address. This is now possible to
807 configure this parameter using the new directive \texttt{FDStorageAddress} in
808 the Storage or Client resource.
811 %%\bsysimageH{BackupOverWan1}{Backup Over WAN}{figbs6:fdstorageaddress}
812 % \label{fig:fdstorageaddress}
818 FD Storage Address = 10.0.0.1
824 % # or in the Client resouce
831 FD Storage Address = 10.0.0.1
837 Note that using the Client \texttt{FDStorageAddress} directive will not allow
838 to use multiple Storage Daemon, all Backup or Restore requests will be sent to
839 the specified \texttt{FDStorageAddress}.
841 \subsection{Maximum Concurrent Read Jobs}
842 This is a new directive that can be used in the {\bf bacula-dir.conf} file
843 in the Storage resource. The main purpose is to limit the number
844 of concurrent Copy, Migration, and VirtualFull jobs so that
845 they don't monopolize all the Storage drives causing a deadlock situation
846 where all the drives are allocated for reading but none remain for
847 writing. This deadlock situation can occur when running multiple
848 simultaneous Copy, Migration, and VirtualFull jobs.
851 The default value is set to 0 (zero), which means there is no
852 limit on the number of read jobs. Note, limiting the read jobs
853 does not apply to Restore jobs, which are normally started by
854 hand. A reasonable value for this directive is one half the number
855 of drives that the Storage resource has rounded down. Doing so,
856 will leave the same number of drives for writing and will generally
857 avoid over committing drives and a deadlock.
859 \subsection{Incomplete Jobs}
860 During a backup, if the Storage daemon experiences disconnection
861 with the File daemon during backup (normally a comm line problem
862 or possibly an FD failure), under conditions that the SD determines
863 to be safe it will make the failed job as Incomplete rather than
864 failed. This is done only if there is sufficient valid backup
865 data that was written to the Volume. The advantage of an Incomplete
866 job is that it can be restarted by the new bconsole {\bf restart}
867 command from the point where it left off rather than from the
868 beginning of the jobs as is the case with a cancel.
870 \subsection{The Stop Command}
871 Bacula has been enhanced to provide a {\bf stop} command,
872 very similar to the {\bf cancel} command with the main difference
873 that the Job that is stopped is marked as Incomplete so that
874 it can be restarted later by the {\bf restart} command where
875 it left off (see below). The {\bf stop} command with no
876 arguments, will like the cancel command, prompt you with the
877 list of running jobs allowing you to select one, which might
878 look like the following:
883 1: JobId=3 Job=Incremental.2012-03-26_12.04.26_07
884 2: JobId=4 Job=Incremental.2012-03-26_12.04.30_08
885 3: JobId=5 Job=Incremental.2012-03-26_12.04.36_09
886 Choose Job to stop (1-3): 2
887 2001 Job "Incremental.2012-03-26_12.04.30_08" marked to be stopped.
888 3000 JobId=4 Job="Incremental.2012-03-26_12.04.30_08" marked to be stopped.
891 \subsection{The Restart Command}
892 The new {\bf Restart command} allows console users to restart
893 a canceled, failed, or incomplete Job. For canceled and failed
894 Jobs, the Job will restart from the beginning. For incomplete
895 Jobs the Job will restart at the point that it was stopped either
896 by a stop command or by some recoverable failure.
899 If you enter the {\bf restart} command in bconsole, you will get the
904 You have the following choices:
909 Select termination code: (1-4):
912 If you select the {\bf All} option, you may see something like:
915 Select termination code: (1-4): 4
916 +-------+-------------+---------------------+------+-------+----------+-----------+-----------+
917 | jobid | name | starttime | type | level | jobfiles |
918 jobbytes | jobstatus |
919 +-------+-------------+---------------------+------+-------+----------+-----------+-----------+
920 | 1 | Incremental | 2012-03-26 12:15:21 | B | F | 0 |
922 | 2 | Incremental | 2012-03-26 12:18:14 | B | F | 350 |
924 | 3 | Incremental | 2012-03-26 12:18:30 | B | F | 0 |
926 | 4 | Incremental | 2012-03-26 12:18:38 | B | F | 331 |
928 +-------+-------------+---------------------+------+-------+----------+-----------+-----------+
929 Enter the JobId list to select:
932 Then you may enter one or more JobIds to be restarted, which may
933 take the form of a list of JobIds separated by commas, and/or JobId
934 ranges such as {\bf 1-4}, which indicates you want to restart JobIds
935 1 through 4, inclusive.
937 \subsection{Job Bandwidth Limitation}
939 The new {\bf Job Bandwidth Limitation} directive may be added to the File
940 daemon's and/or Director's configuration to limit the bandwidth used by a
941 Job on a Client. It can be set in the File daemon's conf file for all Jobs
942 run in that File daemon, or it can be set for each Job in the Director's
943 conf file. The speed is always specified in bytes per second.
949 Working Directory = /some/path
950 Pid Directory = /some/path
952 Maximum Bandwidth Per Job = 5Mb/s
956 The above example would cause any jobs running with the FileDaemon to not
957 exceed 5 megabytes per second of throughput when sending data to the
958 Storage Daemon. Note, the speed is always specified in bytes per second
959 (not in bits per second), and the case (upper/lower) of the specification
960 characters is ignored (i.e. 1MB/s = 1Mb/s).
962 You may specify the following speed parameter modifiers:
963 k/s (1,000 bytes per second), kb/s (1,024 bytes per second),
964 m/s (1,000,000 bytes per second), or mb/s (1,048,576 bytes per second).
970 FileSet = FS_localhost
973 Maximum Bandwidth = 5Mb/s
978 The above example would cause Job \texttt{localhost-data} to not exceed 5MB/s
979 of throughput when sending data from the File daemon to the Storage daemon.
981 A new console command \texttt{setbandwidth} permits to set dynamically the
982 maximum throughput of a running Job or for future jobs of a Client.
985 * setbandwidth limit=1000 jobid=10
988 Please note that the value specified for the \texttt{limit} command
989 line parameter is always in units of 1024 bytes (i.e. the number
990 is multiplied by 1024 to give the number of bytes per second). As
991 a consequence, the above limit of 1000 will be interpreted as a
992 limit of 1000 * 1024 = 1,024,000 bytes per second.
994 \subsection{Always Backup a File}
996 When the Accurate mode is turned on, you can decide to always backup a file
997 by using then new {\bf A} Accurate option in your FileSet. For example:
1002 FileSet = FS_Example
1020 This project was funded by Bacula Systems based on an idea of James Harper and
1021 is available with the Bacula Enterprise Edition.
1023 \subsection{Setting Accurate Mode at Runtime}
1025 You are now able to specify the Accurate mode on the \texttt{run} command and
1026 in the Schedule resource.
1029 * run accurate=yes job=Test
1035 Run = Full 1st sun at 23:05
1036 Run = Differential accurate=yes 2nd-5th sun at 23:05
1037 Run = Incremental accurate=no mon-sat at 23:05
1041 It can allow you to save memory and and CPU resources on the catalog server in
1045 These advanced tuning options are available with the Bacula Enterprise Edition.
1047 % Common with community
1048 \subsection{Additions to RunScript variables}
1049 You can have access to JobBytes, JobFiles and Director name using \%b, \%F and \%D
1050 in your runscript command. The Client address is now available through \%h.
1053 RunAfterJob = "/bin/echo Job=%j JobBytes=%b JobFiles=%F ClientAddress=%h Dir=%D"
1056 \subsection{LZO Compression}
1058 LZO compression was added in the Unix File Daemon. From the user point of view,
1059 it works like the GZIP compression (just replace {\bf compression=GZIP} with
1060 {\bf compression=LZO}).
1065 Options { compression=LZO }
1071 LZO provides much faster compression and decompression speed but lower
1072 compression ratio than GZIP. It is a good option when you backup to disk. For
1073 tape, the built-in compression may be a better option.
1075 LZO is a good alternative for GZIP1 when you don't want to slow down your
1076 backup. On a modern CPU it should be able to run almost as fast as:
1079 \item your client can read data from disk. Unless you have very fast disks like
1080 SSD or large/fast RAID array.
1081 \item the data transfers between the file daemon and the storage daemon even on
1085 Note that bacula only use one compression level LZO1X-1.
1088 The code for this feature was contributed by Laurent Papier.
1090 \subsection{Purge Migration Job}
1092 The new {\bf Purge Migration Job} directive may be added to the Migration
1093 Job definition in the Director's configuration file. When it is enabled
1094 the Job that was migrated during a migration will be purged at
1095 the end of the migration job.
1100 Name = "migrate-job"
1103 Client = localhost-fd
1104 FileSet = "Full Set"
1106 Storage = DiskChanger
1108 Selection Type = Job
1109 Selection Pattern = ".*Save"
1111 Purge Migration Job = yes
1117 This project was submitted by Dunlap Blake; testing and documentation was funded
1120 \subsection{Changes in the Pruning Algorithm}
1122 We rewrote the job pruning algorithm in this version. Previously, in some
1123 users reported that the pruning process at the end of jobs was very long.
1124 It should not be longer the case. Now, Bacula won't prune automatically a
1125 Job if this particular Job is needed to restore data. Example:
1128 JobId: 1 Level: Full
1129 JobId: 2 Level: Incremental
1130 JobId: 3 Level: Incremental
1131 JobId: 4 Level: Differential
1132 .. Other incrementals up to now
1135 In this example, if the Job Retention defined in the Pool or in the Client
1136 resource causes that Jobs with Jobid in 1,2,3,4 can be pruned, Bacula will
1137 detect that JobId 1 and 4 are essential to restore data at the current state
1138 and will prune only JobId 2 and 3.
1140 \texttt{Important}, this change affect only the automatic pruning step
1141 after a Job and the \texttt{prune jobs} Bconsole command. If a volume
1142 expires after the \texttt{VolumeRetention} period, important jobs can be
1145 \subsection{Ability to Verify any specified Job}
1146 You now have the ability to tell Bacula which Job should verify instead of
1147 automatically verify just the last one.
1149 This feature can be used with VolumeToCatalog, DiskToCatalog and Catalog level.
1151 To verify a given job, just specify the Job jobid in argument when starting the
1154 *run job=VerifyVolume jobid=1 level=VolumeToCatalog
1156 JobName: VerifyVolume
1157 Level: VolumeToCatalog
1158 Client: 127.0.0.1-fd
1160 Pool: Default (From Job resource)
1161 Storage: File (From Job resource)
1162 Verify Job: VerifyVol.2010-09-08_14.17.17_03
1163 Verify List: /tmp/regress/working/VerifyVol.bsr
1164 When: 2010-09-08 14:17:31
1166 OK to run? (yes/mod/no):
1171 \chapter{New Features in 7.0.0}
1172 This chapter presents the new features that have been added to
1173 the various versions of Bacula.
1175 \section{New Features in 7.0.0}
1177 \subsection{Storage daemon to Storage daemon}
1178 Bacula version 7.0 permits SD to SD transfer of Copy and Migration
1179 Jobs. This permits what is commonly referred to as replication or
1180 off-site transfer of Bacula backups. It occurs automatically, if
1181 the source SD and destination SD of a Copy or Migration job are
1182 different. The following picture shows how this works.
1184 \includegraphics[width=0.8\linewidth]{sd-to-sd}
1186 \subsection{SD Calls Client}
1187 If the {\bf SD Calls Client} directive is set to true in a Client resource
1188 any Backup, Restore, Verify, Copy, or Migration Job where the client
1189 is involved, the client will wait for the Storage daemon to contact it.
1190 By default this directive is set to false, and the Client will call
1191 the Storage daemon. This directive can be useful if your Storage daemon
1192 is behind a firewall that permits outgoing connections but not incoming
1193 one. The following picture shows the communications connection paths in
1196 \includegraphics[width=0.8\linewidth]{sd-calls-client}
1198 \subsection{Next Pool}
1199 In previous versions of Bacula the Next Pool directive could be
1200 specified in the Pool resource for use with Migration and Copy Jobs.
1201 The Next Pool concept has been
1202 extended in Bacula version 7.0.0 to allow you to specify the
1203 Next Pool directive in the Job resource as well. If specified in
1204 the Job resource, it will override any value specified in the Pool
1207 In addition to being permitted in the Job resource, the
1208 {\bf nextpool=xxx} specification can be specified as a run
1209 override in the {\bf run} directive of a Schedule resource.
1210 Any {\bf nextpool} specification in a {\bf run}
1211 directive will override any other specification in either
1212 the Job or the Pool.
1214 In general, more information is displayed in the Job log
1215 on exactly which Next Pool specification is ultimately used.
1217 \subsection{status storage}
1218 The bconsole {\bf status storage} has been modified to attempt to eliminate
1219 duplicate storage resources and only show one that references any given
1220 storage daemon. This might be confusing at first, but tends to make a
1221 much more compact list of storage resource from which to select if there
1222 are multiple storage devices in the same storage daemon.
1224 If you want the old behavior (always display all storage resources) simply
1225 add the keyword {\bf select} to the command -- i.e. use
1226 {\bf status select storage}.
1232 \subsection{status schedule}
1233 A new status command option called {\bf scheduled} has been implemented
1234 in bconsole. By default it will display 20 lines of the next scheduled
1235 jobs. For example, with the default bacula-dir.conf configuration file,
1236 a bconsole command {\bf status scheduled} produces:
1240 Level Type Pri Scheduled Job Name Schedule
1241 ======================================================================
1242 Differential Backup 10 Sun 30-Mar 23:05 BackupClient1 WeeklyCycle
1243 Incremental Backup 10 Mon 24-Mar 23:05 BackupClient1 WeeklyCycle
1244 Incremental Backup 10 Tue 25-Mar 23:05 BackupClient1 WeeklyCycle
1246 Full Backup 11 Mon 24-Mar 23:10 BackupCatalog WeeklyCycleAfterBackup
1247 Full Backup 11 Wed 26-Mar 23:10 BackupCatalog WeeklyCycleAfterBackup
1252 Note, the output is listed by the Jobs found, and is not sorted
1256 This command has a number of options, most of which act as filters:
1258 \item {\bf days=nn} This specifies the number of days to list. The default is
1259 10 but can be set from 0 to 500.
1260 \item {\bf limit=nn} This specifies the limit to the number of lines to print.
1261 The default is 100 but can be any number in the range 0 to 2000.
1262 \item {\bf time="YYYY-MM-DD HH:MM:SS"} Sets the start time for listing the
1263 scheduled jobs. The default is to use the current time. Note, the
1264 time value must be specified inside double quotes and must be in
1265 the exact form shown above.
1266 \item {\bf schedule=schedule-name} This option restricts the output to
1268 \item {\bf job=job-name} This option restricts the output to the specified
1272 \subsection{Data Encryption Cipher Configuration}
1273 Bacula version 7.0 and later now allows to configure the data
1274 encryption cipher and the digest algorithm. The cipher was forced to AES
1275 128, and it is now possible to choose between the following ciphers:
1278 \item AES128 (default)
1284 The digest algorithm was set to SHA1 or SHA256 depending on the local
1286 options. We advise you to not modify the PkiDigest default setting. Please,
1287 refer to OpenSSL documentation to know about pro and cons on these options.
1296 \subsection{New Truncate Command}
1297 We have added a new truncate command to bconsole, which
1298 will truncate a Volume if the Volume is purged and if
1299 the Volume is also marked {\bf Action On Purge = Truncate}.
1300 This feature was originally added in Bacula version 5.0.1,
1301 but the mechanism for actually doing the truncate required
1302 the user to enter a command such as:
1305 purge volume action=truncate storage=File pool=Default
1308 The above command is now simplified to be:
1311 truncate storage=File pool=Default
1314 \subsection{Migration/Copy/VirtualFull Performance Enhancements}
1315 The Bacula Storage daemon now permits multiple jobs to simultaneously read
1316 the same disk Volume, which gives substantial performance enhancements when
1317 running Migration, Copy, or VirtualFull jobs that read disk Volumes. Our
1318 testing shows that when running multiple simultaneous jobs, the jobs can
1319 finish up to ten times faster with this version of Bacula. This is
1320 built-in to the Storage daemon, so it happens automatically and
1323 \subsection{VirtualFull Backup Consolidation Enhancements}
1324 By default Bacula selects jobs automatically for a VirtualFull,
1325 however, you may want to create the Virtual backup based on a
1326 particular backup (point in time) that exists.
1328 For example, if you have the following backup Jobs in your catalog:
1330 +-------+---------+-------+----------+----------+-----------+
1331 | JobId | Name | Level | JobFiles | JobBytes | JobStatus |
1332 +-------+---------+-------+----------+----------+-----------+
1333 | 1 | Vbackup | F | 1754 | 50118554 | T |
1334 | 2 | Vbackup | I | 1 | 4 | T |
1335 | 3 | Vbackup | I | 1 | 4 | T |
1336 | 4 | Vbackup | D | 2 | 8 | T |
1337 | 5 | Vbackup | I | 1 | 6 | T |
1338 | 6 | Vbackup | I | 10 | 60 | T |
1339 | 7 | Vbackup | I | 11 | 65 | T |
1340 | 8 | Save | F | 1758 | 50118564 | T |
1341 +-------+---------+-------+----------+----------+-----------+
1344 and you want to consolidate only the first 3 jobs and create a
1345 virtual backup equivalent to Job 1 + Job 2 + Job 3, you will use
1346 \texttt{jobid=3} in the \texttt{run} command, then Bacula will select the
1347 previous Full backup, the previous Differential (if any) and all subsequent
1351 run job=Vbackup jobid=3 level=VirtualFull
1354 If you want to consolidate a specific job list, you must specify the exact
1355 list of jobs to merge in the run command line. For example, to consolidate
1356 the last Differential and all subsequent Incremental, you will use
1357 \texttt{jobid=4,5,6,7} or \texttt{jobid=4-7} on the run command line. As one
1358 of the Job in the list is a Differential backup, Bacula will set the new job
1359 level to Differential. If the list is composed only with Incremental jobs,
1360 the new job will have a level set to Incremental.
1363 run job=Vbackup jobid=4-7 level=VirtualFull
1366 When using this feature, Bacula will automatically discard jobs that are
1367 not related to the current Job. For example, specifying
1368 \texttt{jobid=7,8}, Bacula will discard JobId 8 because it is not
1369 part of the same backup Job.
1371 We do not recommend it, but really want to consolidate jobs that have
1372 different names (so probably different clients, filesets, etc...), you must
1373 use \texttt{alljobid=} keyword instead of \texttt{jobid=}.
1376 run job=Vbackup alljobid=1-3,6-8 level=VirtualFull
1380 \subsection{FD Storage Address}
1382 When the Director is behind a NAT, in a WAN area, to connect to
1384 the StorageDaemon, the Director uses an ``external'' ip address,
1385 and the FileDaemon should use an ``internal'' IP address to contact the
1388 The normal way to handle this situation is to use a canonical name such as
1389 ``storage-server'' that will be resolved on the Director side as the WAN
1390 address and on the Client side as the LAN address. This is now possible to
1391 configure this parameter using the new directive \texttt{FDStorageAddress} in
1392 the Storage or Client resource.
1395 \includegraphics[width=0.8\linewidth]{BackupOverWan1}
1396 \label{fig:fdstorageaddress}
1402 FD Storage Address = 10.0.0.1
1408 % # or in the Client resouce
1415 FD Storage Address = 10.0.0.1
1421 Note that using the Client \texttt{FDStorageAddress} directive will not allow
1422 to use multiple Storage Daemon, all Backup or Restore requests will be sent to
1423 the specified \texttt{FDStorageAddress}.
1425 \subsection{Job Bandwidth Limitation}
1427 The new {\bf Job Bandwidth Limitation} directive may be added to the File
1428 daemon's and/or Director's configuration to limit the bandwidth used by a
1429 Job on a Client. It can be set in the File daemon's conf file for all Jobs
1430 run in that File daemon, or it can be set for each Job in the Director's
1431 conf file. The speed is always specified in bytes per second.
1437 Working Directory = /some/path
1438 Pid Directory = /some/path
1440 Maximum Bandwidth Per Job = 5Mb/s
1444 The above example would cause any jobs running with the FileDaemon to not
1445 exceed 5 megabytes per second of throughput when sending data to the
1446 Storage Daemon. Note, the speed is always specified in bytes per second
1447 (not in bits per second), and the case (upper/lower) of the specification
1448 characters is ignored (i.e. 1MB/s = 1Mb/s).
1450 You may specify the following speed parameter modifiers:
1451 k/s (1,000 bytes per second), kb/s (1,024 bytes per second),
1452 m/s (1,000,000 bytes per second), or mb/s (1,048,576 bytes per second).
1457 Name = locahost-data
1458 FileSet = FS_localhost
1461 Maximum Bandwidth = 5Mb/s
1466 The above example would cause Job \texttt{localhost-data} to not exceed 5MB/s
1467 of throughput when sending data from the File daemon to the Storage daemon.
1469 A new console command \texttt{setbandwidth} permits to set dynamically the
1470 maximum throughput of a running Job or for future jobs of a Client.
1473 * setbandwidth limit=1000 jobid=10
1476 Please note that the value specified for the \texttt{limit} command
1477 line parameter is always in units of 1024 bytes (i.e. the number
1478 is multiplied by 1024 to give the number of bytes per second). As
1479 a consequence, the above limit of 1000 will be interpreted as a
1480 limit of 1000 * 1024 = 1,024,000 bytes per second.
1483 This project was funded by Bacula Systems.
1486 \subsection{Maximum Concurrent Read Jobs}
1487 This is a new directive that can be used in the {\bf bacula-dir.conf} file
1488 in the Storage resource. The main purpose is to limit the number
1489 of concurrent Copy, Migration, and VirtualFull jobs so that
1490 they don't monopolize all the Storage drives causing a deadlock situation
1491 where all the drives are allocated for reading but none remain for
1492 writing. This deadlock situation can occur when running multiple
1493 simultaneous Copy, Migration, and VirtualFull jobs.
1496 The default value is set to 0 (zero), which means there is no
1497 limit on the number of read jobs. Note, limiting the read jobs
1498 does not apply to Restore jobs, which are normally started by
1499 hand. A reasonable value for this directive is one half the number
1500 of drives that the Storage resource has rounded down. Doing so,
1501 will leave the same number of drives for writing and will generally
1502 avoid over committing drives and a deadlock.
1505 \subsection{Director job Codes in Message Resource Commands}
1506 Before submitting the specified mail command to the operating system, Bacula
1507 performs character substitution like in Runscript commands. Bacula will now
1508 perform also specific Director character substitution.
1511 The code for this feature was contributed by Bastian Friedrich.
1513 \subsection{Additions to RunScript variables}
1514 The following variables are now available in runscripts:
1516 \item current PID using \%P
1517 \item if the job is a clone job using \%C
1521 RunAfterJob = "/bin/echo Pid=%P isCloned=%C"
1525 \subsection{Read Only Storage Devices}
1526 This version of Bacula permits defining a Storage daemon device
1527 to be read-only. That is if the {\bf ReadOnly} directive is specified and
1528 enabled, the drive can only be used for read operations.
1529 The the {\bf ReadOnly} directive can be defined in any bacula-sd.conf
1530 Device resource, and is most useful to reserve one or more
1531 drives for restores. An example is:
1537 \subsection{New Prune ``Expired'' Volume Command}
1538 It is now possible to prune all volumes
1539 (from a pool, or globally) that are ``expired''. This option can be
1540 scheduled after or before the backup of the Catalog and can be
1541 combined with the Truncate On Purge option. The Expired Prune option can
1542 be used instead of the \texttt{manual\_prune.pl} script.
1545 * prune expired volumes
1547 * prune expired volumes pool=FullPool
1550 To schedule this option automatically, it can be added to the BackupCatalog job
1555 Name = CatalogBackup
1558 Console = "prune expired volume yes"
1564 \subsection{Hardlink Performance Enhancements}
1565 If you use a program such as Cyrus IMAP that creates very large numbers
1566 of hardlinks, the time to build the interactive restore tree can be
1567 excessively long. This version of Bacula has a new feature that
1568 automatically keeps the hardlinks associated with the restore tree
1569 in memory, which consumes a bit more memory but vastly speeds up
1570 building the tree. If the memory usage is too big for your system, you
1571 can reduce the amount of memory used during the restore command by
1572 adding the option {\bf optimizespeed=false} on the bconsole run
1575 This feature was developed by Josip Almasi, and enhanced to be runtime
1576 dynamic by Kern Sibbald.
1578 \subsection{DisableCommand Directive}
1579 There is a new Directive named {\bf Disable Command} that
1580 can be put in the File daemon Client or Director resource.
1581 If it is in the Client, it applies globally, otherwise the
1582 directive applies only to the Director in which it is found.
1583 The Disable Command adds security to your File daemon by
1584 disabling certain commands. The commands that can be
1610 On or more of these command keywords can be placed in quotes and separated
1611 by spaces on the Disable Command directive line. Note: the commands must
1612 be written exactly as they appear above.
1614 \subsection{Multiple Console Directors}
1615 Support for multiple bconsole and bat Directors in the bconsole.conf and
1616 bat.conf files has been implemented and/or improved.
1618 \subsection{Restricted Consoles}
1619 Better support for Restricted consoles has been implement for bconsole and
1622 \subsection{Configuration Files}
1623 In previous versions of Bacula the configuration files for each component
1624 were limited to a maximum of 499 bytes per configuration file line. This
1625 version of Bacula permits unlimited input line lengths. This can be
1626 especially useful for specifying more complicated Migration/Copy SQL
1627 statements and in creating long restricted console ACL lists.
1629 \subsection{Maximum Spawned Jobs}
1630 The Job resource now permits specifying a number of {\bf Maximum Spawn
1631 Jobs}. The default is 300. This directive can be useful if you have
1632 big hardware and you do a lot of Migration/Copy jobs which start
1633 at the same time. In prior versions of Bacula, Migration/Copy
1634 was limited to spawning a maximum of 100 jobs at a time.
1636 \subsection{Progress Meter}
1637 The new File daemon has been enhanced to send its progress (files
1638 processed and bytes written) to the Director every 30 seconds. These
1639 figures can then be displayed with a bconsole {\bf status dir}
1642 \subsection{Scheduling a 6th Week}
1643 Prior version of Bacula permits specifying 1st through 5th week of
1644 a month (first through fifth) as a keyword on the {\bf run}
1645 directive of a Schedule resource. This version of Bacula also permits
1646 specifying the 6th week of a month with the keyword {\bf sixth} or
1649 \subsection{Scheduling the Last Day of a Month}
1650 This version of Bacula now permits specifying the {\bf lastday}
1651 keyword in the {\bf run} directive of a Schedule resource.
1652 If {\bf lastday} is specified, it will apply only to those months
1653 specified on the {\bf run} directive. Note: by default all months
1656 \subsection{Improvements to Cancel and Restart bconsole Commands}
1657 The Restart bconsole command now allow selection of either
1658 canceled or failed jobs to be restarted. In addition both the
1659 {\bf cancel} and {\bf restart} bconsole commands permit entering
1660 a number of JobIds separated by commas or a range of JobIds indicated
1661 by a dash between the begin and end range (e.g. 3-10). Finally the
1662 two commands also allow one to enter the special keyword {\bf all}
1663 to select all the appropriate Jobs.
1665 \subsection{bconsole Performance Improvements}
1666 In previous versions of Bacula certain bconsole commands could wait a long
1667 time due to catalog lock contention. This was especially noticeable
1668 when a large number of jobs were running and putting their attributes
1669 into the catalog. This version uses a separate catalog connection that
1670 should significantly enhance performance.
1672 \subsection{New .bvfs\_decode\_lstat Command}
1673 There is a new bconsole command, which is
1674 {\bf .bvfs\_decode\_lstat} it requires one argument, which
1675 is {\bf lstat="lstat value to decode"}. An example command
1676 in bconsole and the output might be:
1680 .bvfs_decode_lstat lstat="A A EHt B A A A JP BAA B BTL/A7 BTL/A7 BTL/A7 A A C"
1698 \subsection*{New Debug Options}
1700 In Bacula Enterprise version 8.0 and later, we introduced new options to
1701 the \texttt{setdebug} command.
1705 If the \texttt{options} parameter is set, the following arguments can be
1706 used to control debug functions.
1709 \item [0] clear debug flags
1710 \item [i] Turn off, ignore bwrite() errors on restore on File Daemon
1711 \item [d] Turn off decomp of BackupRead() streams on File Daemon
1712 \item [t] Turn on timestamp in traces
1713 \item [T] Turn off timestamp in traces
1714 \item [c] Truncate trace file if trace file is activated
1715 \item [l] Turn on recoding events on P() and V()
1716 \item [p] Turn on the display of the event ring when doing a bactrace
1721 The following command will truncate the trace file and will turn on timestamps
1725 * setdebug level=10 trace=1 options=ct fd
1730 It is now possible to use \textsl{class} of debug messages called \texttt{tags}
1731 to control the debug output of Bacula daemons.
1734 \item [all] Display all debug messages
1735 \item [bvfs] Display BVFS debug messages
1736 \item [sql] Display SQL related debug messages
1737 \item [memory] Display memory and poolmem allocation messages
1738 \item [scheduler] Display scheduler related debug messages
1742 * setdebug level=10 tags=bvfs,sql,memory
1743 * setdebug level=10 tags=!bvfs
1745 # bacula-dir -t -d 200,bvfs,sql
1748 The \texttt{tags} option is composed of a list of tags, tags are separated by
1749 ``,'' or ``+'' or ``-'' or ``!''. To disable a specific tag, use ``-'' or ``!''
1750 in front of the tag. Note that more tags will come in future versions.
1752 %\LTXtable{\linewidth}{table_debugtags}
1755 \chapter{New Features in 5.2.13}
1756 This chapter presents the new features that have been added to the current
1757 Community version of Bacula that is now released.
1759 \subsection{Additions to RunScript variables}
1760 You can have access to Director name using \%D in your runscript
1764 RunAfterJob = "/bin/echo Director=%D
1767 \section{New Features in 5.2.1}
1768 This chapter presents the new features were added in the
1769 Community release version 5.2.1.
1771 There are additional features (plugins) available in the Enterprise version
1772 that are described in another chapter. A subscription to Bacula Systems
1773 is required for the Enterprise version.
1775 \subsection{LZO Compression}
1777 LZO compression has been to the File daemon. From the user's point of view,
1778 it works like the GZIP compression (just replace {\bf compression=GZIP} with
1779 {\bf compression=LZO}).
1784 Options {compression=LZO }
1790 LZO provides a much faster compression and decompression speed but lower
1791 compression ratio than GZIP. It is a good option when you backup to disk. For
1792 tape, the hardware compression is almost always a better option.
1794 LZO is a good alternative for GZIP1 when you don't want to slow down your
1795 backup. With a modern CPU it should be able to run almost as fast as:
1798 \item your client can read data from disk. Unless you have very fast disks like
1799 SSD or large/fast RAID array.
1800 \item the data transfers between the file daemon and the storage daemon even on
1804 Note, Bacula uses compression level LZO1X-1.
1807 The code for this feature was contributed by Laurent Papier.
1809 \subsection{New Tray Monitor}
1811 Since the old integrated Windows tray monitor doesn't work with
1812 recent Windows versions, we have written a new Qt Tray Monitor that is available
1813 for both Linux and Windows. In addition to all the previous features,
1814 this new version allows you to run Backups from
1815 the tray monitor menu.
1817 \begin{figure}[htbp]
1819 \includegraphics[width=0.8\linewidth]{tray-monitor}
1820 \label{fig:traymonitor}
1821 \caption{New tray monitor}
1824 \begin{figure}[htbp]
1826 \includegraphics[width=0.8\linewidth]{tray-monitor1}
1827 \label{fig:traymonitor1}
1828 \caption{Run a Job through the new tray monitor}
1832 To be able to run a job from the tray monitor, you need to
1833 allow specific commands in the Director monitor console:
1838 CommandACL = status, .clients, .jobs, .pools, .storage, .filesets, .messages, run
1839 ClientACL = *all* # you can restrict to a specific host
1851 This project was funded by Bacula Systems and is available with Bacula
1852 the Enterprise Edition and the Community Edition.
1854 \subsection{Purge Migration Job}
1856 The new {\bf Purge Migration Job} directive may be added to the Migration
1857 Job definition in the Director's configuration file. When it is enabled
1858 the Job that was migrated during a migration will be purged at
1859 the end of the migration job.
1864 Name = "migrate-job"
1867 Client = localhost-fd
1868 FileSet = "Full Set"
1870 Storage = DiskChanger
1872 Selection Type = Job
1873 Selection Pattern = ".*Save"
1875 Purge Migration Job = yes
1881 This project was submitted by Dunlap Blake; testing and documentation was funded
1884 \subsection{Changes in Bvfs (Bacula Virtual FileSystem)}
1886 Bat has now a bRestore panel that uses Bvfs to display files and
1889 \begin{figure}[htbp]
1891 \includegraphics[width=0.8\linewidth]{bat-brestore}
1892 \label{fig:batbrestore}
1893 \caption{Bat Brestore Panel}
1896 the Bvfs module works correctly with BaseJobs, Copy and Migration jobs.
1899 This project was funded by Bacula Systems.
1901 \subsubsection*{General notes}
1904 \item All fields are separated by a tab
1905 \item You can specify \texttt{limit=} and \texttt{offset=} to list smoothly
1906 records in very big directories
1907 \item All operations (except cache creation) are designed to run instantly
1908 \item At this time, Bvfs works faster on PostgreSQL than MySQL catalog. If you
1909 can contribute new faster SQL queries we will be happy, else don't complain
1911 \item The cache creation is dependent of the number of directories. As Bvfs
1912 shares information across jobs, the first creation can be slow
1913 \item All fields are separated by a tab
1914 \item Due to potential encoding problem, it's advised to always use pathid in
1918 \subsubsection*{Get dependent jobs from a given JobId}
1920 Bvfs allows you to query the catalog against any combination of jobs. You
1921 can combine all Jobs and all FileSet for a Client in a single session.
1923 To get all JobId needed to restore a particular job, you can use the
1924 \texttt{.bvfs\_get\_jobids} command.
1927 .bvfs_get_jobids jobid=num [all]
1931 .bvfs_get_jobids jobid=10
1933 .bvfs_get_jobids jobid=10 all
1937 In this example, a normal restore will need to use JobIds 1,2,5,10 to
1938 compute a complete restore of the system.
1940 With the \texttt{all} option, the Director will use all defined FileSet for
1943 \subsubsection*{Generating Bvfs cache}
1945 The \texttt{.bvfs\_update} command computes the directory cache for jobs
1946 specified in argument, or for all jobs if unspecified.
1949 .bvfs_update [jobid=numlist]
1954 .bvfs_update jobid=1,2,3
1957 You can run the cache update process in a RunScript after the catalog backup.
1959 \subsubsection*{Get all versions of a specific file}
1961 Bvfs allows you to find all versions of a specific file for a given Client with
1962 the \texttt{.bvfs\_version} command. To avoid problems with encoding, this
1963 function uses only PathId and FilenameId. The jobid argument is mandatory but
1967 .bvfs_versions client=filedaemon pathid=num filenameid=num jobid=1
1968 PathId FilenameId FileId JobId LStat Md5 VolName Inchanger
1969 PathId FilenameId FileId JobId LStat Md5 VolName Inchanger
1976 .bvfs_versions client=localhost-fd pathid=1 fnid=47 jobid=1
1977 1 47 52 12 gD HRid IGk D Po Po A P BAA I A /uPgWaxMgKZlnMti7LChyA Vol1 1
1980 \subsubsection*{List directories}
1982 Bvfs allows you to list directories in a specific path.
1984 .bvfs_lsdirs pathid=num path=/apath jobid=numlist limit=num offset=num
1985 PathId FilenameId FileId JobId LStat Path
1986 PathId FilenameId FileId JobId LStat Path
1987 PathId FilenameId FileId JobId LStat Path
1991 You need to \texttt{pathid} or \texttt{path}. Using \texttt{path=""} will list
1992 ``/'' on Unix and all drives on Windows. If FilenameId is 0, the record
1993 listed is a directory.
1996 .bvfs_lsdirs pathid=4 jobid=1,11,12
1997 4 0 0 0 A A A A A A A A A A A A A A .
1998 5 0 0 0 A A A A A A A A A A A A A A ..
1999 3 0 0 0 A A A A A A A A A A A A A A regress/
2002 In this example, to list directories present in \texttt{regress/}, you can use
2004 .bvfs_lsdirs pathid=3 jobid=1,11,12
2005 3 0 0 0 A A A A A A A A A A A A A A .
2006 4 0 0 0 A A A A A A A A A A A A A A ..
2007 2 0 0 0 A A A A A A A A A A A A A A tmp/
2010 \subsubsection*{List files}
2012 Bvfs allows you to list files in a specific path.
2014 .bvfs_lsfiles pathid=num path=/apath jobid=numlist limit=num offset=num
2015 PathId FilenameId FileId JobId LStat Path
2016 PathId FilenameId FileId JobId LStat Path
2017 PathId FilenameId FileId JobId LStat Path
2021 You need to \texttt{pathid} or \texttt{path}. Using \texttt{path=""} will list
2022 ``/'' on Unix and all drives on Windows. If FilenameId is 0, the record listed
2026 .bvfs_lsfiles pathid=4 jobid=1,11,12
2027 4 0 0 0 A A A A A A A A A A A A A A .
2028 5 0 0 0 A A A A A A A A A A A A A A ..
2029 1 0 0 0 A A A A A A A A A A A A A A regress/
2032 In this example, to list files present in \texttt{regress/}, you can use
2034 .bvfs_lsfiles pathid=1 jobid=1,11,12
2035 1 47 52 12 gD HRid IGk BAA I BMqcPH BMqcPE BMqe+t A titi
2036 1 49 53 12 gD HRid IGk BAA I BMqe/K BMqcPE BMqe+t B toto
2037 1 48 54 12 gD HRie IGk BAA I BMqcPH BMqcPE BMqe+3 A tutu
2038 1 45 55 12 gD HRid IGk BAA I BMqe/K BMqcPE BMqe+t B ficheriro1.txt
2039 1 46 56 12 gD HRie IGk BAA I BMqe/K BMqcPE BMqe+3 D ficheriro2.txt
2042 \subsubsection*{Restore set of files}
2044 Bvfs allows you to create a SQL table that contains files that you want to
2045 restore. This table can be provided to a restore command with the file option.
2048 .bvfs_restore fileid=numlist dirid=numlist hardlink=numlist path=b2num
2050 restore file=?b2num ...
2053 To include a directory (with \texttt{dirid}), Bvfs needs to run a query to
2054 select all files. This query could be time consuming.
2056 \texttt{hardlink} list is always composed of a series of two numbers (jobid,
2057 fileindex). This information can be found in the LinkFI field of the LStat
2060 The \texttt{path} argument represents the name of the table that Bvfs will
2061 store results. The format of this table is \texttt{b2[0-9]+}. (Should start by
2062 b2 and followed by digits).
2067 .bvfs_restore fileid=1,2,3,4 hardlink=10,15,10,20 jobid=10 path=b20001
2071 \subsubsection*{Cleanup after Restore}
2073 To drop the table used by the restore command, you can use the
2074 \texttt{.bvfs\_cleanup} command.
2077 .bvfs_cleanup path=b20001
2080 \subsubsection*{Clearing the BVFS Cache}
2082 To clear the BVFS cache, you can use the \texttt{.bvfs\_clear\_cache} command.
2085 .bvfs_clear_cache yes
2089 \subsection{Changes in the Pruning Algorithm}
2091 We rewrote the job pruning algorithm in this version. Previously, in some users
2092 reported that the pruning process at the end of jobs was very long. It should
2093 not be longer the case. Now, Bacula won't prune automatically a Job if this
2094 particular Job is needed to restore data. Example:
2097 JobId: 1 Level: Full
2098 JobId: 2 Level: Incremental
2099 JobId: 3 Level: Incremental
2100 JobId: 4 Level: Differential
2101 .. Other incrementals up to now
2104 In this example, if the Job Retention defined in the Pool or in the Client
2105 resource causes that Jobs with Jobid in 1,2,3,4 can be pruned, Bacula will
2106 detect that JobId 1 and 4 are essential to restore data at the current state
2107 and will prune only JobId 2 and 3.
2109 \texttt{Important}, this change affect only the automatic pruning step after a
2110 Job and the \texttt{prune jobs} Bconsole command. If a volume expires after the
2111 \texttt{VolumeRetention} period, important jobs can be pruned.
2113 \subsection{Ability to Verify any specified Job}
2114 You now have the ability to tell Bacula which Job should verify instead of
2115 automatically verify just the last one.
2117 This feature can be used with VolumeToCatalog, DiskToCatalog and Catalog level.
2119 To verify a given job, just specify the Job jobid in argument when starting the
2122 *run job=VerifyVolume jobid=1 level=VolumeToCatalog
2124 JobName: VerifyVolume
2125 Level: VolumeToCatalog
2126 Client: 127.0.0.1-fd
2128 Pool: Default (From Job resource)
2129 Storage: File (From Job resource)
2130 Verify Job: VerifyVol.2010-09-08_14.17.17_03
2131 Verify List: /tmp/regress/working/VerifyVol.bsr
2132 When: 2010-09-08 14:17:31
2134 OK to run? (yes/mod/no):
2138 This project was funded by Bacula Systems and is available with Bacula
2139 Enterprise Edition and Community Edition.
2141 \subsection{Additions to RunScript variables}
2142 You can have access to JobBytes and JobFiles using \%b and \%F in your runscript
2143 command. The Client address is now available through \%h.
2146 RunAfterJob = "/bin/echo Job=%j JobBytes=%b JobFiles=%F ClientAddress=%h"
2149 %\subsection{Changes in drivetype.exe}
2151 %Now the \texttt{drivetype.exe} program allows you to list all local hard
2152 %drives. It can help to build dynamic FileSet on Windows.
2155 %File = "\\|\"c:/program files/bacula/bin32/drivetype\" -l -a"
2159 \subsection{Additions to the Plugin API}
2160 The bfuncs structure has been extended to include a number of
2163 \subsubsection{bfuncs}
2164 The bFuncs structure defines the callback entry points within Bacula
2165 that the plugin can use register events, get Bacula values, set
2166 Bacula values, and send messages to the Job output or debug output.
2168 The exact definition as of this writing is:
2170 typedef struct s_baculaFuncs {
2173 bRC (*registerBaculaEvents)(bpContext *ctx, ...);
2174 bRC (*getBaculaValue)(bpContext *ctx, bVariable var, void *value);
2175 bRC (*setBaculaValue)(bpContext *ctx, bVariable var, void *value);
2176 bRC (*JobMessage)(bpContext *ctx, const char *file, int line,
2177 int type, utime_t mtime, const char *fmt, ...);
2178 bRC (*DebugMessage)(bpContext *ctx, const char *file, int line,
2179 int level, const char *fmt, ...);
2180 void *(*baculaMalloc)(bpContext *ctx, const char *file, int line,
2182 void (*baculaFree)(bpContext *ctx, const char *file, int line, void *mem);
2184 /* New functions follow */
2185 bRC (*AddExclude)(bpContext *ctx, const char *file);
2186 bRC (*AddInclude)(bpContext *ctx, const char *file);
2187 bRC (*AddIncludeOptions)(bpContext *ctx, const char *opts);
2188 bRC (*AddRegex)(bpContext *ctx, const char *item, int type);
2189 bRC (*AddWild)(bpContext *ctx, const char *item, int type);
2190 bRC (*checkChanges)(bpContext *ctx, struct save_pkt *sp);
2196 \item [AddExclude] can be called to exclude a file. The file
2197 string passed may include wildcards that will be interpreted by
2198 the {\bf fnmatch} subroutine. This function can be called
2199 multiple times, and each time the file specified will be added
2200 to the list of files to be excluded. Note, this function only
2201 permits adding excludes of specific file or directory names,
2202 or files matched by the rather simple fnmatch mechanism.
2203 See below for information on doing wild-card and regex excludes.
2205 \item [NewPreInclude] can be called to create a new Include block. This
2206 block will be added after the current defined Include block. This
2207 function can be called multiple times, but each time, it will create
2208 a new Include section (not normally needed). This function should
2209 be called only if you want to add an entirely new Include block.
2211 \item [NewInclude] can be called to create a new Include block. This
2212 block will be added before any user defined Include blocks. This
2213 function can be called multiple times, but each time, it will create
2214 a new Include section (not normally needed). This function should
2215 be called only if you want to add an entirely new Include block.
2217 \item [AddInclude] can be called to add new files/directories to
2218 be included. They are added to the current Include block. If
2219 NewInclude has not been included, the current Include block is
2220 the last one that the user created. This function
2221 should be used only if you want to add totally new files/directories
2222 to be included in the backup.
2224 \item [NewOptions] adds a new Options block to the current Include
2225 in front of any other Options blocks. This permits the plugin to
2226 add exclude directives (wild-cards and regexes) in front of the
2227 user Options, and thus prevent certain files from being backed up.
2228 This can be useful if the plugin backs up files, and they should
2229 not be also backed up by the main Bacula code. This function
2230 may be called multiple times, and each time, it creates a new
2231 prepended Options block. Note: normally you want to call this
2232 entry point prior to calling AddOptions, AddRegex, or AddWild.
2234 \item [AddOptions] allows the plugin it set options in
2235 the current Options block, which is normally created with the
2236 NewOptions call just prior to adding Include Options.
2237 The permitted options are passed as a character string, where
2238 each character has a specific meaning as defined below:
2241 \item [a] always replace files (default).
2242 \item [e] exclude rather than include.
2243 \item [h] no recursion into subdirectories.
2244 \item [H] do not handle hard links.
2245 \item [i] ignore case in wildcard and regex matches.
2246 \item [M] compute an MD5 sum.
2247 \item [p] use a portable data format on Windows (not recommended).
2248 \item [R] backup resource forks and Findr Info.
2249 \item [r] read from a fifo
2250 \item [S1] compute an SHA1 sum.
2251 \item [S2] compute an SHA256 sum.
2252 \item [S3] comput an SHA512 sum.
2253 \item [s] handle sparse files.
2254 \item [m] use st\_mtime only for file differences.
2255 \item [k] restore the st\_atime after accessing a file.
2256 \item [A] enable ACL backup.
2257 \item [Vxxx:] specify verify options. Must terminate with :
2258 \item [Cxxx:] specify accurate options. Must terminate with :
2259 \item [Jxxx:] specify base job Options. Must terminate with :
2260 \item [Pnnn:] specify integer nnn paths to strip. Must terminate with :
2262 \item [Zn] specify gzip compression level n.
2263 \item [K] do not use st\_atime in backup decision.
2264 \item [c] check if file changed during backup.
2265 \item [N] honor no dump flag.
2266 \item [X] enable backup of extended attributes.
2269 \item [AddRegex] adds a regex expression to the current Options block.
2270 The following options are permitted:
2272 \item [ ] (a blank) regex applies to whole path and filename.
2273 \item [F] regex applies only to the filename (directory or path stripped).
2274 \item [D] regex applies only to the directory (path) part of the name.
2277 \item [AddWild] adds a wildcard expression to the current Options block.
2278 The following options are permitted:
2280 \item [ ] (a blank) regex applies to whole path and filename.
2281 \item [F] regex applies only to the filename (directory or path stripped).
2282 \item [D] regex applies only to the directory (path) part of the name.
2285 \item [checkChanges] call the \texttt{check\_changes()} function in Bacula code
2286 that can use Accurate code to compare the file information in argument with
2287 the previous file information. The \texttt{delta\_seq} attribute of the
2288 \texttt{save\_pkt} will be updated, and the call will return
2289 \texttt{bRC\_Seen} if the core code wouldn't decide to backup it.
2294 \subsubsection{Bacula events}
2295 The list of events has been extended to include:
2301 bEventStartBackupJob = 3,
2302 bEventEndBackupJob = 4,
2303 bEventStartRestoreJob = 5,
2304 bEventEndRestoreJob = 6,
2305 bEventStartVerifyJob = 7,
2306 bEventEndVerifyJob = 8,
2307 bEventBackupCommand = 9,
2308 bEventRestoreCommand = 10,
2313 bEventCancelCommand = 13,
2314 bEventVssBackupAddComponents = 14,
2315 bEventVssRestoreLoadComponentMetadata = 15,
2316 bEventVssRestoreSetComponentsSelected = 16,
2317 bEventRestoreObject = 17,
2318 bEventEndFileSet = 18,
2319 bEventPluginCommand = 19,
2320 bEventVssBeforeCloseRestore = 20,
2321 bEventVssPrepareSnapshot = 21
2327 \item [bEventCancelCommand] is called whenever the currently
2328 running Job is canceled */
2330 \item [bEventVssBackupAddComponents]
2332 \item [bEventVssPrepareSnapshot] is called before creating VSS snapshots, it
2333 provides a char[27] table where the plugin can add Windows drives that will
2334 be used during the Job. You need to add them without duplicates, and you can
2335 use in \texttt{fd\_common.h} \texttt{add\_drive()} and \texttt{copy\_drives()}
2339 \subsection{ACL enhancements}
2341 The following enhancements are made to the Bacula Filed with regards to
2342 Access Control Lists (ACLs)
2345 \item Added support for AIX 5.3 and later new aclx\_get interface which supports
2346 POSIX and NFSv4 ACLs.
2347 \item Added support for new acl types on FreeBSD 8.1 and later which supports
2348 POSIX and NFSv4 ACLs.
2349 \item Some generic cleanups for internal ACL handling.
2350 \item Fix for acl storage on OSX
2351 \item Cleanup of configure checks for ACL detection, now configure only
2352 tests for a certain interface type based on the operating system
2353 this should give less false positives on detection. Also when ACLs
2354 are detected no other acl checks are performed anymore.
2358 This project was funded by Planets Communications B.V. and ELM Consultancy B.V.
2359 and is available with Bacula Enterprise Edition and Community Edition.
2361 \subsection{XATTR enhancements}
2363 The following enhancements are made to the Bacula Filed with regards to
2364 Extended Attributes (XATTRs)
2367 \item Added support for IRIX extended attributes using the attr\_get interface.
2368 \item Added support for Tru64 (OSF1) extended attributes using the
2369 getproplist interface.
2370 \item Added support for AIX extended attributes available in AIX 6.x
2371 and higher using the listea/getea/setea interface.
2372 \item Added some debugging to generic xattr code so it easier to
2374 \item Cleanup of configure checks for XATTR detection, now configure only
2375 tests for a certain interface type based on the operating system
2376 this should give less false positives on detection. Also when xattrs
2377 are detected no other xattr checks are performed anymore.
2381 This project was funded by Planets Communications B.V. and ELM Consultancy B.V.
2382 and is available with Bacula Enterprise Edition and Community Edition.
2384 \subsection{Class Based Database Backend Drivers}
2386 The main Bacula Director code is independent of the SQL backend
2387 in version 5.2.0 and greater. This means that the Bacula Director can be
2388 packaged by itself, then each of the different SQL backends supported can
2389 be packaged separately. It is possible to build all the DB backends at the
2390 same time by including multiple database options at the same time.
2392 ./configure can be run with multiple database configure options.
2399 Order of testing for databases is:
2406 Each configured backend generates a file named:
2407 \verb+libbaccats-<sql_backend_name>-<version>.so+
2408 A dummy catalog library is created named libbaccats-version.so
2410 At configure time the first detected backend is used as the so called
2411 default backend and at install time the dummy
2412 \verb+libbaccats-<version>.so+ is replaced with the default backend type.
2414 If you configure all three backends you get three backend libraries and the
2415 postgresql gets installed as the default.
2417 When you want to switch to another database, first save any old catalog you
2418 may have then you can copy one of the three backend libraries over the
2419 \verb+libbaccats-<version>.so+ e.g.
2421 An actual command, depending on your Bacula version might be:
2423 cp libbaccats-postgresql-5.2.2.so libbaccats-5.2.2.so
2426 where the \verb+5.2.2+ must be replaced by the Bacula release
2429 Then you must update the default backend in the following files:
2432 create_bacula_database
2433 drop_bacula_database
2435 grant_bacula_privileges
2438 update_bacula_tables
2441 And re-run all the above scripts. Please note, this means
2442 you will have a new empty database and if you had a previous
2443 one it will be lost.
2445 All current database backend drivers for catalog information are rewritten
2446 to use a set of multi inherited C++ classes which abstract the specific
2447 database specific internals and make sure we have a more stable generic
2448 interface with the rest of SQL code. From now on there is a strict
2449 boundary between the SQL code and the low-level database functions. This
2450 new interface should also make it easier to add a new backend for a
2451 currently unsupported database. As part of the rewrite the SQLite 2 code
2452 was removed (e.g. only SQLite 3 is now supported). An extra bonus of the
2453 new code is that you can configure multiple backends in the configure and
2454 build all backends in one compile session and select the correct database
2455 backend at install time. This should make it a lot easier for packages
2461 We also added cursor support for PostgreSQL backend, this improves memory
2462 usage for large installation.
2465 This project was implemented by Planets Communications B.V. and ELM
2466 Consultancy B.V. and Bacula Systems and is available with both the Bacula
2467 Enterprise Edition and the Community Edition.
2469 \subsection{Hash List Enhancements}
2471 The htable hash table class has been extended with extra hash functions for
2472 handling next to char pointer hashes also 32 bits and 64 bits hash keys.
2473 Also the hash table initialization routines have been enhanced with
2474 support for passing a hint as to the number of initial pages to use
2475 for the size of the hash table. Until now the hash table always used
2476 a fixed value of 10 Mb. The private hash functions of the mountpoint entry
2477 cache have been rewritten to use the new htable class with a small memory
2481 This project was funded by Planets Communications B.V. and ELM Consultancy B.V.
2482 and Bacula Systems and is available with Bacula Enterprise Edition and
2487 %%% =====================================================================
2492 \section{Release Version 5.0.3}
2494 There are no new features in version 5.0.2. This version simply fixes a
2495 number of bugs found in version 5.0.1 during the ongoing development
2498 \section{Release Version 5.0.2}
2500 There are no new features in version 5.0.2. This version simply fixes a
2501 number of bugs found in version 5.0.1 during the ongoing development
2507 \section{New Features in 5.0.1}
2509 This chapter presents the new features that are in the released Bacula version
2510 5.0.1. This version mainly fixes a number of bugs found in version 5.0.0 during
2511 the ongoing development process.
2513 \subsection{Truncate Volume after Purge}
2514 \label{sec:actiononpurge}
2516 The Pool directive \textbf{ActionOnPurge=Truncate} instructs Bacula to truncate
2517 the volume when it is purged with the new command \texttt{purge volume
2518 action}. It is useful to prevent disk based volumes from consuming too much
2524 Action On Purge = Truncate
2529 As usual you can also set this property with the \texttt{update volume} command
2531 *update volume=xxx ActionOnPurge=Truncate
2532 *update volume=xxx actiononpurge=None
2535 To ask Bacula to truncate your \texttt{Purged} volumes, you need to use the
2536 following command in interactive mode or in a RunScript as shown after:
2538 *purge volume action=truncate storage=File allpools
2539 # or by default, action=all
2540 *purge volume action storage=File pool=Default
2543 This is possible to specify the volume name, the media type, the pool, the
2544 storage, etc\dots (see \texttt{help purge}) Be sure that your storage device is
2545 idle when you decide to run this command.
2549 Name = CatalogBackup
2554 Console = "purge volume action=all allpools storage=File"
2559 \textbf{Important note}: This feature doesn't work as
2560 expected in version 5.0.0. Please do not use it before version 5.0.1.
2562 \subsection{Allow Higher Duplicates}
2563 This directive did not work correctly and has been depreciated
2564 (disabled) in version 5.0.1. Please remove it from your bacula-dir.conf
2565 file as it will be removed in a future release.
2567 \subsection{Cancel Lower Level Duplicates}
2568 This directive was added in Bacula version 5.0.1. It compares the
2569 level of a new backup job to old jobs of the same name, if any,
2570 and will kill the job which has a lower level than the other one.
2571 If the levels are the same (i.e. both are Full backups), then
2572 nothing is done and the other Cancel XXX Duplicate directives
2575 \section{New Features in 5.0.0}
2577 \subsection{Maximum Concurrent Jobs for Devices}
2578 \label{sec:maximumconcurrentjobdevice}
2580 {\bf Maximum Concurrent Jobs} is a new Device directive in the Storage
2581 Daemon configuration permits setting the maximum number of Jobs that can
2582 run concurrently on a specified Device. Using this directive, it is
2583 possible to have different Jobs using multiple drives, because when the
2584 Maximum Concurrent Jobs limit is reached, the Storage Daemon will start new
2585 Jobs on any other available compatible drive. This facilitates writing to
2586 multiple drives with multiple Jobs that all use the same Pool.
2588 This project was funded by Bacula Systems.
2590 \subsection{Restore from Multiple Storage Daemons}
2591 \index[general]{Restore}
2593 Previously, you were able to restore from multiple devices in a single Storage
2594 Daemon. Now, Bacula is able to restore from multiple Storage Daemons. For
2595 example, if your full backup runs on a Storage Daemon with an autochanger, and
2596 your incremental jobs use another Storage Daemon with lots of disks, Bacula
2597 will switch automatically from one Storage Daemon to an other within the same
2600 You must upgrade your File Daemon to version 3.1.3 or greater to use this
2603 This project was funded by Bacula Systems with the help of Equiinet.
2605 \subsection{File Deduplication using Base Jobs}
2606 A base job is sort of like a Full save except that you will want the FileSet to
2607 contain only files that are unlikely to change in the future (i.e. a snapshot
2608 of most of your system after installing it). After the base job has been run,
2609 when you are doing a Full save, you specify one or more Base jobs to be used.
2610 All files that have been backed up in the Base job/jobs but not modified will
2611 then be excluded from the backup. During a restore, the Base jobs will be
2612 automatically pulled in where necessary.
2614 This is something none of the competition does, as far as we know (except
2615 perhaps BackupPC, which is a Perl program that saves to disk only). It is big
2616 win for the user, it makes Bacula stand out as offering a unique optimization
2617 that immediately saves time and money. Basically, imagine that you have 100
2618 nearly identical Windows or Linux machine containing the OS and user files.
2619 Now for the OS part, a Base job will be backed up once, and rather than making
2620 100 copies of the OS, there will be only one. If one or more of the systems
2621 have some files updated, no problem, they will be automatically restored.
2623 See the \ilink{Base Job Chapter}{basejobs} for more information.
2625 This project was funded by Bacula Systems.
2627 \subsection{AllowCompression = \lt{}yes\vb{}no\gt{}}
2628 \index[dir]{AllowCompression}
2630 This new directive may be added to Storage resource within the Director's
2631 configuration to allow users to selectively disable the client compression for
2632 any job which writes to this storage resource.
2638 Address = ultrium-tape
2639 Password = storage_password # Password for Storage Daemon
2642 AllowCompression = No # Tape drive has hardware compression
2645 The above example would cause any jobs running with the UltriumTape storage
2646 resource to run without compression from the client file daemons. This
2647 effectively overrides any compression settings defined at the FileSet level.
2649 This feature is probably most useful if you have a tape drive which supports
2650 hardware compression. By setting the \texttt{AllowCompression = No} directive
2651 for your tape drive storage resource, you can avoid additional load on the file
2652 daemon and possibly speed up tape backups.
2654 This project was funded by Collaborative Fusion, Inc.
2656 \subsection{Accurate Fileset Options}
2657 \label{sec:accuratefileset}
2659 In previous versions, the accurate code used the file creation and modification
2660 times to determine if a file was modified or not. Now you can specify which
2661 attributes to use (time, size, checksum, permission, owner, group, \dots),
2662 similar to the Verify options.
2678 \item {\bf i} compare the inodes
2679 \item {\bf p} compare the permission bits
2680 \item {\bf n} compare the number of links
2681 \item {\bf u} compare the user id
2682 \item {\bf g} compare the group id
2683 \item {\bf s} compare the size
2684 \item {\bf a} compare the access time
2685 \item {\bf m} compare the modification time (st\_mtime)
2686 \item {\bf c} compare the change time (st\_ctime)
2687 \item {\bf d} report file size decreases
2688 \item {\bf 5} compare the MD5 signature
2689 \item {\bf 1} compare the SHA1 signature
2692 \textbf{Important note:} If you decide to use checksum in Accurate jobs,
2693 the File Daemon will have to read all files even if they normally would not
2694 be saved. This increases the I/O load, but also the accuracy of the
2695 deduplication. By default, Bacula will check modification/creation time
2698 This project was funded by Bacula Systems.
2700 \subsection{Tab-completion for Bconsole}
2701 \label{sec:tabcompletion}
2703 If you build \texttt{bconsole} with readline support, you will be able to use
2704 the new auto-completion mode. This mode supports all commands, gives help
2705 inside command, and lists resources when required. It works also in the restore
2708 To use this feature, you should have readline development package loaded on
2709 your system, and use the following option in configure.
2711 ./configure --with-readline=/usr/include/readline --disable-conio ...
2714 The new bconsole won't be able to tab-complete with older directors.
2716 This project was funded by Bacula Systems.
2718 \subsection{Pool File and Job Retention}
2719 \label{sec:poolfilejobretention}
2721 We added two new Pool directives, \texttt{FileRetention} and
2722 \texttt{JobRetention}, that take precedence over Client directives of the same
2723 name. It allows you to control the Catalog pruning algorithm Pool by Pool. For
2724 example, you can decide to increase Retention times for Archive or OffSite Pool.
2726 It seems obvious to us, but apparently not to some users, that given the
2727 definition above that the Pool File and Job Retention periods is a global
2728 override for the normal Client based pruning, which means that when the
2729 Job is pruned, the pruning will apply globally to that particular Job.
2731 Currently, there is a bug in the implementation that causes any Pool
2732 retention periods specified to apply to {\bf all} Pools for that
2733 particular Client. Thus we suggest that you avoid using these two
2734 directives until this implementation problem is corrected.
2736 \subsection{Read-only File Daemon using capabilities}
2737 \label{sec:fdreadonly}
2738 This feature implements support of keeping \textbf{ReadAll} capabilities after
2739 UID/GID switch, this allows FD to keep root read but drop write permission.
2741 It introduces new \texttt{bacula-fd} option (\texttt{-k}) specifying that
2742 \textbf{ReadAll} capabilities should be kept after UID/GID switch.
2745 root@localhost:~# bacula-fd -k -u nobody -g nobody
2748 The code for this feature was contributed by our friends at AltLinux.
2750 \subsection{Bvfs API}
2753 To help developers of restore GUI interfaces, we have added new \textsl{dot
2754 commands} that permit browsing the catalog in a very simple way.
2757 \item \texttt{.bvfs\_update [jobid=x,y,z]} This command is required to update
2758 the Bvfs cache in the catalog. You need to run it before any access to the
2761 \item \texttt{.bvfs\_lsdirs jobid=x,y,z path=/path | pathid=101} This command
2762 will list all directories in the specified \texttt{path} or
2763 \texttt{pathid}. Using \texttt{pathid} avoids problems with character
2764 encoding of path/filenames.
2766 \item \texttt{.bvfs\_lsfiles jobid=x,y,z path=/path | pathid=101} This command
2767 will list all files in the specified \texttt{path} or \texttt{pathid}. Using
2768 \texttt{pathid} avoids problems with character encoding.
2771 You can use \texttt{limit=xxx} and \texttt{offset=yyy} to limit the amount of
2772 data that will be displayed.
2775 * .bvfs_update jobid=1,2
2777 * .bvfs_lsdir path=/ jobid=1,2
2780 This project was funded by Bacula Systems.
2782 \subsection{Testing your Tape Drive}
2783 \label{sec:btapespeed}
2785 To determine the best configuration of your tape drive, you can run the new
2786 \texttt{speed} command available in the \texttt{btape} program.
2788 This command can have the following arguments:
2790 \item[\texttt{file\_size=n}] Specify the Maximum File Size for this test
2791 (between 1 and 5GB). This counter is in GB.
2792 \item[\texttt{nb\_file=n}] Specify the number of file to be written. The amount
2793 of data should be greater than your memory ($file\_size*nb\_file$).
2794 \item[\texttt{skip\_zero}] This flag permits to skip tests with constant
2796 \item[\texttt{skip\_random}] This flag permits to skip tests with random
2798 \item[\texttt{skip\_raw}] This flag permits to skip tests with raw access.
2799 \item[\texttt{skip\_block}] This flag permits to skip tests with Bacula block
2804 *speed file_size=3 skip_raw
2805 btape.c:1078 Test with zero data and bacula block structure.
2806 btape.c:956 Begin writing 3 files of 3.221 GB with blocks of 129024 bytes.
2807 ++++++++++++++++++++++++++++++++++++++++++
2808 btape.c:604 Wrote 1 EOF to "Drive-0" (/dev/nst0)
2809 btape.c:406 Volume bytes=3.221 GB. Write rate = 44.128 MB/s
2811 btape.c:383 Total Volume bytes=9.664 GB. Total Write rate = 43.531 MB/s
2813 btape.c:1090 Test with random data, should give the minimum throughput.
2814 btape.c:956 Begin writing 3 files of 3.221 GB with blocks of 129024 bytes.
2815 +++++++++++++++++++++++++++++++++++++++++++
2816 btape.c:604 Wrote 1 EOF to "Drive-0" (/dev/nst0)
2817 btape.c:406 Volume bytes=3.221 GB. Write rate = 7.271 MB/s
2818 +++++++++++++++++++++++++++++++++++++++++++
2820 btape.c:383 Total Volume bytes=9.664 GB. Total Write rate = 7.365 MB/s
2824 When using compression, the random test will give your the minimum throughput
2825 of your drive . The test using constant string will give you the maximum speed
2826 of your hardware chain. (CPU, memory, SCSI card, cable, drive, tape).
2828 You can change the block size in the Storage Daemon configuration file.
2830 \subsection{New {\bf Block Checksum} Device Directive}
2831 You may now turn off the Block Checksum (CRC32) code
2832 that Bacula uses when writing blocks to a Volume. This is
2839 doing so can reduce the Storage daemon CPU usage slightly. It
2840 will also permit Bacula to read a Volume that has corrupted data.
2842 The default is {\bf yes} -- i.e. the checksum is computed on write
2843 and checked on read.
2845 We do not recommend to turn this off particularly on older tape
2846 drives or for disk Volumes where doing so may allow corrupted data
2849 \subsection{New Bat Features}
2851 Those new features were funded by Bacula Systems.
2853 \subsubsection{Media List View}
2855 By clicking on ``Media'', you can see the list of all your volumes. You will be
2856 able to filter by Pool, Media Type, Location,\dots And sort the result directly
2857 in the table. The old ``Media'' view is now known as ``Pool''.
2858 \begin{figure}[htbp]
2860 \includegraphics[width=0.8\linewidth]{bat-mediaview}
2861 \label{fig:mediaview}
2865 \subsubsection{Media Information View}
2867 By double-clicking on a volume (on the Media list, in the Autochanger content
2868 or in the Job information panel), you can access a detailed overview of your
2869 Volume. (cf figure \vref{fig:mediainfo}.)
2870 \begin{figure}[htbp]
2872 \includegraphics[width=0.8\linewidth]{bat11}
2873 \caption{Media information}
2874 \label{fig:mediainfo}
2877 \subsubsection{Job Information View}
2879 By double-clicking on a Job record (on the Job run list or in the Media
2880 information panel), you can access a detailed overview of your Job. (cf
2881 figure \vref{fig:jobinfo}.)
2882 \begin{figure}[htbp]
2884 \includegraphics[width=0.8\linewidth]{bat12}
2885 \caption{Job information}
2889 \subsubsection{Autochanger Content View}
2891 By double-clicking on a Storage record (on the Storage list panel), you can
2892 access a detailed overview of your Autochanger. (cf figure \vref{fig:jobinfo}.)
2893 \begin{figure}[htbp]
2895 \includegraphics[width=0.8\linewidth]{bat13}
2896 \caption{Autochanger content}
2897 \label{fig:achcontent}
2900 To use this feature, you need to use the latest mtx-changer script
2901 version. (With new \texttt{listall} and \texttt{transfer} commands)
2903 \subsection{Bat on Windows}
2904 We have ported {\bf bat} to Windows and it is now installed
2905 by default when the installer is run. It works quite well
2906 on Win32, but has not had a lot of testing there, so your
2907 feedback would be welcome. Unfortunately, even though it is
2908 installed by default, it does not yet work on 64 bit Windows
2911 \subsection{New Win32 Installer}
2912 The Win32 installer has been modified in several very important
2915 \item You must deinstall any current version of the
2916 Win32 File daemon before upgrading to the new one.
2917 If you forget to do so, the new installation will fail.
2918 To correct this failure, you must manually shutdown
2919 and deinstall the old File daemon.
2920 \item All files (other than menu links) are installed
2921 in {\bf c:/Program Files/Bacula}.
2922 \item The installer no longer sets this
2923 file to require administrator privileges by default. If you want
2924 to do so, please do it manually using the {\bf cacls} program.
2927 cacls "C:\Program Files\Bacula" /T /G SYSTEM:F Administrators:F
2929 \item The server daemons (Director and Storage daemon) are
2930 no longer included in the Windows installer. If you want the
2931 Windows servers, you will either need to build them yourself (note
2932 they have not been ported to 64 bits), or you can contact
2933 Bacula Systems about this.
2936 \subsection{Win64 Installer}
2937 We have corrected a number of problems that required manual
2938 editing of the conf files. In most cases, it should now
2939 install and work. {\bf bat} is by default installed in
2940 {\bf c:/Program Files/Bacula/bin32} rather than
2941 {\bf c:/Program Files/Bacula} as is the case with the 32
2942 bit Windows installer.
2944 \subsection{Linux Bare Metal Recovery USB Key}
2945 We have made a number of significant improvements in the
2946 Bare Metal Recovery USB key. Please see the README files
2947 it the {\bf rescue} release for more details.
2949 We are working on an equivalent USB key for Windows bare
2950 metal recovery, but it will take some time to develop it (best
2951 estimate 3Q2010 or 4Q2010)
2954 \subsection{bconsole Timeout Option}
2955 You can now use the -u option of {\bf bconsole} to set a timeout in seconds
2956 for commands. This is useful with GUI programs that use {\bf bconsole}
2957 to interface to the Director.
2959 \subsection{Important Changes}
2960 \label{sec:importantchanges}
2963 \item You are now allowed to Migrate, Copy, and Virtual Full to read and write
2964 to the same Pool. The Storage daemon ensures that you do not read and
2965 write to the same Volume.
2966 \item The \texttt{Device Poll Interval} is now 5 minutes. (previously did not
2968 \item Virtually all the features of {\bf mtx-changer} have
2969 now been parametrized, which allows you to configure
2970 mtx-changer without changing it. There is a new configuration file {\bf mtx-changer.conf}
2971 that contains variables that you can set to configure mtx-changer.
2972 This configuration file will not be overwritten during upgrades.
2973 We encourage you to submit any changes
2974 that are made to mtx-changer and to parametrize it all in
2975 mtx-changer.conf so that all configuration will be done by
2976 changing only mtx-changer.conf.
2977 \item The new \texttt{mtx-changer} script has two new options, \texttt{listall}
2978 and \texttt{transfer}. Please configure them as appropriate
2979 in mtx-changer.conf.
2980 \item To enhance security of the \texttt{BackupCatalog} job, we provide a new
2981 script (\texttt{make\_catalog\_backup.pl}) that does not expose your catalog
2982 password. If you want to use the new script, you will need to
2983 manually change the \texttt{BackupCatalog} Job definition.
2984 \item The \texttt{bconsole} \texttt{help} command now accepts
2985 an argument, which if provided produces information on that
2986 command (ex: \texttt{help run}).
2990 \subsubsection*{Truncate volume after purge}
2992 Note that the Truncate Volume after purge feature doesn't work as expected
2993 in 5.0.0 version. Please, don't use it before version 5.0.1.
2995 \subsubsection{Custom Catalog queries}
2997 If you wish to add specialized commands that list the contents of the catalog,
2998 you can do so by adding them to the \texttt{query.sql} file. This
2999 \texttt{query.sql} file is now empty by default. The file
3000 \texttt{examples/sample-query.sql} has an a number of sample commands
3001 you might find useful.
3003 \subsubsection{Deprecated parts}
3005 The following items have been \textbf{deprecated} for a long time, and are now
3006 removed from the code.
3009 \item Support for SQLite 2
3012 \subsection{Misc Changes}
3013 \label{sec:miscchanges}
3016 \item Updated Nagios check\_bacula
3017 \item Updated man files
3018 \item Added OSX package generation script in platforms/darwin
3019 \item Added Spanish and Ukrainian Bacula translations
3020 \item Enable/disable command shows only Jobs that can change
3021 \item Added \texttt{show disabled} command to show disabled Jobs
3022 \item Many ACL improvements
3023 \item Added Level to FD status Job output
3024 \item Begin Ingres DB driver (not yet working)
3025 \item Split RedHat spec files into bacula, bat, mtx, and docs
3026 \item Reorganized the manuals (fewer separate manuals)
3027 \item Added lock/unlock order protection in lock manager
3028 \item Allow 64 bit sizes for a number of variables
3029 \item Fixed several deadlocks or potential race conditions in the SD
3032 \chapter{Released Version 3.0.3 and 3.0.3a}
3034 There are no new features in version 3.0.3. This version simply fixes a
3035 number of bugs found in version 3.0.2 during the ongoing development
3038 \section{New Features in Released Version 3.0.2}
3040 This chapter presents the new features added to the
3041 Released Bacula Version 3.0.2.
3043 \subsection{Full Restore from a Given JobId}
3044 \index[general]{Restore menu}
3046 This feature allows selecting a single JobId and having Bacula
3047 automatically select all the other jobs that comprise a full backup up to
3048 and including the selected date (through JobId).
3050 Assume we start with the following jobs:
3052 +-------+--------------+---------------------+-------+----------+------------+
3053 | jobid | client | starttime | level | jobfiles | jobbytes |
3054 +-------+--------------+---------------------+-------+----------+------------
3055 | 6 | localhost-fd | 2009-07-15 11:45:49 | I | 2 | 0 |
3056 | 5 | localhost-fd | 2009-07-15 11:45:45 | I | 15 | 44143 |
3057 | 3 | localhost-fd | 2009-07-15 11:45:38 | I | 1 | 10 |
3058 | 1 | localhost-fd | 2009-07-15 11:45:30 | F | 1527 | 44143073 |
3059 +-------+--------------+---------------------+-------+----------+------------+
3062 Below is an example of this new feature (which is number 12 in the
3067 To select the JobIds, you have the following choices:
3068 1: List last 20 Jobs run
3069 2: List Jobs where a given File is saved
3071 12: Select full restore to a specified Job date
3074 Select item: (1-13): 12
3075 Enter JobId to get the state to restore: 5
3076 Selecting jobs to build the Full state at 2009-07-15 11:45:45
3077 You have selected the following JobIds: 1,3,5
3079 Building directory tree for JobId(s) 1,3,5 ... +++++++++++++++++++
3080 1,444 files inserted into the tree.
3083 This project was funded by Bacula Systems.
3085 \subsection{Source Address}
3086 \index[general]{Source Address}
3088 A feature has been added which allows the administrator to specify the address
3089 from which the Director and File daemons will establish connections. This
3090 may be used to simplify system configuration overhead when working in complex
3091 networks utilizing multi-homing and policy-routing.
3093 To accomplish this, two new configuration directives have been implemented:
3096 FDSourceAddress=10.0.1.20 # Always initiate connections from this address
3100 DirSourceAddress=10.0.1.10 # Always initiate connections from this address
3104 Simply adding specific host routes on the OS
3105 would have an undesirable side-effect: any
3106 application trying to contact the destination host would be forced to use the
3107 more specific route possibly diverting management traffic onto a backup VLAN.
3108 Instead of adding host routes for each client connected to a multi-homed backup
3109 server (for example where there are management and backup VLANs), one can
3110 use the new directives to specify a specific source address at the application
3113 Additionally, this allows the simplification and abstraction of firewall rules
3114 when dealing with a Hot-Standby director or storage daemon configuration. The
3115 Hot-standby pair may share a CARP address, which connections must be sourced
3116 from, while system services listen and act from the unique interface addresses.
3118 This project was funded by Collaborative Fusion, Inc.
3120 \subsection{Show volume availability when doing restore}
3122 When doing a restore the selection dialog ends by displaying this
3126 The job will require the following
3127 Volume(s) Storage(s) SD Device(s)
3128 ===========================================================================
3129 *000741L3 LTO-4 LTO3
3130 *000866L3 LTO-4 LTO3
3131 *000765L3 LTO-4 LTO3
3132 *000764L3 LTO-4 LTO3
3133 *000756L3 LTO-4 LTO3
3134 *001759L3 LTO-4 LTO3
3135 *001763L3 LTO-4 LTO3
3139 Volumes marked with ``*'' are online (in the autochanger).
3142 This should help speed up large restores by minimizing the time spent
3143 waiting for the operator to discover that he must change tapes in the library.
3145 This project was funded by Bacula Systems.
3147 \subsection{Accurate estimate command}
3149 The \texttt{estimate} command can now use the accurate code to detect changes
3150 and give a better estimation.
3152 You can set the accurate behavior on the command line by using
3153 \texttt{accurate=yes\vb{}no} or use the Job setting as default value.
3156 * estimate listing accurate=yes level=incremental job=BackupJob
3159 This project was funded by Bacula Systems.
3161 \section{New Features in 3.0.0}
3162 \label{NewFeaturesChapter}
3163 \index[general]{New Features}
3165 This chapter presents the new features added to the development 2.5.x
3166 versions to be released as Bacula version 3.0.0 sometime in April 2009.
3168 \subsection{Accurate Backup}
3169 \index[general]{Accurate Backup}
3171 As with most other backup programs, by default Bacula decides what files to
3172 backup for Incremental and Differential backup by comparing the change
3173 (st\_ctime) and modification (st\_mtime) times of the file to the time the last
3174 backup completed. If one of those two times is later than the last backup
3175 time, then the file will be backed up. This does not, however, permit tracking
3176 what files have been deleted and will miss any file with an old time that may
3177 have been restored to or moved onto the client filesystem.
3179 \subsubsection{Accurate = \lt{}yes\vb{}no\gt{}}
3180 If the {\bf Accurate = \lt{}yes\vb{}no\gt{}} directive is enabled (default no) in
3181 the Job resource, the job will be run as an Accurate Job. For a {\bf Full}
3182 backup, there is no difference, but for {\bf Differential} and {\bf
3183 Incremental} backups, the Director will send a list of all previous files
3184 backed up, and the File daemon will use that list to determine if any new files
3185 have been added or or moved and if any files have been deleted. This allows
3186 Bacula to make an accurate backup of your system to that point in time so that
3187 if you do a restore, it will restore your system exactly.
3190 about using Accurate backup is that it requires more resources (CPU and memory)
3191 on both the Director and the Client machines to create the list of previous
3192 files backed up, to send that list to the File daemon, for the File daemon to
3193 keep the list (possibly very big) in memory, and for the File daemon to do
3194 comparisons between every file in the FileSet and the list. In particular,
3195 if your client has lots of files (more than a few million), you will need
3196 lots of memory on the client machine.
3198 Accurate must not be enabled when backing up with a plugin that is not
3199 specially designed to work with Accurate. If you enable it, your restores
3200 will probably not work correctly.
3202 This project was funded by Bacula Systems.
3206 \subsection{Copy Jobs}
3207 \index[general]{Copy Jobs}
3209 A new {\bf Copy} job type 'C' has been implemented. It is similar to the
3210 existing Migration feature with the exception that the Job that is copied is
3211 left unchanged. This essentially creates two identical copies of the same
3212 backup. However, the copy is treated as a copy rather than a backup job, and
3213 hence is not directly available for restore. The {\bf restore} command lists
3214 copy jobs and allows selection of copies by using \texttt{jobid=}
3215 option. If the keyword {\bf copies} is present on the command line, Bacula will
3216 display the list of all copies for selected jobs.
3221 These JobIds have copies as follows:
3222 +-------+------------------------------------+-----------+------------------+
3223 | JobId | Job | CopyJobId | MediaType |
3224 +-------+------------------------------------+-----------+------------------+
3225 | 2 | CopyJobSave.2009-02-17_16.31.00.11 | 7 | DiskChangerMedia |
3226 +-------+------------------------------------+-----------+------------------+
3227 +-------+-------+----------+----------+---------------------+------------------+
3228 | JobId | Level | JobFiles | JobBytes | StartTime | VolumeName |
3229 +-------+-------+----------+----------+---------------------+------------------+
3230 | 19 | F | 6274 | 76565018 | 2009-02-17 16:30:45 | ChangerVolume002 |
3231 | 2 | I | 1 | 5 | 2009-02-17 16:30:51 | FileVolume001 |
3232 +-------+-------+----------+----------+---------------------+------------------+
3233 You have selected the following JobIds: 19,2
3235 Building directory tree for JobId(s) 19,2 ... ++++++++++++++++++++++++++++++++++++++++++++
3236 5,611 files inserted into the tree.
3241 The Copy Job runs without using the File daemon by copying the data from the
3242 old backup Volume to a different Volume in a different Pool. See the Migration
3243 documentation for additional details. For copy Jobs there is a new selection
3244 directive named {\bf PoolUncopiedJobs} which selects all Jobs that were
3245 not already copied to another Pool.
3247 As with Migration, the Client, Volume, Job, or SQL query, are
3248 other possible ways of selecting the Jobs to be copied. Selection
3249 types like SmallestVolume, OldestVolume, PoolOccupancy and PoolTime also
3250 work, but are probably more suited for Migration Jobs.
3252 If Bacula finds a Copy of a job record that is purged (deleted) from the catalog,
3253 it will promote the Copy to a \textsl{real} backup job and will make it available for
3254 automatic restore. If more than one Copy is available, it will promote the copy
3255 with the smallest JobId.
3257 A nice solution which can be built with the new Copy feature is often
3258 called disk-to-disk-to-tape backup (DTDTT). A sample config could
3259 look something like the one below:
3263 Name = FullBackupsVirtualPool
3265 Purge Oldest Volume = Yes
3267 NextPool = FullBackupsTapePool
3271 Name = FullBackupsTapePool
3275 Volume Retention = 365 days
3276 Storage = superloader
3280 # Fake fileset for copy jobs
3292 # Fake client for copy jobs
3302 # Default template for a CopyDiskToTape Job
3305 Name = CopyDiskToTape
3307 Messages = StandardCopy
3310 Selection Type = PoolUncopiedJobs
3311 Maximum Concurrent Jobs = 10
3313 Allow Duplicate Jobs = Yes
3314 Cancel Queued Duplicates = No
3315 Cancel Running Duplicates = No
3320 Name = DaySchedule7:00
3321 Run = Level=Full daily at 7:00
3325 Name = CopyDiskToTapeFullBackups
3327 Schedule = DaySchedule7:00
3328 Pool = FullBackupsVirtualPool
3329 JobDefs = CopyDiskToTape
3333 The example above had 2 pool which are copied using the PoolUncopiedJobs
3334 selection criteria. Normal Full backups go to the Virtual pool and are copied
3335 to the Tape pool the next morning.
3337 The command \texttt{list copies [jobid=x,y,z]} lists copies for a given
3342 +-------+------------------------------------+-----------+------------------+
3343 | JobId | Job | CopyJobId | MediaType |
3344 +-------+------------------------------------+-----------+------------------+
3345 | 9 | CopyJobSave.2008-12-20_22.26.49.05 | 11 | DiskChangerMedia |
3346 +-------+------------------------------------+-----------+------------------+
3349 \subsection{ACL Updates}
3350 \index[general]{ACL Updates}
3351 The whole ACL code had been overhauled and in this version each platforms has
3352 different streams for each type of acl available on such an platform. As ACLs
3353 between platforms tend to be not that portable (most implement POSIX acls but
3354 some use an other draft or a completely different format) we currently only
3355 allow certain platform specific ACL streams to be decoded and restored on the
3356 same platform that they were created on. The old code allowed to restore ACL
3357 cross platform but the comments already mention that not being to wise. For
3358 backward compatibility the new code will accept the two old ACL streams and
3359 handle those with the platform specific handler. But for all new backups it
3360 will save the ACLs using the new streams.
3362 Currently the following platforms support ACLs:
3366 \item {\bf Darwin/OSX}
3375 Currently we support the following ACL types (these ACL streams use a reserved
3376 part of the stream numbers):
3379 \item {\bf STREAM\_ACL\_AIX\_TEXT} 1000 AIX specific string representation from
3381 \item {\bf STREAM\_ACL\_DARWIN\_ACCESS\_ACL} 1001 Darwin (OSX) specific acl\_t
3382 string representation from acl\_to\_text (POSIX acl)
3383 \item {\bf STREAM\_ACL\_FREEBSD\_DEFAULT\_ACL} 1002 FreeBSD specific acl\_t
3384 string representation from acl\_to\_text (POSIX acl) for default acls.
3385 \item {\bf STREAM\_ACL\_FREEBSD\_ACCESS\_ACL} 1003 FreeBSD specific acl\_t
3386 string representation from acl\_to\_text (POSIX acl) for access acls.
3387 \item {\bf STREAM\_ACL\_HPUX\_ACL\_ENTRY} 1004 HPUX specific acl\_entry
3388 string representation from acltostr (POSIX acl)
3389 \item {\bf STREAM\_ACL\_IRIX\_DEFAULT\_ACL} 1005 IRIX specific acl\_t string
3390 representation from acl\_to\_text (POSIX acl) for default acls.
3391 \item {\bf STREAM\_ACL\_IRIX\_ACCESS\_ACL} 1006 IRIX specific acl\_t string
3392 representation from acl\_to\_text (POSIX acl) for access acls.
3393 \item {\bf STREAM\_ACL\_LINUX\_DEFAULT\_ACL} 1007 Linux specific acl\_t
3394 string representation from acl\_to\_text (POSIX acl) for default acls.
3395 \item {\bf STREAM\_ACL\_LINUX\_ACCESS\_ACL} 1008 Linux specific acl\_t string
3396 representation from acl\_to\_text (POSIX acl) for access acls.
3397 \item {\bf STREAM\_ACL\_TRU64\_DEFAULT\_ACL} 1009 Tru64 specific acl\_t
3398 string representation from acl\_to\_text (POSIX acl) for default acls.
3399 \item {\bf STREAM\_ACL\_TRU64\_DEFAULT\_DIR\_ACL} 1010 Tru64 specific acl\_t
3400 string representation from acl\_to\_text (POSIX acl) for default acls.
3401 \item {\bf STREAM\_ACL\_TRU64\_ACCESS\_ACL} 1011 Tru64 specific acl\_t string
3402 representation from acl\_to\_text (POSIX acl) for access acls.
3403 \item {\bf STREAM\_ACL\_SOLARIS\_ACLENT} 1012 Solaris specific aclent\_t
3404 string representation from acltotext or acl\_totext (POSIX acl)
3405 \item {\bf STREAM\_ACL\_SOLARIS\_ACE} 1013 Solaris specific ace\_t string
3406 representation from from acl\_totext (NFSv4 or ZFS acl)
3409 In future versions we might support conversion functions from one type of acl
3410 into an other for types that are either the same or easily convertible. For now
3411 the streams are separate and restoring them on a platform that doesn't
3412 recognize them will give you a warning.
3414 \subsection{Extended Attributes}
3415 \index[general]{Extended Attributes}
3416 Something that was on the project list for some time is now implemented for
3417 platforms that support a similar kind of interface. Its the support for backup
3418 and restore of so called extended attributes. As extended attributes are so
3419 platform specific these attributes are saved in separate streams for each
3420 platform. Restores of the extended attributes can only be performed on the
3421 same platform the backup was done. There is support for all types of extended
3422 attributes, but restoring from one type of filesystem onto an other type of
3423 filesystem on the same platform may lead to surprises. As extended attributes
3424 can contain any type of data they are stored as a series of so called
3425 value-pairs. This data must be seen as mostly binary and is stored as such.
3426 As security labels from selinux are also extended attributes this option also
3427 stores those labels and no specific code is enabled for handling selinux
3430 Currently the following platforms support extended attributes:
3432 \item {\bf Darwin/OSX}
3438 On Linux acls are also extended attributes, as such when you enable ACLs on a
3439 Linux platform it will NOT save the same data twice e.g. it will save the ACLs
3440 and not the same extended attribute.
3442 To enable the backup of extended attributes please add the following to your
3457 \subsection{Shared objects}
3458 \index[general]{Shared objects}
3459 A default build of Bacula will now create the libraries as shared objects
3460 (.so) rather than static libraries as was previously the case.
3461 The shared libraries are built using {\bf libtool} so it should be quite
3464 An important advantage of using shared objects is that on a machine with the
3465 Directory, File daemon, the Storage daemon, and a console, you will have only
3466 one copy of the code in memory rather than four copies. Also the total size of
3467 the binary release is smaller since the library code appears only once rather
3468 than once for every program that uses it; this results in significant reduction
3469 in the size of the binaries particularly for the utility tools.
3471 In order for the system loader to find the shared objects when loading the
3472 Bacula binaries, the Bacula shared objects must either be in a shared object
3473 directory known to the loader (typically /usr/lib) or they must be in the
3474 directory that may be specified on the {\bf ./configure} line using the {\bf
3475 {-}{-}libdir} option as:
3478 ./configure --libdir=/full-path/dir
3481 the default is /usr/lib. If {-}{-}libdir is specified, there should be
3482 no need to modify your loader configuration provided that
3483 the shared objects are installed in that directory (Bacula
3484 does this with the make install command). The shared objects
3485 that Bacula references are:
3494 These files are symbolically linked to the real shared object file,
3495 which has a version number to permit running multiple versions of
3496 the libraries if desired (not normally the case).
3498 If you have problems with libtool or you wish to use the old
3499 way of building static libraries, or you want to build a static
3500 version of Bacula you may disable
3501 libtool on the configure command line with:
3504 ./configure --disable-libtool
3508 \subsection{Building Static versions of Bacula}
3509 \index[general]{Static linking}
3510 In order to build static versions of Bacula, in addition
3511 to configuration options that were needed you now must
3512 also add --disable-libtool. Example
3515 ./configure --enable-static-client-only --disable-libtool
3519 \subsection{Virtual Backup (Vbackup)}
3520 \index[general]{Virtual Backup}
3521 \index[general]{Vbackup}
3523 Bacula's virtual backup feature is often called Synthetic Backup or
3524 Consolidation in other backup products. It permits you to consolidate the
3525 previous Full backup plus the most recent Differential backup and any
3526 subsequent Incremental backups into a new Full backup. This new Full
3527 backup will then be considered as the most recent Full for any future
3528 Incremental or Differential backups. The VirtualFull backup is
3529 accomplished without contacting the client by reading the previous backup
3530 data and writing it to a volume in a different pool.
3532 In some respects the Vbackup feature works similar to a Migration job, in
3533 that Bacula normally reads the data from the pool specified in the
3534 Job resource, and writes it to the {\bf Next Pool} specified in the
3535 Job resource. Note, this means that usually the output from the Virtual
3536 Backup is written into a different pool from where your prior backups
3537 are saved. Doing it this way guarantees that you will not get a deadlock
3538 situation attempting to read and write to the same volume in the Storage
3539 daemon. If you then want to do subsequent backups, you may need to
3540 move the Virtual Full Volume back to your normal backup pool.
3541 Alternatively, you can set your {\bf Next Pool} to point to the current
3542 pool. This will cause Bacula to read and write to Volumes in the
3543 current pool. In general, this will work, because Bacula will
3544 not allow reading and writing on the same Volume. In any case, once
3545 a VirtualFull has been created, and a restore is done involving the
3546 most current Full, it will read the Volume or Volumes by the VirtualFull
3547 regardless of in which Pool the Volume is found.
3549 The Vbackup is enabled on a Job by Job in the Job resource by specifying
3550 a level of {\bf VirtualFull}.
3552 A typical Job resource definition might look like the following:
3559 FileSet = "Full Set"
3566 # Default pool definition
3570 Recycle = yes # Automatically recycle Volumes
3571 AutoPrune = yes # Prune expired volumes
3572 Volume Retention = 365d # one year
3580 Recycle = yes # Automatically recycle Volumes
3581 AutoPrune = yes # Prune expired volumes
3582 Volume Retention = 365d # one year
3583 Storage = DiskChanger
3586 # Definition of file storage device
3591 Device = FileStorage
3593 Maximum Concurrent Jobs = 5
3596 # Definition of DDS Virtual tape disk storage device
3599 Address = localhost # N.B. Use a fully qualified name here
3601 Device = DiskChanger
3602 Media Type = DiskChangerMedia
3603 Maximum Concurrent Jobs = 4
3608 Then in bconsole or via a Run schedule, you would run the job as:
3611 run job=MyBackup level=Full
3612 run job=MyBackup level=Incremental
3613 run job=MyBackup level=Differential
3614 run job=MyBackup level=Incremental
3615 run job=MyBackup level=Incremental
3618 So providing there were changes between each of those jobs, you would end up
3619 with a Full backup, a Differential, which includes the first Incremental
3620 backup, then two Incremental backups. All the above jobs would be written to
3621 the {\bf Default} pool.
3623 To consolidate those backups into a new Full backup, you would run the
3627 run job=MyBackup level=VirtualFull
3630 And it would produce a new Full backup without using the client, and the output
3631 would be written to the {\bf Full} Pool which uses the Diskchanger Storage.
3633 If the Virtual Full is run, and there are no prior Jobs, the Virtual Full will
3636 Note, the Start and End time of the Virtual Full backup is set to the
3637 values for the last job included in the Virtual Full (in the above example,
3638 it is an Increment). This is so that if another incremental is done, which
3639 will be based on the Virtual Full, it will backup all files from the
3640 last Job included in the Virtual Full rather than from the time the Virtual
3641 Full was actually run.
3645 \subsection{Catalog Format}
3646 \index[general]{Catalog Format}
3647 Bacula 3.0 comes with some changes to the catalog format. The upgrade
3648 operation will convert the FileId field of the File table from 32 bits (max 4
3649 billion table entries) to 64 bits (very large number of items). The
3650 conversion process can take a bit of time and will likely DOUBLE THE SIZE of
3651 your catalog during the conversion. Also you won't be able to run jobs during
3652 this conversion period. For example, a 3 million file catalog will take 2
3653 minutes to upgrade on a normal machine. Please don't forget to make a valid
3654 backup of your database before executing the upgrade script. See the
3655 ReleaseNotes for additional details.
3657 \subsection{64 bit Windows Client}
3658 \index[general]{Win64 Client}
3659 Unfortunately, Microsoft's implementation of Volume Shadown Copy (VSS) on
3660 their 64 bit OS versions is not compatible with a 32 bit Bacula Client.
3661 As a consequence, we are also releasing a 64 bit version of the Bacula
3662 Windows Client (win64bacula-3.0.0.exe) that does work with VSS.
3663 These binaries should only be installed on 64 bit Windows operating systems.
3664 What is important is not your hardware but whether or not you have
3665 a 64 bit version of the Windows OS.
3667 Compared to the Win32 Bacula Client, the 64 bit release contains a few differences:
3669 \item Before installing the Win64 Bacula Client, you must totally
3670 deinstall any prior 2.4.x Client installation using the
3671 Bacula deinstallation (see the menu item). You may want
3672 to save your .conf files first.
3673 \item Only the Client (File daemon) is ported to Win64, the Director
3674 and the Storage daemon are not in the 64 bit Windows installer.
3675 \item bwx-console is not yet ported.
3676 \item bconsole is ported but it has not been tested.
3677 \item The documentation is not included in the installer.
3678 \item Due to Vista security restrictions imposed on a default installation
3679 of Vista, before upgrading the Client, you must manually stop
3680 any prior version of Bacula from running, otherwise the install
3682 \item Due to Vista security restrictions imposed on a default installation
3683 of Vista, attempting to edit the conf files via the menu items
3684 will fail. You must directly edit the files with appropriate
3685 permissions. Generally double clicking on the appropriate .conf
3686 file will work providing you have sufficient permissions.
3687 \item All Bacula files are now installed in
3688 {\bf C:/Program Files/Bacula} except the main menu items,
3689 which are installed as before. This vastly simplifies the installation.
3690 \item If you are running on a foreign language version of Windows, most
3691 likely {\bf C:/Program Files} does not exist, so you should use the
3692 Custom installation and enter an appropriate location to install
3694 \item The 3.0.0 Win32 Client continues to install files in the locations used
3695 by prior versions. For the next version we will convert it to use
3696 the same installation conventions as the Win64 version.
3699 This project was funded by Bacula Systems.
3702 \subsection{Duplicate Job Control}
3703 \index[general]{Duplicate Jobs}
3704 The new version of Bacula provides four new directives that
3705 give additional control over what Bacula does if duplicate jobs
3706 are started. A duplicate job in the sense we use it here means
3707 a second or subsequent job with the same name starts. This
3708 happens most frequently when the first job runs longer than expected because no
3709 tapes are available.
3711 The four directives each take as an argument a {\bf yes} or {\bf no} value and
3712 are specified in the Job resource.
3716 \subsubsection{Allow Duplicate Jobs = \lt{}yes\vb{}no\gt{}}
3717 \index[general]{Allow Duplicate Jobs}
3718 If this directive is set to {\bf yes}, duplicate jobs will be run. If
3719 the directive is set to {\bf no} (default) then only one job of a given name
3720 may run at one time, and the action that Bacula takes to ensure only
3721 one job runs is determined by the other directives (see below).
3723 If {\bf Allow Duplicate Jobs} is set to {\bf no} and two jobs
3724 are present and none of the three directives given below permit
3725 Canceling a job, then the current job (the second one started)
3728 \subsubsection{Allow Higher Duplicates = \lt{}yes\vb{}no\gt{}}
3729 \index[general]{Allow Higher Duplicates}
3730 This directive was in version 5.0.0, but does not work as
3731 expected. If used, it should always be set to no. In later versions
3732 of Bacula the directive is disabled (disregarded).
3734 \subsubsection{Cancel Running Duplicates = \lt{}yes\vb{}no\gt{}}
3735 \index[general]{Cancel Running Duplicates}
3736 If {\bf Allow Duplicate Jobs} is set to {\bf no} and
3737 if this directive is set to {\bf yes} any job that is already running
3738 will be canceled. The default is {\bf no}.
3740 \subsubsection{Cancel Queued Duplicates = \lt{}yes\vb{}no\gt{}}
3741 \index[general]{Cancel Queued Duplicates}
3742 If {\bf Allow Duplicate Jobs} is set to {\bf no} and
3743 if this directive is set to {\bf yes} any job that is
3744 already queued to run but not yet running will be canceled.
3745 The default is {\bf no}.
3748 \subsection{TLS Authentication}
3749 \index[general]{TLS Authentication}
3750 In Bacula version 2.5.x and later, in addition to the normal Bacula
3751 CRAM-MD5 authentication that is used to authenticate each Bacula
3752 connection, you can specify that you want TLS Authentication as well,
3753 which will provide more secure authentication.
3755 This new feature uses Bacula's existing TLS code (normally used for
3756 communications encryption) to do authentication. To use it, you must
3757 specify all the TLS directives normally used to enable communications
3758 encryption (TLS Enable, TLS Verify Peer, TLS Certificate, ...) and
3761 \subsubsection{TLS Authenticate = yes}
3763 TLS Authenticate = yes
3766 in the main daemon configuration resource (Director for the Director,
3767 Client for the File daemon, and Storage for the Storage daemon).
3769 When {\bf TLS Authenticate} is enabled, after doing the CRAM-MD5
3770 authentication, Bacula will also do TLS authentication, then TLS
3771 encryption will be turned off, and the rest of the communication between
3772 the two Bacula daemons will be done without encryption.
3774 If you want to encrypt communications data, use the normal TLS directives
3775 but do not turn on {\bf TLS Authenticate}.
3777 \subsection{bextract non-portable Win32 data}
3778 \index[general]{bextract handles Win32 non-portable data}
3779 {\bf bextract} has been enhanced to be able to restore
3780 non-portable Win32 data to any OS. Previous versions were
3781 unable to restore non-portable Win32 data to machines that
3782 did not have the Win32 BackupRead and BackupWrite API calls.
3784 \subsection{State File updated at Job Termination}
3785 \index[general]{State File}
3786 In previous versions of Bacula, the state file, which provides a
3787 summary of previous jobs run in the {\bf status} command output was
3788 updated only when Bacula terminated, thus if the daemon crashed, the
3789 state file might not contain all the run data. This version of
3790 the Bacula daemons updates the state file on each job termination.
3792 \subsection{MaxFullInterval = \lt{}time-interval\gt{}}
3793 \index[general]{MaxFullInterval}
3794 The new Job resource directive {\bf Max Full Interval = \lt{}time-interval\gt{}}
3795 can be used to specify the maximum time interval between {\bf Full} backup
3796 jobs. When a job starts, if the time since the last Full backup is
3797 greater than the specified interval, and the job would normally be an
3798 {\bf Incremental} or {\bf Differential}, it will be automatically
3799 upgraded to a {\bf Full} backup.
3801 \subsection{MaxDiffInterval = \lt{}time-interval\gt{}}
3802 \index[general]{MaxDiffInterval}
3803 The new Job resource directive {\bf Max Diff Interval = \lt{}time-interval\gt{}}
3804 can be used to specify the maximum time interval between {\bf Differential} backup
3805 jobs. When a job starts, if the time since the last Differential backup is
3806 greater than the specified interval, and the job would normally be an
3807 {\bf Incremental}, it will be automatically
3808 upgraded to a {\bf Differential} backup.
3810 \subsection{Honor No Dump Flag = \lt{}yes\vb{}no\gt{}}
3811 \index[general]{MaxDiffInterval}
3812 On FreeBSD systems, each file has a {\bf no dump flag} that can be set
3813 by the user, and when it is set it is an indication to backup programs
3814 to not backup that particular file. This version of Bacula contains a
3815 new Options directive within a FileSet resource, which instructs Bacula to
3816 obey this flag. The new directive is:
3819 Honor No Dump Flag = yes\vb{}no
3822 The default value is {\bf no}.
3825 \subsection{Exclude Dir Containing = \lt{}filename-string\gt{}}
3826 \index[general]{IgnoreDir}
3827 The {\bf ExcludeDirContaining = \lt{}filename\gt{}} is a new directive that
3828 can be added to the Include section of the FileSet resource. If the specified
3829 filename ({\bf filename-string}) is found on the Client in any directory to be
3830 backed up, the whole directory will be ignored (not backed up). For example:
3833 # List of files to be backed up
3841 Exclude Dir Containing = .excludeme
3846 But in /home, there may be hundreds of directories of users and some
3847 people want to indicate that they don't want to have certain
3848 directories backed up. For example, with the above FileSet, if
3849 the user or sysadmin creates a file named {\bf .excludeme} in
3850 specific directories, such as
3853 /home/user/www/cache/.excludeme
3854 /home/user/temp/.excludeme
3857 then Bacula will not backup the two directories named:
3860 /home/user/www/cache
3864 NOTE: subdirectories will not be backed up. That is, the directive
3865 applies to the two directories in question and any children (be they
3866 files, directories, etc).
3869 \subsection{Bacula Plugins}
3870 \index[general]{Plugin}
3871 Support for shared object plugins has been implemented in the Linux, Unix
3872 and Win32 File daemons. The API will be documented separately in
3873 the Developer's Guide or in a new document. For the moment, there is
3874 a single plugin named {\bf bpipe} that allows an external program to
3875 get control to backup and restore a file.
3877 Plugins are also planned (partially implemented) in the Director and the
3880 \subsubsection{Plugin Directory}
3881 \index[general]{Plugin Directory}
3882 Each daemon (DIR, FD, SD) has a new {\bf Plugin Directory} directive that may
3883 be added to the daemon definition resource. The directory takes a quoted
3884 string argument, which is the name of the directory in which the daemon can
3885 find the Bacula plugins. If this directive is not specified, Bacula will not
3886 load any plugins. Since each plugin has a distinctive name, all the daemons
3887 can share the same plugin directory.
3889 \subsubsection{Plugin Options}
3890 \index[general]{Plugin Options}
3891 The {\bf Plugin Options} directive takes a quoted string
3892 argument (after the equal sign) and may be specified in the
3893 Job resource. The options specified will be passed to all plugins
3894 when they are run. This each plugin must know what it is looking
3895 for. The value defined in the Job resource can be modified
3896 by the user when he runs a Job via the {\bf bconsole} command line
3899 Note: this directive may be specified, and there is code to modify
3900 the string in the run command, but the plugin options are not yet passed to
3901 the plugin (i.e. not fully implemented).
3903 \subsubsection{Plugin Options ACL}
3904 \index[general]{Plugin Options ACL}
3905 The {\bf Plugin Options ACL} directive may be specified in the
3906 Director's Console resource. It functions as all the other ACL commands
3907 do by permitting users running restricted consoles to specify a
3908 {\bf Plugin Options} that overrides the one specified in the Job
3909 definition. Without this directive restricted consoles may not modify
3912 \subsubsection{Plugin = \lt{}plugin-command-string\gt{}}
3913 \index[general]{Plugin}
3914 The {\bf Plugin} directive is specified in the Include section of
3915 a FileSet resource where you put your {\bf File = xxx} directives.
3926 Plugin = "bpipe:..."
3931 In the above example, when the File daemon is processing the directives
3932 in the Include section, it will first backup all the files in {\bf /home}
3933 then it will load the plugin named {\bf bpipe} (actually bpipe-dir.so) from
3934 the Plugin Directory. The syntax and semantics of the Plugin directive
3935 require the first part of the string up to the colon (:) to be the name
3936 of the plugin. Everything after the first colon is ignored by the File daemon but
3937 is passed to the plugin. Thus the plugin writer may define the meaning of the
3938 rest of the string as he wishes.
3940 Please see the next section for information about the {\bf bpipe} Bacula
3943 \subsection{The bpipe Plugin}
3944 \index[general]{The bpipe Plugin}
3945 The {\bf bpipe} plugin is provided in the directory src/plugins/fd/bpipe-fd.c of
3946 the Bacula source distribution. When the plugin is compiled and linking into
3947 the resulting dynamic shared object (DSO), it will have the name {\bf bpipe-fd.so}.
3948 Please note that this is a very simple plugin that was written for
3949 demonstration and test purposes. It is and can be used in production, but
3950 that was never really intended.
3952 The purpose of the plugin is to provide an interface to any system program for
3953 backup and restore. As specified above the {\bf bpipe} plugin is specified in
3954 the Include section of your Job's FileSet resource. The full syntax of the
3955 plugin directive as interpreted by the {\bf bpipe} plugin (each plugin is free
3956 to specify the sytax as it wishes) is:
3959 Plugin = "<field1>:<field2>:<field3>:<field4>"
3964 \item {\bf field1} is the name of the plugin with the trailing {\bf -fd.so}
3965 stripped off, so in this case, we would put {\bf bpipe} in this field.
3967 \item {\bf field2} specifies the namespace, which for {\bf bpipe} is the
3968 pseudo path and filename under which the backup will be saved. This pseudo
3969 path and filename will be seen by the user in the restore file tree.
3970 For example, if the value is {\bf /MYSQL/regress.sql}, the data
3971 backed up by the plugin will be put under that "pseudo" path and filename.
3972 You must be careful to choose a naming convention that is unique to avoid
3973 a conflict with a path and filename that actually exists on your system.
3975 \item {\bf field3} for the {\bf bpipe} plugin
3976 specifies the "reader" program that is called by the plugin during
3977 backup to read the data. {\bf bpipe} will call this program by doing a
3980 \item {\bf field4} for the {\bf bpipe} plugin
3981 specifies the "writer" program that is called by the plugin during
3982 restore to write the data back to the filesystem.
3985 Please note that for two items above describing the "reader" and "writer"
3986 fields, these programs are "executed" by Bacula, which
3987 means there is no shell interpretation of any command line arguments
3988 you might use. If you want to use shell characters (redirection of input
3989 or output, ...), then we recommend that you put your command or commands
3990 in a shell script and execute the script. In addition if you backup a
3991 file with the reader program, when running the writer program during
3992 the restore, Bacula will not automatically create the path to the file.
3993 Either the path must exist, or you must explicitly do so with your command
3994 or in a shell script.
3996 Putting it all together, the full plugin directive line might look
4000 Plugin = "bpipe:/MYSQL/regress.sql:mysqldump -f
4001 --opt --databases bacula:mysql"
4004 The directive has been split into two lines, but within the {\bf bacula-dir.conf} file
4005 would be written on a single line.
4007 This causes the File daemon to call the {\bf bpipe} plugin, which will write
4008 its data into the "pseudo" file {\bf /MYSQL/regress.sql} by calling the
4009 program {\bf mysqldump -f --opt --database bacula} to read the data during
4010 backup. The mysqldump command outputs all the data for the database named
4011 {\bf bacula}, which will be read by the plugin and stored in the backup.
4012 During restore, the data that was backed up will be sent to the program
4013 specified in the last field, which in this case is {\bf mysql}. When
4014 {\bf mysql} is called, it will read the data sent to it by the plugn
4015 then write it back to the same database from which it came ({\bf bacula}
4018 The {\bf bpipe} plugin is a generic pipe program, that simply transmits
4019 the data from a specified program to Bacula for backup, and then from Bacula to
4020 a specified program for restore.
4022 By using different command lines to {\bf bpipe},
4023 you can backup any kind of data (ASCII or binary) depending
4024 on the program called.
4026 \subsection{Microsoft Exchange Server 2003/2007 Plugin}
4027 \index[general]{Microsoft Exchange Server 2003/2007 Plugin}
4028 \subsubsection{Background}
4029 The Exchange plugin was made possible by a funded development project
4030 between Equiinet Ltd -- www.equiinet.com (many thanks) and Bacula Systems.
4031 The code for the plugin was written by James Harper, and the Bacula core
4032 code by Kern Sibbald. All the code for this funded development has become
4033 part of the Bacula project. Thanks to everyone who made it happen.
4035 \subsubsection{Concepts}
4036 Although it is possible to backup Exchange using Bacula VSS the Exchange
4037 plugin adds a good deal of functionality, because while Bacula VSS
4038 completes a full backup (snapshot) of Exchange, it does
4039 not support Incremental or Differential backups, restoring is more
4040 complicated, and a single database restore is not possible.
4042 Microsoft Exchange organises its storage into Storage Groups with
4043 Databases inside them. A default installation of Exchange will have a
4044 single Storage Group called 'First Storage Group', with two Databases
4045 inside it, "Mailbox Store (SERVER NAME)" and
4046 "Public Folder Store (SERVER NAME)",
4047 which hold user email and public folders respectively.
4049 In the default configuration, Exchange logs everything that happens to
4050 log files, such that if you have a backup, and all the log files since,
4051 you can restore to the present time. Each Storage Group has its own set
4052 of log files and operates independently of any other Storage Groups. At
4053 the Storage Group level, the logging can be turned off by enabling a
4054 function called "Enable circular logging". At this time the Exchange
4055 plugin will not function if this option is enabled.
4057 The plugin allows backing up of entire storage groups, and the restoring
4058 of entire storage groups or individual databases. Backing up and
4059 restoring at the individual mailbox or email item is not supported but
4060 can be simulated by use of the "Recovery" Storage Group (see below).
4062 \subsubsection{Installing}
4063 The Exchange plugin requires a DLL that is shipped with Microsoft
4064 Exchanger Server called {\bf esebcli2.dll}. Assuming Exchange is installed
4065 correctly the Exchange plugin should find this automatically and run
4066 without any additional installation.
4068 If the DLL can not be found automatically it will need to be copied into
4069 the Bacula installation
4070 directory (eg C:\verb+\+Program Files\verb+\+Bacula\verb+\+bin). The Exchange API DLL is
4071 named esebcli2.dll and is found in C:\verb+\+Program Files\verb+\+Exchsrvr\verb+\+bin on a
4072 default Exchange installation.
4074 \subsubsection{Backing Up}
4075 To back up an Exchange server the Fileset definition must contain at
4076 least {\bf Plugin = "exchange:/@EXCHANGE/Microsoft Information Store"} for
4077 the backup to work correctly. The 'exchange:' bit tells Bacula to look
4078 for the exchange plugin, the '@EXCHANGE' bit makes sure all the backed
4079 up files are prefixed with something that isn't going to share a name
4080 with something outside the plugin, and the 'Microsoft Information Store'
4081 bit is required also. It is also possible to add the name of a storage
4082 group to the "Plugin =" line, eg \\
4083 {\bf Plugin = "exchange:/@EXCHANGE/Microsoft Information Store/First Storage Group"} \\
4084 if you want only a single storage group backed up.
4086 Additionally, you can suffix the 'Plugin =' directive with
4087 ":notrunconfull" which will tell the plugin not to truncate the Exchange
4088 database at the end of a full backup.
4090 An Incremental or Differential backup will backup only the database logs
4091 for each Storage Group by inspecting the "modified date" on each
4092 physical log file. Because of the way the Exchange API works, the last
4093 logfile backed up on each backup will always be backed up by the next
4094 Incremental or Differential backup too. This adds 5MB to each
4095 Incremental or Differential backup size but otherwise does not cause any
4098 By default, a normal VSS fileset containing all the drive letters will
4099 also back up the Exchange databases using VSS. This will interfere with
4100 the plugin and Exchange's shared ideas of when the last full backup was
4101 done, and may also truncate log files incorrectly. It is important,
4102 therefore, that the Exchange database files be excluded from the backup,
4103 although the folders the files are in should be included, or they will
4104 have to be recreated manually if a bare metal restore is done.
4109 File = C:/Program Files/Exchsrvr/mdbdata
4110 Plugin = "exchange:..."
4113 File = C:/Program Files/Exchsrvr/mdbdata/E00.chk
4114 File = C:/Program Files/Exchsrvr/mdbdata/E00.log
4115 File = C:/Program Files/Exchsrvr/mdbdata/E000000F.log
4116 File = C:/Program Files/Exchsrvr/mdbdata/E0000010.log
4117 File = C:/Program Files/Exchsrvr/mdbdata/E0000011.log
4118 File = C:/Program Files/Exchsrvr/mdbdata/E00tmp.log
4119 File = C:/Program Files/Exchsrvr/mdbdata/priv1.edb
4124 The advantage of excluding the above files is that you can significantly
4125 reduce the size of your backup since all the important Exchange files
4126 will be properly saved by the Plugin.
4129 \subsubsection{Restoring}
4130 The restore operation is much the same as a normal Bacula restore, with
4131 the following provisos:
4134 \item The {\bf Where} restore option must not be specified
4135 \item Each Database directory must be marked as a whole. You cannot just
4136 select (say) the .edb file and not the others.
4137 \item If a Storage Group is restored, the directory of the Storage Group
4139 \item It is possible to restore only a subset of the available log files,
4140 but they {\bf must} be contiguous. Exchange will fail to restore correctly
4141 if a log file is missing from the sequence of log files
4142 \item Each database to be restored must be dismounted and marked as "Can be
4143 overwritten by restore"
4144 \item If an entire Storage Group is to be restored (eg all databases and
4145 logs in the Storage Group), then it is best to manually delete the
4146 database files from the server (eg C:\verb+\+Program Files\verb+\+Exchsrvr\verb+\+mdbdata\verb+\+*)
4147 as Exchange can get confused by stray log files lying around.
4150 \subsubsection{Restoring to the Recovery Storage Group}
4151 The concept of the Recovery Storage Group is well documented by
4153 \elink{http://support.microsoft.com/kb/824126}{http://support.microsoft.com/kb/824126},
4154 but to briefly summarize...
4156 Microsoft Exchange allows the creation of an additional Storage Group
4157 called the Recovery Storage Group, which is used to restore an older
4158 copy of a database (e.g. before a mailbox was deleted) into without
4159 messing with the current live data. This is required as the Standard and
4160 Small Business Server versions of Exchange can not ordinarily have more
4161 than one Storage Group.
4163 To create the Recovery Storage Group, drill down to the Server in Exchange
4164 System Manager, right click, and select
4165 {\bf "New -> Recovery Storage Group..."}. Accept or change the file
4166 locations and click OK. On the Recovery Storage Group, right click and
4167 select {\bf "Add Database to Recover..."} and select the database you will
4170 Restore only the single database nominated as the database in the
4171 Recovery Storage Group. Exchange will redirect the restore to the
4172 Recovery Storage Group automatically.
4173 Then run the restore.
4175 \subsubsection{Restoring on Microsoft Server 2007}
4176 Apparently the {\bf Exmerge} program no longer exists in Microsoft Server
4177 2007, and hence you use a new procedure for recovering a single mail box.
4178 This procedure is documented by Microsoft at:
4179 \elink{http://technet.microsoft.com/en-us/library/aa997694.aspx}{http://technet.microsoft.com/en-us/library/aa997694.aspx},
4180 and involves using the {\bf Restore-Mailbox} and {\bf
4181 Get-Mailbox Statistics} shell commands.
4183 \subsubsection{Caveats}
4184 This plugin is still being developed, so you should consider it
4185 currently in BETA test, and thus use in a production environment
4186 should be done only after very careful testing.
4188 When doing a full backup, the Exchange database logs are truncated by
4189 Exchange as soon as the plugin has completed the backup. If the data
4190 never makes it to the backup medium (eg because of spooling) then the
4191 logs will still be truncated, but they will also not have been backed
4192 up. A solution to this is being worked on. You will have to schedule a
4193 new Full backup to ensure that your next backups will be usable.
4195 The "Enable Circular Logging" option cannot be enabled or the plugin
4198 Exchange insists that a successful Full backup must have taken place if
4199 an Incremental or Differential backup is desired, and the plugin will
4200 fail if this is not the case. If a restore is done, Exchange will
4201 require that a Full backup be done before an Incremental or Differential
4204 The plugin will most likely not work well if another backup application
4205 (eg NTBACKUP) is backing up the Exchange database, especially if the
4206 other backup application is truncating the log files.
4208 The Exchange plugin has not been tested with the {\bf Accurate} option, so
4209 we recommend either carefully testing or that you avoid this option for
4212 The Exchange plugin is not called during processing the bconsole {\bf
4213 estimate} command, and so anything that would be backed up by the plugin
4214 will not be added to the estimate total that is displayed.
4217 \subsection{libdbi Framework}
4218 \index[general]{libdbi Framework}
4219 As a general guideline, Bacula has support for a few catalog database drivers
4220 (MySQL, PostgreSQL, SQLite)
4221 coded natively by the Bacula team. With the libdbi implementation, which is a
4222 Bacula driver that uses libdbi to access the catalog, we have an open field to
4223 use many different kinds database engines following the needs of users.
4225 The according to libdbi (http://libdbi.sourceforge.net/) project: libdbi
4226 implements a database-independent abstraction layer in C, similar to the
4227 DBI/DBD layer in Perl. Writing one generic set of code, programmers can
4228 leverage the power of multiple databases and multiple simultaneous database
4229 connections by using this framework.
4231 Currently the libdbi driver in Bacula project only supports the same drivers
4232 natively coded in Bacula. However the libdbi project has support for many
4233 others database engines. You can view the list at
4234 http://libdbi-drivers.sourceforge.net/. In the future all those drivers can be
4235 supported by Bacula, however, they must be tested properly by the Bacula team.
4237 Some of benefits of using libdbi are:
4239 \item The possibility to use proprietary databases engines in which your
4240 proprietary licenses prevent the Bacula team from developing the driver.
4241 \item The possibility to use the drivers written for the libdbi project.
4242 \item The possibility to use other database engines without recompiling Bacula
4243 to use them. Just change one line in bacula-dir.conf
4244 \item Abstract Database access, this is, unique point to code and profiling
4245 catalog database access.
4248 The following drivers have been tested:
4250 \item PostgreSQL, with and without batch insert
4251 \item Mysql, with and without batch insert
4256 In the future, we will test and approve to use others databases engines
4257 (proprietary or not) like DB2, Oracle, Microsoft SQL.
4259 To compile Bacula to support libdbi we need to configure the code with the
4260 --with-dbi and --with-dbi-driver=[database] ./configure options, where
4261 [database] is the database engine to be used with Bacula (of course we can
4262 change the driver in file bacula-dir.conf, see below). We must configure the
4263 access port of the database engine with the option --with-db-port, because the
4264 libdbi framework doesn't know the default access port of each database.
4266 The next phase is checking (or configuring) the bacula-dir.conf, example:
4270 dbdriver = dbi:mysql; dbaddress = 127.0.0.1; dbport = 3306
4271 dbname = regress; user = regress; password = ""
4275 The parameter {\bf dbdriver} indicates that we will use the driver dbi with a
4276 mysql database. Currently the drivers supported by Bacula are: postgresql,
4277 mysql, sqlite, sqlite3; these are the names that may be added to string "dbi:".
4279 The following limitations apply when Bacula is set to use the libdbi framework:
4280 - Not tested on the Win32 platform
4281 - A little performance is lost if comparing with native database driver.
4282 The reason is bound with the database driver provided by libdbi and the
4283 simple fact that one more layer of code was added.
4285 It is important to remember, when compiling Bacula with libdbi, the
4286 following packages are needed:
4288 \item libdbi version 1.0.0, http://libdbi.sourceforge.net/
4289 \item libdbi-drivers 1.0.0, http://libdbi-drivers.sourceforge.net/
4292 You can download them and compile them on your system or install the packages
4293 from your OS distribution.
4295 \subsection{Console Command Additions and Enhancements}
4296 \index[general]{Console Additions}
4298 \subsubsection{Display Autochanger Content}
4299 \index[general]{StatusSlots}
4301 The {\bf status slots storage=\lt{}storage-name\gt{}} command displays
4302 autochanger content.
4306 Slot | Volume Name | Status | Media Type | Pool |
4307 ------+---------------+----------+-------------------+------------|
4308 1 | 00001 | Append | DiskChangerMedia | Default |
4309 2 | 00002 | Append | DiskChangerMedia | Default |
4310 3*| 00003 | Append | DiskChangerMedia | Scratch |
4315 If you an asterisk ({\bf *}) appears after the slot number, you must run an
4316 {\bf update slots} command to synchronize autochanger content with your
4319 \subsubsection{list joblog job=xxx or jobid=nnn}
4320 \index[general]{list joblog}
4321 A new list command has been added that allows you to list the contents
4322 of the Job Log stored in the catalog for either a Job Name (fully qualified)
4323 or for a particular JobId. The {\bf llist} command will include a line with
4324 the time and date of the entry.
4326 Note for the catalog to have Job Log entries, you must have a directive
4333 In your Director's {\bf Messages} resource.
4335 \subsubsection{Use separator for multiple commands}
4336 \index[general]{Command Separator}
4337 When using bconsole with readline, you can set the command separator with
4338 \textbf{@separator} command to one
4339 of those characters to write commands who require multiple input in one line.
4341 !$%&'()*+,-/:;<>?[]^`{|}~
4344 \subsubsection{Deleting Volumes}
4345 The delete volume bconsole command has been modified to
4346 require an asterisk (*) in front of a MediaId otherwise the
4347 value you enter is a taken to be a Volume name. This is so that
4348 users may delete numeric Volume names. The previous Bacula versions
4349 assumed that all input that started with a number was a MediaId.
4351 This new behavior is indicated in the prompt if you read it
4354 \subsection{Bare Metal Recovery}
4355 The old bare metal recovery project is essentially dead. One
4356 of the main features of it was that it would build a recovery
4357 CD based on the kernel on your system. The problem was that
4358 every distribution has a different boot procedure and different
4359 scripts, and worse yet, the boot procedures and scripts change
4360 from one distribution to another. This meant that maintaining
4361 (keeping up with the changes) the rescue CD was too much work.
4363 To replace it, a new bare metal recovery USB boot stick has been developed
4364 by Bacula Systems. This technology involves remastering a Ubuntu LiveCD to
4365 boot from a USB key.
4369 \item Recovery can be done from within graphical environment.
4370 \item Recovery can be done in a shell.
4371 \item Ubuntu boots on a large number of Linux systems.
4372 \item The process of updating the system and adding new
4373 packages is not too difficult.
4374 \item The USB key can easily be upgraded to newer Ubuntu versions.
4375 \item The USB key has writable partitions for modifications to
4376 the OS and for modification to your home directory.
4377 \item You can add new files/directories to the USB key very easily.
4378 \item You can save the environment from multiple machines on
4380 \item Bacula Systems is funding its ongoing development.
4383 The disadvantages are:
4385 \item The USB key is usable but currently under development.
4386 \item Not everyone may be familiar with Ubuntu (no worse
4388 \item Some older OSes cannot be booted from USB. This can
4389 be resolved by first booting a Ubuntu LiveCD then plugging
4391 \item Currently the documentation is sketchy and not yet added
4392 to the main manual. See below ...
4395 The documentation and the code can be found in the {\bf rescue} package
4396 in the directory {\bf linux/usb}.
4398 \subsection{Miscellaneous}
4399 \index[general]{Misc New Features}
4401 \subsubsection{Allow Mixed Priority = \lt{}yes\vb{}no\gt{}}
4402 \index[general]{Allow Mixed Priority}
4403 This directive is only implemented in version 2.5 and later. When
4404 set to {\bf yes} (default {\bf no}), this job may run even if lower
4405 priority jobs are already running. This means a high priority job
4406 will not have to wait for other jobs to finish before starting.
4407 The scheduler will only mix priorities when all running jobs have
4410 Note that only higher priority jobs will start early. Suppose the
4411 director will allow two concurrent jobs, and that two jobs with
4412 priority 10 are running, with two more in the queue. If a job with
4413 priority 5 is added to the queue, it will be run as soon as one of
4414 the running jobs finishes. However, new priority 10 jobs will not
4415 be run until the priority 5 job has finished.
4417 \subsubsection{Bootstrap File Directive -- FileRegex}
4418 \index[general]{Bootstrap File Directive}
4419 {\bf FileRegex} is a new command that can be added to the bootstrap
4420 (.bsr) file. The value is a regular expression. When specified, only
4421 matching filenames will be restored.
4423 During a restore, if all File records are pruned from the catalog
4424 for a Job, normally Bacula can restore only all files saved. That
4425 is there is no way using the catalog to select individual files.
4426 With this new feature, Bacula will ask if you want to specify a Regex
4427 expression for extracting only a part of the full backup.
4430 Building directory tree for JobId(s) 1,3 ...
4431 There were no files inserted into the tree, so file selection
4432 is not possible.Most likely your retention policy pruned the files
4434 Do you want to restore all the files? (yes\vb{}no): no
4436 Regexp matching files to restore? (empty to abort): /tmp/regress/(bin|tests)/
4437 Bootstrap records written to /tmp/regress/working/zog4-dir.restore.1.bsr
4440 \subsubsection{Bootstrap File Optimization Changes}
4441 In order to permit proper seeking on disk files, we have extended the bootstrap
4442 file format to include a {\bf VolStartAddr} and {\bf VolEndAddr} records. Each
4443 takes a 64 bit unsigned integer range (i.e. nnn-mmm) which defines the start
4444 address range and end address range respectively. These two directives replace
4445 the {\bf VolStartFile}, {\bf VolEndFile}, {\bf VolStartBlock} and {\bf
4446 VolEndBlock} directives. Bootstrap files containing the old directives will
4447 still work, but will not properly take advantage of proper disk seeking, and
4448 may read completely to the end of a disk volume during a restore. With the new
4449 format (automatically generated by the new Director), restores will seek
4450 properly and stop reading the volume when all the files have been restored.
4452 \subsubsection{Solaris ZFS/NFSv4 ACLs}
4453 This is an upgrade of the previous Solaris ACL backup code
4454 to the new library format, which will backup both the old
4455 POSIX(UFS) ACLs as well as the ZFS ACLs.
4457 The new code can also restore POSIX(UFS) ACLs to a ZFS filesystem
4458 (it will translate the POSIX(UFS)) ACL into a ZFS/NFSv4 one) it can also
4459 be used to transfer from UFS to ZFS filesystems.
4462 \subsubsection{Virtual Tape Emulation}
4463 \index[general]{Virtual Tape Emulation}
4464 We now have a Virtual Tape emulator that allows us to run though 99.9\% of
4465 the tape code but actually reading and writing to a disk file. Used with the
4466 \textbf{disk-changer} script, you can now emulate an autochanger with 10 drives
4467 and 700 slots. This feature is most useful in testing. It is enabled
4468 by using {\bf Device Type = vtape} in the Storage daemon's Device
4469 directive. This feature is only implemented on Linux machines and should not be
4470 used for production.
4472 \subsubsection{Bat Enhancements}
4473 \index[general]{Bat Enhancements}
4474 Bat (the Bacula Administration Tool) GUI program has been significantly
4475 enhanced and stabilized. In particular, there are new table based status
4476 commands; it can now be easily localized using Qt4 Linguist.
4478 The Bat communications protocol has been significantly enhanced to improve
4479 GUI handling. Note, you {\bf must} use a the bat that is distributed with
4480 the Director you are using otherwise the communications protocol will not
4483 \subsubsection{RunScript Enhancements}
4484 \index[general]{RunScript Enhancements}
4485 The {\bf RunScript} resource has been enhanced to permit multiple
4486 commands per RunScript. Simply specify multiple {\bf Command} directives
4493 Command = "/bin/echo test"
4494 Command = "/bin/echo an other test"
4495 Command = "/bin/echo 3 commands in the same runscript"
4502 A new Client RunScript {\bf RunsWhen} keyword of {\bf AfterVSS} has been
4503 implemented, which runs the command after the Volume Shadow Copy has been made.
4505 Console commands can be specified within a RunScript by using:
4506 {\bf Console = \lt{}command\gt{}}, however, this command has not been
4507 carefully tested and debugged and is known to easily crash the Director.
4508 We would appreciate feedback. Due to the recursive nature of this command, we
4509 may remove it before the final release.
4511 \subsubsection{Status Enhancements}
4512 \index[general]{Status Enhancements}
4513 The bconsole {\bf status dir} output has been enhanced to indicate
4514 Storage daemon job spooling and despooling activity.
4516 \subsubsection{Connect Timeout}
4517 \index[general]{Connect Timeout}
4518 The default connect timeout to the File
4519 daemon has been set to 3 minutes. Previously it was 30 minutes.
4521 \subsubsection{ftruncate for NFS Volumes}
4522 \index[general]{ftruncate for NFS Volumes}
4523 If you write to a Volume mounted by NFS (say on a local file server),
4524 in previous Bacula versions, when the Volume was recycled, it was not
4525 properly truncated because NFS does not implement ftruncate (file
4526 truncate). This is now corrected in the new version because we have
4527 written code (actually a kind user) that deletes and recreates the Volume,
4528 thus accomplishing the same thing as a truncate.
4530 \subsubsection{Support for Ubuntu}
4531 The new version of Bacula now recognizes the Ubuntu (and Kubuntu)
4532 version of Linux, and thus now provides correct autostart routines.
4533 Since Ubuntu officially supports Bacula, you can also obtain any
4534 recent release of Bacula from the Ubuntu repositories.
4536 \subsubsection{Recycle Pool = \lt{}pool-name\gt{}}
4537 \index[general]{Recycle Pool}
4538 The new \textbf{RecyclePool} directive defines to which pool the Volume will
4539 be placed (moved) when it is recycled. Without this directive, a Volume will
4540 remain in the same pool when it is recycled. With this directive, it can be
4541 moved automatically to any existing pool during a recycle. This directive is
4542 probably most useful when defined in the Scratch pool, so that volumes will
4543 be recycled back into the Scratch pool.
4545 \subsubsection{FD Version}
4546 \index[general]{FD Version}
4547 The File daemon to Director protocol now includes a version
4548 number, which although there is no visible change for users,
4549 will help us in future versions automatically determine
4550 if a File daemon is not compatible.
4552 \subsubsection{Max Run Sched Time = \lt{}time-period-in-seconds\gt{}}
4553 \index[general]{Max Run Sched Time}
4554 The time specifies the maximum allowed time that a job may run, counted from
4555 when the job was scheduled. This can be useful to prevent jobs from running
4556 during working hours. We can see it like \texttt{Max Start Delay + Max Run
4559 \subsubsection{Max Wait Time = \lt{}time-period-in-seconds\gt{}}
4560 \index[general]{Max Wait Time}
4561 Previous \textbf{MaxWaitTime} directives aren't working as expected, instead
4562 of checking the maximum allowed time that a job may block for a resource,
4563 those directives worked like \textbf{MaxRunTime}. Some users are reporting to
4564 use \textbf{Incr/Diff/Full Max Wait Time} to control the maximum run time of
4565 their job depending on the level. Now, they have to use
4566 \textbf{Incr/Diff/Full Max Run Time}. \textbf{Incr/Diff/Full Max Wait Time}
4567 directives are now deprecated.
4569 \subsubsection{Incremental|Differential Max Wait Time = \lt{}time-period-in-seconds\gt{}}
4570 \index[general]{Incremental Max Wait Time}
4571 \index[general]{Differential Max Wait Time}
4573 These directives have been deprecated in favor of
4574 \texttt{Incremental|Differential Max Run Time}.
4576 \subsubsection{Max Run Time directives}
4577 \index[general]{Max Run Time directives}
4578 Using \textbf{Full/Diff/Incr Max Run Time}, it's now possible to specify the
4579 maximum allowed time that a job can run depending on the level.
4581 \addcontentsline{lof}{figure}{Job time control directives}
4583 \includegraphics[width=\linewidth]{different_time}
4586 \subsubsection{Statistics Enhancements}
4587 \index[general]{Statistics Enhancements}
4588 If you (or probably your boss) want to have statistics on your backups to
4589 provide some \textit{Service Level Agreement} indicators, you could use a few
4590 SQL queries on the Job table to report how many:
4594 \item jobs have been successful
4595 \item files have been backed up
4599 However, these statistics are accurate only if your job retention is greater
4600 than your statistics period. Ie, if jobs are purged from the catalog, you won't
4601 be able to use them.
4603 Now, you can use the \textbf{update stats [days=num]} console command to fill
4604 the JobHistory table with new Job records. If you want to be sure to take in
4605 account only \textbf{good jobs}, ie if one of your important job has failed but
4606 you have fixed the problem and restarted it on time, you probably want to
4607 delete the first \textit{bad} job record and keep only the successful one. For
4608 that simply let your staff do the job, and update JobHistory table after two or
4609 three days depending on your organization using the \textbf{[days=num]} option.
4611 These statistics records aren't used for restoring, but mainly for
4612 capacity planning, billings, etc.
4614 The Bweb interface provides a statistics module that can use this feature. You
4615 can also use tools like Talend or extract information by yourself.
4617 The \textbf{Statistics Retention = \lt{}time\gt{}} director directive defines
4618 the length of time that Bacula will keep statistics job records in the Catalog
4619 database after the Job End time. (In \texttt{JobHistory} table) When this time
4620 period expires, and if user runs \texttt{prune stats} command, Bacula will
4621 prune (remove) Job records that are older than the specified period.
4623 You can use the following Job resource in your nightly \textbf{BackupCatalog}
4624 job to maintain statistics.
4627 Name = BackupCatalog
4630 Console = "update stats days=3"
4631 Console = "prune stats yes"
4638 \subsubsection{ScratchPool = \lt{}pool-resource-name\gt{}}
4639 \index[general]{ScratchPool}
4640 This directive permits to specify a specific \textsl{Scratch} pool for the
4641 current pool. This is useful when using multiple storage sharing the same
4642 mediatype or when you want to dedicate volumes to a particular set of pool.
4644 \subsubsection{Enhanced Attribute Despooling}
4645 \index[general]{Attribute Despooling}
4646 If the storage daemon and the Director are on the same machine, the spool file
4647 that contains attributes is read directly by the Director instead of being
4648 transmitted across the network. That should reduce load and speedup insertion.
4650 \subsubsection{SpoolSize = \lt{}size-specification-in-bytes\gt{}}
4651 \index[general]{SpoolSize}
4652 A new Job directive permits to specify the spool size per job. This is used
4653 in advanced job tunning. {\bf SpoolSize={\it bytes}}
4655 \subsubsection{MaximumConsoleConnections = \lt{}number\gt{}}
4656 \index[general]{MaximumConsoleConnections}
4657 A new director directive permits to specify the maximum number of Console
4658 Connections that could run concurrently. The default is set to 20, but you may
4659 set it to a larger number.
4661 \subsubsection{VerId = \lt{}string\gt{}}
4662 \index[general]{VerId}
4663 A new director directive permits to specify a personnal identifier that will be
4664 displayed in the \texttt{version} command.
4666 \subsubsection{dbcheck enhancements}
4667 \index[general]{dbcheck enhancements}
4668 If you are using Mysql, dbcheck will now ask you if you want to create
4669 temporary indexes to speed up orphaned Path and Filename elimination.
4671 A new \texttt{-B} option allows you to print catalog information in a simple
4672 text based format. This is useful to backup it in a secure way.
4687 You can now specify the database connection port in the command line.
4689 \subsubsection{{-}{-}docdir configure option}
4690 \index[general]{{-}{-}docdir configure option}
4691 You can use {-}{-}docdir= on the ./configure command to
4692 specify the directory where you want Bacula to install the
4693 LICENSE, ReleaseNotes, ChangeLog, ... files. The default is
4694 {\bf /usr/share/doc/bacula}.
4696 \subsubsection{{-}{-}htmldir configure option}
4697 \index[general]{{-}{-}htmldir configure option}
4698 You can use {-}{-}htmldir= on the ./configure command to
4699 specify the directory where you want Bacula to install the bat html help
4700 files. The default is {\bf /usr/share/doc/bacula/html}
4702 \subsubsection{{-}{-}with-plugindir configure option}
4703 \index[general]{{-}{-}plugindir configure option}
4704 You can use {-}{-}plugindir= on the ./configure command to
4705 specify the directory where you want Bacula to install
4706 the plugins (currently only bpipe-fd). The default is