4 \chapter{What is Bacula?}
6 \index[general]{Bacula!What is }
7 \index[general]{What is Bacula? }
9 {\bf Bacula} is a set of computer programs that permits you (or the system
10 administrator) to manage backup, recovery, and verification of computer data
11 across a network of computers of different kinds. Bacula 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. Bacula 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, Bacula 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 {\bf tar}, {\bf dump}, or {\bf
27 bru} to backup your computer data, and you would like a network solution, more
28 flexibility, or catalog services, Bacula 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, we do not
31 recommend using Bacula as it is much more difficult to setup and use than {\bf
34 If you want Bacula 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 Bacula difficult. Bacula 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" Bacula 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 are running {\bf Amanda} and would like a backup program that can write
43 to multiple volumes (i.e. is not limited by your tape drive capacity), Bacula
44 can most likely fill your needs. In addition, quite a number of our users
45 report that Bacula 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 Bacula, 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 Bacula is made up of the following five major components or services:
58 \addcontentsline{lof}{figure}{Bacula Applications}
59 \includegraphics{./bacula-applications.eps}
60 (thanks to Aristedes Maniatis for this graphic and the one below)
65 {\bf Bacula Director} service consists of the program that supervises
66 all the backup, restore, verify and archive operations. The system
67 administrator uses the Bacula Director to schedule backups and to
68 recover files. For more details see the Director Services Daemon Design
69 Document in the Bacula Developer's Guide. The Director runs as a daemon
70 or a service (i.e. in the background).
73 {\bf Bacula Console} services is the program that allows the
74 administrator or user to communicate with the {\bf Bacula Director} (see
75 above). Currently, the Bacula Console is available in three versions.
76 The first and simplest is to run the Console program in a shell window
77 (i.e. TTY interface). Most system administrators will find this
78 completely adequate. The second version is a GNOME GUI interface that
79 is far from complete, but quite functional as it has most the
80 capabilities of the shell Console. The third version is a wxWidgets GUI
81 with an interactive file restore. It also has most of the capabilities
82 of the shell console, allows command completion with tabulation, and
83 gives you instant help about the command you are typing. For more
84 details see the \ilink{Bacula Console Design Document}{_ConsoleChapter}.
87 {\bf Bacula File} services (or Client program) is the software program
88 that is installed on the machine to be backed up. It is specific to the
89 operating system on which it runs and is responsible for providing the
90 file attributes and data when requested by the Director. The File
91 services are also responsible for the file system dependent part of
92 restoring the file attributes and data during a recovery operation. For
93 more details see the File Services Daemon Design Document in the Bacula
94 Developer's Guide. This program runs as a daemon on the machine to be
95 backed up, and in some of the documentation, the File daemon is referred
96 to as the Client (for example in Bacula's configuration file). In
97 addition to Unix/Linux File daemons, there is a Windows File daemon
98 (normally distributed in binary format). The Windows File daemon runs
99 on current Windows versions (NT, 2000, XP, 2003, and possibly Me and
103 {\bf Bacula Storage} services consist of the software programs that
104 perform the storage and recovery of the file attributes and data to the
105 physical backup media or volumes. In other words, the Storage daemon is
106 responsible for reading and writing your tapes (or other storage media,
107 e.g. files). For more details see the Storage Services Daemon Design
108 Document in the Bacula Developer's Guide. The Storage services runs as
109 a daemon on the machine that has the backup device (usually a tape
113 {\bf Catalog} services are comprised of the software programs
114 responsible for maintaining the file indexes and volume databases for
115 all files backed up. The Catalog services permit the System
116 Administrator or user to quickly locate and restore any desired file.
117 The Catalog services sets Bacula apart from simple backup programs like
118 tar and bru, because the catalog maintains a record of all Volumes used,
119 all Jobs run, and all Files saved, permitting efficient restoration and
120 Volume management. Bacula currently supports three different databases,
121 MySQL, PostgreSQL, and SQLite, one of which must be chosen when building
124 The three SQL databases currently supported (MySQL, PostgreSQL or
125 SQLite) provide quite a number of features, including rapid indexing,
126 arbitrary queries, and security. Although we plan to support other
127 major SQL databases, the current Bacula implementation interfaces only
128 to MySQL, PostgreSQL and SQLite. For the technical and porting details
129 see the Catalog Services Design Document in the developer's documented.
131 The RPMs for MySQL and PostgreSQL ship as part of Red Hat Linux and
132 several other releases. Alternatively, building the rpms from the
133 source is quite easy, see the \ilink{ Installing and Configuring
134 MySQL}{MySqlChapter} chapter of this document for the details. For
135 more information on MySQL, please see:
136 \elink{www.mysql.com}{http://www.mysql.com}. Or see the \ilink{
137 Installing and Configuring PostgreSQL}{PostgreSqlChapter} chapter of this
138 document for the details. For more information on PostgreSQL, please
139 see: \elink{www.postgresql.org}{http://www.postgresql.org}.
141 Configuring and building SQLite is even easier. For the details of
142 configuring SQLite, please see the \ilink{ Installing and Configuring
143 SQLite}{SqlLiteChapter} chapter of this document.
146 {\bf Bacula Monitor} services is the program that allows the
147 administrator or user to watch current status of {\bf Bacula Directors},
148 {\bf Bacula File Daemons} and {\bf Bacula Storage Daemons} (see above).
149 Currently, only a GTK+ version is available, which works with Gnome and
150 KDE (or any window manager that supports the FreeDesktop.org system tray
151 standard). \end{itemize}
153 To perform a successful save or restore, the following four daemons must be
154 configured and running: the Director daemon, the File daemon, the Storage
155 daemon, and MySQL, PostgreSQL or SQLite.
157 \section{Bacula Configuration}
158 \index[general]{Configuration!Bacula }
159 \index[general]{Bacula Configuration }
161 In order for Bacula to understand your system, what clients you want backed
162 up, and how, you must create a number of configuration files containing
163 resources (or objects). The following presents an overall picture of this:
165 \addcontentsline{lof}{figure}{Bacula Objects}
166 \includegraphics{./bacula-objects.eps}
168 \section{Conventions Used in this Document}
169 \index[general]{Conventions Used in this Document }
170 \index[general]{Document!Conventions Used in this }
172 {\bf Bacula} is in a state of evolution, and as a consequence, this manual
173 will not always agree with the code. If an item in this manual is preceded by
174 an asterisk (*), it indicates that the particular feature is not implemented.
175 If it is preceded by a plus sign (+), it indicates that the feature may be
176 partially implemented.
178 If you are reading this manual as supplied in a released version of the
179 software, the above paragraph holds true. If you are reading the online
180 version of the manual,
181 \elink{ www.bacula.org}{http://www.bacula.org}, please bear in
182 mind that this version describes the current version in development (in the
183 CVS) that may contain features not in the released version. Just the same, it
184 generally lags behind the code a bit.
186 \section{Quick Start}
187 \index[general]{Quick Start }
188 \index[general]{Start!Quick }
190 To get Bacula up and running quickly, we recommend that you first scan the
191 Terminology section below, then quickly review the next chapter entitled
192 \ilink{The Current State of Bacula}{StateChapter}, then the
193 \ilink{Getting Started with Bacula}{QuickStartChapter}, which will
194 give you a quick overview of getting Bacula running. After which, you should
195 proceed to the chapter on
196 \ilink{Installing Bacula}{InstallChapter}, then
197 \ilink{How to Configure Bacula}{ConfigureChapter}, and finally the
199 \ilink{ Running Bacula}{TutorialChapter}.
201 \section{Terminology}
202 \index[general]{Terminology }
204 To facilitate communication about this project, we provide here the
205 definitions of the terminology that we use.
209 \item [Administrator]
210 \index[fd]{Administrator }
211 The person or persons responsible for administrating the Bacula system.
215 We use the term {\bf Backup} to refer to a Bacula Job that saves files.
217 \item [Bootstrap File]
218 \index[fd]{Bootstrap File }
219 The bootstrap file is an ASCII file containing a compact form of
220 commands that allow Bacula or the stand-alone file extraction utility
221 ({\bf bextract}) to restore the contents of one or more Volumes, for
222 example, the current state of a system just backed up. With a bootstrap
223 file, Bacula can restore your system without a Catalog. You can create
224 a bootstrap file from a Catalog to extract any file or files you wish.
228 The Catalog is used to store summary information about the Jobs,
229 Clients, and Files that were backed up and on what Volume or Volumes.
230 The information saved in the Catalog permits the administrator or user
231 to determine what jobs were run, their status as well as the important
232 characteristics of each file that was backed up, and most importantly,
233 it permits you to choose what files to restore.
235 online resource, but does not contain the data for the files backed up.
236 Most of the information stored in the catalog is also stored on the
237 backup volumes (i.e. tapes). Of course, the tapes will also have a
238 copy of the file data in addition to the File Attributes (see below).
240 The catalog feature is one part of Bacula that distinguishes it from
241 simple backup and archive programs such as {\bf dump} and {\bf tar}.
245 In Bacula's terminology, the word Client refers to the machine being
246 backed up, and it is synonymous with the File services or File daemon,
247 and quite often, we refer to it as the FD. A Client is defined in a
248 configuration file resource.
252 The program that interfaces to the Director allowing the user or system
253 administrator to control Bacula.
257 Unix terminology for a program that is always present in the background to
258 carry out a designated task. On Windows systems, as well as some Linux
259 systems, daemons are called {\bf Services}.
262 \index[fd]{Directive }
263 The term directive is used to refer to a statement or a record within a
264 Resource in a configuration file that defines one specific thing. For
265 example, the {\bf Name} directive defines the name of the Resource.
268 \index[fd]{Director }
269 The main Bacula server daemon that schedules and directs all Bacula
270 operations. Occasionally, we refer to the Director as DIR.
273 \index[fd]{Differential }
274 A backup that includes all files changed since the last Full save started.
275 Note, other backup programs may define this differently.
277 \item [File Attributes]
278 \index[fd]{File Attributes }
279 The File Attributes are all the information necessary about a file to
280 identify it and all its properties such as size, creation date, modification
281 date, permissions, etc. Normally, the attributes are handled entirely by
282 Bacula so that the user never needs to be concerned about them. The
283 attributes do not include the file's data.
286 \index[fd]{File Daemon }
287 The daemon running on the client computer to be backed up. This is also
288 referred to as the File services, and sometimes as the Client services or the
294 A FileSet is a Resource contained in a configuration file that defines
295 the files to be backed up. It consists of a list of included files or
296 directories, a list of excluded files, and how the file is to be stored
297 (compression, encryption, signatures). For more details, see the
298 \ilink{FileSet Resource definition}{FileSetResource} in the Director
299 chapter of this document.
302 \index[fd]{Incremental }
303 A backup that includes all files changed since the last Full, Differential,
304 or Incremental backup started. It is normally specified on the {\bf Level}
305 directive within the Job resource definition, or in a Schedule resource.
310 A Bacula Job is a configuration resource that defines the work that
311 Bacula must perform to backup or restore a particular Client. It
312 consists of the {\bf Type} (backup, restore, verify, etc), the {\bf
313 Level} (full, incremental,...), the {\bf FileSet}, and {\bf Storage} the
314 files are to be backed up (Storage device, Media Pool). For more
315 details, see the \ilink{Job Resource definition}{JobResource} in the
316 Director chapter of this document.
320 The program that interfaces to all the daemons allowing the user or
321 system administrator to monitor Bacula status.
324 \index[fd]{Resource }
325 A resource is a part of a configuration file that defines a specific
326 unit of information that is available to Bacula. It consists of several
327 directives (individual configuration statements). For example, the {\bf
328 Job} resource defines all the properties of a specific Job: name,
329 schedule, Volume pool, backup type, backup level, ...
333 A restore is a configuration resource that describes the operation of
334 recovering a file from backup media. It is the inverse of a save,
335 except that in most cases, a restore will normally have a small set of
336 files to restore, while normally a Save backs up all the files on the
337 system. Of course, after a disk crash, Bacula can be called upon to do
338 a full Restore of all files that were on the system.
341 \index[fd]{Schedule }
342 A Schedule is a configuration resource that defines when the Bacula Job
343 will be scheduled for execution. To use the Schedule, the Job resource
344 will refer to the name of the Schedule. For more details, see the
345 \ilink{Schedule Resource definition}{ScheduleResource} in the Director
346 chapter of this document.
350 This is Windows terminology for a {\bf daemon} -- see above. It is now
351 frequently used in Unix environments as well.
353 \item [Storage Coordinates]
354 \index[fd]{Storage Coordinates }
355 The information returned from the Storage Services that uniquely locates
356 a file on a backup medium. It consists of two parts: one part pertains
357 to each file saved, and the other part pertains to the whole Job.
358 Normally, this information is saved in the Catalog so that the user
359 doesn't need specific knowledge of the Storage Coordinates. The Storage
360 Coordinates include the File Attributes (see above) plus the unique
361 location of the information on the backup Volume.
363 \item [Storage Daemon]
364 \index[fd]{Storage Daemon }
365 The Storage daemon, sometimes referred to as the SD, is the code that
366 writes the attributes and data to a storage Volume (usually a tape or
371 Normally refers to the internal conversation between the File daemon and
372 the Storage daemon. The File daemon opens a {\bf session} with the
373 Storage daemon to save a FileSet, or to restore it. A session has a one
374 to one correspondence to a Bacula Job (see above).
378 A verify is a job that compares the current file attributes to the
379 attributes that have previously been stored in the Bacula Catalog. This
380 feature can be used for detecting changes to critical system files
381 similar to what {\bf Tripwire} does. One of the major advantages of
382 using Bacula to do this is that on the machine you want protected such
383 as a server, you can run just the File daemon, and the Director, Storage
384 daemon, and Catalog reside on a different machine. As a consequence, if
385 your server is ever compromised, it is unlikely that your verification
386 database will be tampered with.
388 Verify can also be used to check that the most recent Job data written
389 to a Volume agrees with what is stored in the Catalog (i.e. it compares
390 the file attributes), *or it can check the Volume contents against the
391 original files on disk.
394 \index[fd]{*Archive }
395 An Archive operation is done after a Save, and it consists of removing the
396 Volumes on which data is saved from active use. These Volumes are marked as
397 Archived, and may no longer be used to save files. All the files contained
398 on an Archived Volume are removed from the Catalog. NOT YET IMPLEMENTED.
402 An Update operation causes the files on the remote system to be updated to be
403 the same as the host system. This is equivalent to an {\bf rdist} capability.
406 \item [Retention Period]
407 \index[fd]{Retention Period }
408 There are various kinds of retention periods that Bacula recognizes.
409 The most important are the {\bf File} Retention Period, {\bf Job}
410 Retention Period, and the {\bf Volume} Retention Period. Each of these
411 retention periods applies to the time that specific records will be kept
412 in the Catalog database. This should not be confused with the time that
413 the data saved to a Volume is valid.
415 The File Retention Period determines the time that File records are kept
416 in the catalog database. This period is important because the volume of
417 the database File records by far use the most storage space in the
418 database. As a consequence, you must ensure that regular "pruning" of
419 the database file records is done. (See the Console {\bf retention}
420 command for more details on this subject).
422 The Job Retention Period is the length of time that Job records will be
423 kept in the database. Note, all the File records are tied to the Job
424 that saved those files. The File records can be purged leaving the Job
425 records. In this case, information will be available about the jobs
426 that ran, but not the details of the files that were backed up.
427 Normally, when a Job record is purged, all its File records will also be
430 The Volume Retention Period is the minimum of time that a Volume will be
431 kept before it is reused. Bacula will normally never overwrite a Volume
432 that contains the only backup copy of a file. Under ideal conditions,
433 the Catalog would retain entries for all files backed up for all current
434 Volumes. Once a Volume is overwritten, the files that were backed up on
435 that Volume are automatically removed from the Catalog. However, if
436 there is a very large pool of Volumes or a Volume is never overwritten,
437 the Catalog database may become enormous. To keep the Catalog to a
438 manageable size, the backup information should be removed from the
439 Catalog after the defined File Retention Period. Bacula provides the
440 mechanisms for the catalog to be automatically pruned according to the
441 retention periods defined.
445 A Scan operation causes the contents of a Volume or a series of Volumes
446 to be scanned. These Volumes with the information on which files they
447 contain are restored to the Bacula Catalog. Once the information is
448 restored to the Catalog, the files contained on those Volumes may be
449 easily restored. This function is particularly useful if certain
450 Volumes or Jobs have exceeded their retention period and have been
451 pruned or purged from the Catalog. Scanning data from Volumes into the
452 Catalog is done by using the {\bf bscan} program. See the \ilink{ bscan
453 section}{bscan} of the Bacula Utilities Chapter of this manual for more
458 A Volume is an archive unit, normally a tape or a named disk file where
459 Bacula stores the data from one or more backup jobs. All Bacula Volumes
460 have a software label written to the Volume by Bacula so that it
461 identifies what Volume it is really reading. (Normally there should be
462 no confusion with disk files, but with tapes, it is easy to mount the
466 \section{What Bacula is Not}
467 \index[general]{What Bacula is Not}
469 {\bf Bacula} is a backup, restore and verification program and is not a
470 complete disaster recovery system in itself, but it can be a key part of one
471 if you plan carefully and follow the instructions included in the
472 \ilink{ Disaster Recovery}{RescueChapter} Chapter of this manual.
474 With proper planning, as mentioned in the Disaster Recovery chapter {\bf
475 Bacula} can be a central component of your disaster recovery system. For
476 example, if you have created an emergency boot disk, a Bacula Rescue disk to
477 save the current partitioning information of your hard disk, and maintain a
478 complete Bacula backup, it is possible to completely recover your system from
479 "bare metal" that is starting from an empty disk.
481 If you have used the {\bf WriteBootstrap} record in your job or some other
482 means to save a valid bootstrap file, you will be able to use it to extract
483 the necessary files (without using the catalog or manually searching for the
486 \section{Interactions Between the Bacula Services}
487 \index[general]{Interactions Between the Bacula Services}
488 \index[general]{Services!Interactions Between the Bacula}
490 The following block diagram shows the typical interactions between the Bacula
491 Services for a backup job. Each block represents in general a separate process
492 (normally a daemon). In general, the Director oversees the flow of
493 information. It also maintains the Catalog.
495 \addcontentsline{lof}{figure}{Interactions between Bacula Services}
496 \includegraphics{./flow.eps}