4 \chapter{What is Bacula Enterprise?}
6 \index[general]{Bacula!What is}
7 \index[general]{What is Bacula?}
9 \mbacula{} is a set of computer programs that permits the system
10 administrator to manage backup, recovery, and verification of computer data
11 across a network of computers of different kinds. \mbacula{} can also run entirely
12 upon a single computer and can backup to various types of media, including tape
15 In technical terms, it is a
16 network Client/Server based backup program. \mbacula{} is relatively easy to use
17 and efficient, while offering many advanced storage management features that
18 make it easy to find and recover lost or damaged files. Due to its modular
19 design, \mbacula{} is scalable from small single computer systems to systems
20 consisting of hundreds of computers located over a large network.
22 \section{Who Needs Bacula?}
23 \index[general]{Who needs Bacula?}
24 \index[general]{Bacula!Who needs}
26 If you are currently using a program such as tar, dump, or
27 bru to backup your computer data, and you would like a network solution, more
28 flexibility, or catalog services, \mbacula{} will most likely provide the
29 additional features you want. However, if you are new to Unix systems or do
30 not have offsetting experience with a sophisticated backup package, the \mbacula{}
31 project does not recommend using \mbacula{} as it is much more difficult to setup and use than
34 If you want \mbacula{} to behave like the above mentioned simple
35 programs and write over any tape that you put in the drive, then you will find
36 working with \mbacula{} difficult. \mbacula{} is designed to protect your data
37 following the rules you specify, and this means reusing a tape only
38 as the last resort. It is possible to "force" \mbacula{} to write
39 over any tape in the drive, but it is easier and more efficient to use a
40 simpler program for that kind of operation.
42 If you would like a backup program that can write
43 to multiple volumes (i.e. is not limited by your tape drive capacity), \mbacula{}
44 can most likely fill your needs. In addition, quite a number of \mbacula{} users
45 report that \mbacula{} is simpler to setup and use than other equivalent programs.
47 If you are currently using a sophisticated commercial package such as Legato
48 Networker. ARCserveIT, Arkeia, or PerfectBackup+, you may be interested in
49 \mbacula{}, which provides many of the same features and is free software
50 available under the GNU Version 2 software license.
52 \section{Bacula Components or Services}
53 \index[general]{Bacula components or services}
54 \index[general]{Services!Bacula components or}
56 \mbacula{} is made up of the following five major components or services:
57 Director, Console, File, Storage, and Monitor services.
60 %\addcontentsline{lof}{figure}{Bacula Applications}
61 \bsysimageH{bacula-applications}{Bacula Applications}{figgeneral:bacula-applications}
63 (thanks to Aristedes Maniatis for this graphic and the one below)
64 % TODO: move the thanks to Credits section in preface
66 \subsection*{Bacula Director}
68 The Bacula Director service is the program that supervises
69 all the backup, restore, verify and archive operations. The system
70 administrator uses the Bacula Director to schedule backups and to
71 recover files. For more details see the Director Services Daemon Design
72 Document in the Bacula Developer's Guide. The Director runs as a daemon
73 (or service) in the background.
74 % TODO: tell reader where this Developer's Guide is at?
77 \subsection*{Bacula Console}
79 The Bacula Console service is the program that allows the
80 administrator or user to communicate with the Bacula Director
81 Currently, the Bacula Console is available in three versions:
82 text-based console interface, QT-based interface, and a
83 wxWidgets graphical interface.
84 The first and simplest is to run the Console program in a shell window
85 (i.e. TTY interface). Most system administrators will find this
86 completely adequate. The second version is a GNOME GUI interface that
87 is far from complete, but quite functional as it has most the
88 capabilities of the shell Console. The third version is a wxWidgets GUI
89 with an interactive file restore. It also has most of the capabilities
90 of the shell console, allows command completion with tabulation, and
91 gives you instant help about the command you are typing. For more
92 details see the \bsysxrlinkdocument{Bacula Console Design Document}{_ConsoleChapter}{console}{Chapter}.
94 \subsection*{Bacula File}
96 The Bacula File service (also known as the Client program) is the software
97 program that is installed on the machine to be backed up.
99 operating system on which it runs and is responsible for providing the
100 file attributes and data when requested by the Director. The File
101 services are also responsible for the file system dependent part of
102 restoring the file attributes and data during a recovery operation. For
103 more details see the File Services Daemon Design Document in the Bacula
104 Developer's Guide. This program runs as a daemon on the machine to be
106 In addition to Unix/Linux File daemons, there is a Windows File daemon
107 (normally distributed in binary format). The Windows File daemon runs
108 on current Windows versions (NT, 2000, XP, 2003, and possibly Me and
110 % TODO: maybe do not list Windows here as that is listed elsewhere
111 % TODO: remove "possibly"?
112 % TODO: mention Vista?
114 \subsection*{Bacula Storage}
116 The Bacula Storage services consist of the software programs that
117 perform the storage and recovery of the file attributes and data to the
118 physical backup media or volumes. In other words, the Storage daemon is
119 responsible for reading and writing your tapes (or other storage media,
120 e.g. files). For more details see the Storage Services Daemon Design
121 Document in the Bacula Developer's Guide. The Storage services runs as
122 a daemon on the machine that has the backup device (usually a tape
124 % TODO: may switch e.g. to "for example" or "such as" as appropriate
125 % TODO: is "usually" correct? Maybe "such as" instead?
127 \subsection*{Catalog}
129 The Catalog services are comprised of the software programs
130 responsible for maintaining the file indexes and volume databases for
131 all files backed up. The Catalog services permit the system
132 administrator or user to quickly locate and restore any desired file.
133 The Catalog services sets Bacula apart from simple backup programs like
134 tar and bru, because the catalog maintains a record of all Volumes used,
135 all Jobs run, and all Files saved, permitting efficient restoration and
136 Volume management. Bacula currently supports three different databases,
137 MySQL, PostgreSQL, and SQLite, one of which must be chosen when building
140 The three SQL databases currently supported (MySQL, PostgreSQL or
141 SQLite) provide quite a number of features, including rapid indexing,
142 arbitrary queries, and security. Although the Bacula project plans to support other
143 major SQL databases, the current Bacula implementation interfaces only
144 to MySQL, PostgreSQL and SQLite. For the technical and porting details
145 see the Catalog Services Design Document in the developer's documented.
147 The packages for MySQL and PostgreSQL are available for several operating
149 Alternatively, installing from the
150 source is quite easy, see the \ilink{Installing and Configuring
151 MySQL}{MySqlChapter} chapter of this document for the details. For
152 more information on MySQL, please see:
153 \elink{www.mysql.com}{http://www.mysql.com}. Or see the \ilink{Installing
154 and Configuring PostgreSQL}{PostgreSqlChapter} chapter of this
155 document for the details. For more information on PostgreSQL, please
156 see: \elink{www.postgresql.org}{http://www.postgresql.org}.
158 Configuring and building SQLite is even easier. For the details of
159 configuring SQLite, please see the \ilink{ Installing and Configuring
160 SQLite}{SqlLiteChapter} chapter of this document.
162 \subsection*{Bacula Monitor}
164 A Bacula Monitor service is the program that allows the
165 administrator or user to watch current status of Bacula Directors,
166 Bacula File Daemons and Bacula Storage Daemons.
167 Currently, only a GTK+ version is available, which works with GNOME,
168 KDE, or any window manager that supports the FreeDesktop.org system tray
171 To perform a successful save or restore, the following four daemons must be
172 configured and running: the Director daemon, the File daemon, the Storage
173 daemon, and the Catalog service (MySQL, PostgreSQL or SQLite).
175 \section{Bacula Configuration}
176 \index[general]{Configuration!Bacula}
177 \index[general]{Bacula configuration}
179 In order for Bacula to understand your system, what clients you want backed
180 up and how, you must create a number of configuration files containing
181 resources (or objects). The following presents an overall picture of this:
183 %\addcontentsline{lof}{figure}{Bacula Objects}
184 \bsysimageH{bacula-objects}{Bacula Objects}{figgeneral:baculaojects}
185 %\includegraphics{\idir bacula-objects}
187 \section{Conventions Used in this Document}
188 \index[general]{Conventions used in this document}
189 \index[general]{Document!Conventions used in this}
191 Bacula is in a state of evolution, and as a consequence, this manual
192 will not always agree with the code. If an item in this manual is preceded by
193 an asterisk (*), it indicates that the particular feature is not implemented.
194 If it is preceded by a plus sign (+), it indicates that the feature may be
195 partially implemented.
196 % TODO: search for plus sign and asterisk and "IMPLEMENTED" and fix for printed book
198 If you are reading this manual as supplied in a released version of the
199 software, the above paragraph holds true. If you are reading the online
200 version of the manual,
201 \elink{ www.bacula.org}{http://www.bacula.org}, please bear in
202 mind that this version describes the current version in development (in the
203 CVS) that may contain features not in the released version. Just the same, it
204 generally lags behind the code a bit.
205 % TODO: is this still true? there are separate websites
207 \section{Quick Start}
208 \index[general]{Quick Start}
209 \index[general]{Start!Quick}
211 To get Bacula up and running quickly, the author recommends
212 that you first scan the
213 Terminology section below, then quickly review the next chapter entitled
214 \ilink{The Current State of Bacula}{StateChapter}, then the
215 \ilink{Getting Started with Bacula}{QuickStartChapter}, which will
216 give you a quick overview of getting Bacula running. After which, you should
217 proceed to the chapter on
218 \ilink{Installing Bacula}{InstallChapter}, then
219 \ilink{How to Configure Bacula}{ConfigureChapter}, and finally the
221 \ilink{ Running Bacula}{TutorialChapter}.
223 \section{Terminology}
224 \index[general]{Terminology}
228 \item [Administrator]
229 \index[fd]{Administrator}
230 The person or persons responsible for administrating the Bacula system.
234 The term Backup refers to a Bacula Job that saves files.
236 \item [Bootstrap File]
237 \index[fd]{Bootstrap file}
238 The bootstrap file is an ASCII file containing a compact form of
239 commands that allow Bacula or the stand-alone file extraction utility
240 (bextract) to restore the contents of one or more Volumes, for
241 example, the current state of a system just backed up. With a bootstrap
242 file, Bacula can restore your system without a Catalog. You can create
243 a bootstrap file from a Catalog to extract any file or files you wish.
247 The Catalog is used to store summary information about the Jobs,
248 Clients, and Files that were backed up and on what Volume or Volumes.
249 The information saved in the Catalog permits the administrator or user
250 to determine what jobs were run, their status as well as the important
251 characteristics of each file that was backed up, and most importantly,
252 it permits you to choose what files to restore.
254 online resource, but does not contain the data for the files backed up.
255 Most of the information stored in the catalog is also stored on the
256 backup volumes (i.e. tapes). Of course, the tapes will also have a
257 copy of the file data in addition to the File Attributes (see below).
259 The catalog feature is one part of Bacula that distinguishes it from
260 simple backup and archive programs such as dump and tar.
264 In Bacula's terminology, the word Client refers to the machine being
265 backed up, and it is synonymous with the File services or File daemon,
266 and quite often, it is referred to it as the FD. A Client is defined in a
267 configuration file resource.
271 The program that interfaces to the Director allowing the user or system
272 administrator to control Bacula.
276 Unix terminology for a program that is always present in the background to
277 carry out a designated task. On Windows systems, as well as some Unix
278 systems, daemons are called Services.
281 \index[fd]{Directive}
282 The term directive is used to refer to a statement or a record within a
283 Resource in a configuration file that defines one specific setting. For
284 example, the {\bf Name} directive defines the name of the Resource.
288 The main Bacula server daemon that schedules and directs all Bacula
289 operations. Occasionally, the project refers to the Director as DIR.
292 \index[fd]{Differential}
293 A backup that includes all files changed since the last Full save started.
294 Note, other backup programs may define this differently.
296 \item [File Attributes]
297 \index[fd]{File attributes}
298 The File Attributes are all the information necessary about a file to
299 identify it and all its properties such as size, creation date, modification
300 date, permissions, etc. Normally, the attributes are handled entirely by
301 Bacula so that the user never needs to be concerned about them. The
302 attributes do not include the file's data.
305 \index[fd]{File daemon}
306 The daemon running on the client computer to be backed up. This is also
307 referred to as the File services, and sometimes as the Client services or the
314 A FileSet is a Resource contained in a configuration file that defines
315 the files to be backed up. It consists of a list of included files or
316 directories, a list of excluded files, and how the file is to be stored
317 (compression, encryption, signatures). For more details, see the
318 \ilink{FileSet Resource definition}{FileSetResource} in the Director
319 chapter of this document.
322 \index[fd]{Incremental}
323 A backup that includes all files changed since the last Full, Differential,
324 or Incremental backup started. It is normally specified on the {\bf Level}
325 directive within the Job resource definition, or in a Schedule resource.
328 \item [Job]\label{JobDef}
330 A Bacula Job is a configuration resource that defines the work that
331 Bacula must perform to backup or restore a particular Client. It
332 consists of the {\bf Type} (backup, restore, verify, etc), the {\bf
333 Level} (full, incremental,\ldots{}), the {\bf FileSet}, and {\bf Storage} the
334 files are to be backed up (Storage device, Media Pool). For more
335 details, see the \ilink{Job Resource definition}{JobResource} in the
336 Director chapter of this document.
337 % TODO: clean up "..." for book
341 The program that interfaces to all the daemons allowing the user or
342 system administrator to monitor Bacula status.
346 A resource is a part of a configuration file that defines a specific
347 unit of information that is available to Bacula. It consists of several
348 directives (individual configuration statements). For example, the {\bf
349 Job} resource defines all the properties of a specific Job: name,
350 schedule, Volume pool, backup type, backup level, \ldots{}
351 % TODO: clean up "..." for book
355 A restore is a configuration resource that describes the operation of
356 recovering a file from backup media. It is the inverse of a save,
357 except that in most cases, a restore will normally have a small set of
358 files to restore, while normally a Save backs up all the files on the
359 system. Of course, after a disk crash, Bacula can be called upon to do
360 a full Restore of all files that were on the system.
361 % TODO: Why? Why say "Of course"??
363 % TODO: define "Save"
364 % TODO: define "Full"
368 A Schedule is a configuration resource that defines when the Bacula Job
369 will be scheduled for execution. To use the Schedule, the Job resource
370 will refer to the name of the Schedule. For more details, see the
371 \ilink{Schedule Resource definition}{ScheduleResource} in the Director
372 chapter of this document.
376 This is a program that remains permanently in memory awaiting
377 instructions. In Unix environments, services are also known as
380 \item [Storage Coordinates]
381 \index[fd]{Storage coordinates}
382 The information returned from the Storage Services that uniquely locates
383 a file on a backup medium. It consists of two parts: one part pertains
384 to each file saved, and the other part pertains to the whole Job.
385 Normally, this information is saved in the Catalog so that the user
386 doesn't need specific knowledge of the Storage Coordinates. The Storage
387 Coordinates include the File Attributes (see above) plus the unique
388 location of the information on the backup Volume.
390 \item [Storage Daemon]
391 \index[fd]{Storage daemon}
392 The Storage daemon, sometimes referred to as the SD, is the code that
393 writes the attributes and data to a storage Volume (usually a tape or
398 Normally refers to the internal conversation between the File daemon and
399 the Storage daemon. The File daemon opens a {\bf session} with the
400 Storage daemon to save a FileSet or to restore it. A session has a
401 one-to-one correspondence to a Bacula Job (see above).
405 A verify is a job that compares the current file attributes to the
406 attributes that have previously been stored in the Bacula Catalog. This
407 feature can be used for detecting changes to critical system files
408 similar to what a file integrity checker like Tripwire does.
409 One of the major advantages of
410 using Bacula to do this is that on the machine you want protected such
411 as a server, you can run just the File daemon, and the Director, Storage
412 daemon, and Catalog reside on a different machine. As a consequence, if
413 your server is ever compromised, it is unlikely that your verification
414 database will be tampered with.
416 Verify can also be used to check that the most recent Job data written
417 to a Volume agrees with what is stored in the Catalog (i.e. it compares
418 the file attributes), *or it can check the Volume contents against the
419 original files on disk.
423 An Archive operation is done after a Save, and it consists of removing the
424 Volumes on which data is saved from active use. These Volumes are marked as
425 Archived, and may no longer be used to save files. All the files contained
426 on an Archived Volume are removed from the Catalog. NOT YET IMPLEMENTED.
428 \item [Retention Period]
429 \index[fd]{Retention period}
430 There are various kinds of retention periods that Bacula recognizes.
431 The most important are the {\bf File} Retention Period, {\bf Job}
432 Retention Period, and the {\bf Volume} Retention Period. Each of these
433 retention periods applies to the time that specific records will be kept
434 in the Catalog database. This should not be confused with the time that
435 the data saved to a Volume is valid.
437 The File Retention Period determines the time that File records are kept
438 in the catalog database. This period is important for two reasons: the
439 first is that as long as File records remain in the database, you
440 can "browse" the database with a console program and restore any
441 individual file. Once the File records are removed or pruned from the
442 database, the individual files of a backup job can no longer be
443 "browsed". The second reason for carefully choosing the File Retention
444 Period is because the volume of
445 the database File records use the most storage space in the
446 database. As a consequence, you must ensure that regular "pruning" of
447 the database file records is done to keep your database from growing
448 too large. (See the Console {\bf prune}
449 command for more details on this subject).
451 The Job Retention Period is the length of time that Job records will be
452 kept in the database. Note, all the File records are tied to the Job
453 that saved those files. The File records can be purged leaving the Job
454 records. In this case, information will be available about the jobs
455 that ran, but not the details of the files that were backed up.
456 Normally, when a Job record is purged, all its File records will also be
459 The Volume Retention Period is the minimum of time that a Volume will be
460 kept before it is reused. Bacula will normally never overwrite a Volume
461 that contains the only backup copy of a file. Under ideal conditions,
462 the Catalog would retain entries for all files backed up for all current
463 Volumes. Once a Volume is overwritten, the files that were backed up on
464 that Volume are automatically removed from the Catalog. However, if
465 there is a very large pool of Volumes or a Volume is never overwritten,
466 the Catalog database may become enormous. To keep the Catalog to a
467 manageable size, the backup information should be removed from the
468 Catalog after the defined File Retention Period. Bacula provides the
469 mechanisms for the catalog to be automatically pruned according to the
470 retention periods defined.
474 A Scan operation causes the contents of a Volume or a series of Volumes
475 to be scanned. These Volumes with the information on which files they
476 contain are restored to the Bacula Catalog. Once the information is
477 restored to the Catalog, the files contained on those Volumes may be
478 easily restored. This function is particularly useful if certain
479 Volumes or Jobs have exceeded their retention period and have been
480 pruned or purged from the Catalog. Scanning data from Volumes into the
481 Catalog is done by using the {\bf bscan} program. See the \bsysxrlink{bscan}
482 {bscan}{utility}{section} of the \utilityman{} for more
487 A Volume is an archive unit, normally a tape or a named disk file where
488 Bacula stores the data from one or more backup jobs. All Bacula Volumes
489 have a software label written to the Volume by Bacula so that it
490 identifies what Volume it is really reading. (Normally there should be
491 no confusion with disk files, but with tapes, it is easy to mount the
495 \section{What Bacula is Not}
496 \index[general]{What Bacula is not}
498 Bacula is a backup, restore and verification program and is not a
499 complete disaster recovery system in itself, but it can be a key part of one
500 if you plan carefully and follow the instructions included in the
501 \ilink{ Disaster Recovery}{RescueChapter} Chapter of this manual.
503 With proper planning, as mentioned in the Disaster Recovery chapter,
504 Bacula can be a central component of your disaster recovery system. For
505 example, if you have created an emergency boot disk, and/or a Bacula Rescue disk to
506 save the current partitioning information of your hard disk, and maintain a
507 complete Bacula backup, it is possible to completely recover your system from
508 "bare metal" that is starting from an empty disk.
510 If you have used the {\bf WriteBootstrap} record in your job or some other
511 means to save a valid bootstrap file, you will be able to use it to extract
512 the necessary files (without using the catalog or manually searching for the
515 \section{Interactions Between the Bacula Services}
516 \index[general]{Interactions between the Bacula services}
517 \index[general]{Services!Interactions between the Bacula}
519 The block diagram \vref{figgeneral:interactions} shows the typical interactions between the Bacula
520 Services for a backup job. Each block represents in general a separate process
521 (normally a daemon). In general, the Director oversees the flow of
522 information. It also maintains the Catalog.
524 %\addcontentsline{lof}{figure}{Interactions between Bacula Services}
525 \bsysimageH{flow}{Interactions between Bacula Services}{figgeneral:interactions}
526 %includegraphics{\idir flow}