4 \section*{What is Bacula?}
5 \label{_ChapterStart41}
6 \index[general]{Bacula!What is }
7 \index[general]{What is Bacula? }
8 \addcontentsline{toc}{section}{What is Bacula?}
10 {\bf Bacula} is a set of computer programs that permits you (or the system
11 administrator) to manage backup, recovery, and verification of computer data
12 across a network of computers of different kinds. Bacula can also run entirely
13 upon a single computer, and can backup to various types of media, including tape
16 In technical terms, it is a
17 network Client/Server based backup program. Bacula is relatively easy to use
18 and efficient, while offering many advanced storage management features that
19 make it easy to find and recover lost or damaged files. Due to its modular
20 design, Bacula is scalable from small single computer systems to systems
21 consisting of hundreds of computers located over a large network.
23 \subsection*{Who Needs Bacula?}
24 \index[general]{Who Needs Bacula? }
25 \index[general]{Bacula!Who Needs }
26 \addcontentsline{toc}{subsection}{Who Needs Bacula?}
28 If you are currently using a program such as {\bf tar}, {\bf dump}, or {\bf
29 bru} to backup your computer data, and you would like a network solution, more
30 flexibility, or catalog services, Bacula will most likely provide the
31 additional features you want. However, if you are new to Unix systems or do
32 not have offsetting experience with a sophisticated backup package, we do not
33 recommend using Bacula as it is much more difficult to setup and use than {\bf
36 If you want Bacula to behave like the above mentioned simple
37 programs and write over any tape that you put in the drive, then you will find
38 working with Bacula difficult. Bacula is designed to protect your data
39 following the rules you specify, and this means reusing a tape only
40 as the last resort. It is possible to "force" Bacula to write
41 over any tape in the drive, but it is easier and more efficient to use a
42 simpler program for that kind of operation.
44 If you are running {\bf Amanda} and would like a backup program that can write
45 to multiple volumes (i.e. is not limited by your tape drive capacity), Bacula
46 can most likely fill your needs. In addition, quite a number of our users
47 report that Bacula is simpler to setup and use than other equivalent programs.
49 If you are currently using a sophisticated commercial package such as Legato
50 Networker. ARCserveIT, Arkeia, or PerfectBackup+, you may be interested in
51 Bacula, which provides many of the same features, and is free software
52 available under the GNU Version 2 software license.
54 \subsection*{Bacula Components or Services}
55 \index[general]{Bacula Components or Services }
56 \index[general]{Services!Bacula Components or }
57 \addcontentsline{toc}{subsection}{Bacula Components or Services}
59 Bacula is made up of the following five major components or services:
61 \addcontentsline{lof}{figure}{Bacula Applications}
62 \includegraphics{./bacula-applications.eps}
63 (thanks to Aristedes Maniatis for this graphic and the one below)
68 {\bf Bacula Director} service consists of 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 a service (i.e. in the background).
76 {\bf Bacula Console} services is the program that allows the
77 administrator or user to communicate with the {\bf Bacula Director} (see
78 above). Currently, the Bacula Console is available in three versions.
79 The first and simplest is to run the Console program in a shell window
80 (i.e. TTY interface). Most system administrators will find this
81 completely adequate. The second version is a GNOME GUI interface that
82 is far from complete, but quite functional as it has most the
83 capabilities of the shell Console. The third version is a wxWidgets GUI
84 with an interactive file restore. It also has most of the capabilities
85 of the shell console, allows command completion with tabulation, and
86 gives you instant help about the command you are typing. For more
87 details see the \ilink{Bacula Console Design Document}{_ConsoleChapter}.
90 {\bf Bacula File} services (or Client program) is the software program
91 that is installed on the machine to be backed up. It is specific to the
92 operating system on which it runs and is responsible for providing the
93 file attributes and data when requested by the Director. The File
94 services are also responsible for the file system dependent part of
95 restoring the file attributes and data during a recovery operation. For
96 more details see the File Services Daemon Design Document in the Bacula
97 Developer's Guide. This program runs as a daemon on the machine to be
98 backed up, and in some of the documentation, the File daemon is referred
99 to as the Client (for example in Bacula's configuration file). In
100 addition to Unix/Linux File daemons, there is a Windows File daemon
101 (normally distributed in binary format). The Windows File daemon runs
102 on current Windows versions (NT, 2000, XP, 2003, and possibly Me and
106 {\bf Bacula Storage} services consist of the software programs that
107 perform the storage and recovery of the file attributes and data to the
108 physical backup media or volumes. In other words, the Storage daemon is
109 responsible for reading and writing your tapes (or other storage media,
110 e.g. files). For more details see the Storage Services Daemon Design
111 Document in the Bacula Developer's Guild. The Storage services runs as
112 a daemon on the machine that has the backup device (usually a tape
116 {\bf Catalog} services are comprised of the software programs
117 responsible for maintaining the file indexes and volume databases for
118 all files backed up. The Catalog services permit the System
119 Administrator or user to quickly locate and restore any desired file.
120 The Catalog services sets Bacula apart from simple backup programs like
121 tar and bru, because the catalog maintains a record of all Volumes used,
122 all Jobs run, and all Files saved, permitting efficient restoration and
123 Volume management. Bacula currently supports three different databases,
124 MySQL, PostgreSQL, and SQLite, one of which must be chosen when building
127 The three SQL databases currently supported (MySQL, PostgreSQL or
128 SQLite) provide quite a number of features, including rapid indexing,
129 arbitrary queries, and security. Although we plan to support other
130 major SQL databases, the current Bacula implementation interfaces only
131 to MySQL, PostgreSQL and SQLite. For the technical and porting details
132 see the Catalog Services Design Document in the developer's documented.
134 The RPMs for MySQL and PostgreSQL ship as part of the Linux RedHat and
135 several other releases. Alternatively, building the rpms from the
136 source is quite easy, see the \ilink{ Installing and Configuring
137 MySQL}{_ChapterStart} chapter of this document for the details. For
138 more information on MySQL, please see:
139 \elink{www.mysql.com}{http://www.mysql.com}. Or see the \ilink{
140 Installing and Configuring PostgreSQL}{_ChapterStart10} chapter of this
141 document for the details. For more information on PostgreSQL, please
142 see: \elink{www.postgresql.org}{http://www.postgresql.org}.
144 Configuring and building SQLite is even easier. For the details of
145 configuring SQLite, please see the \ilink{ Installing and Configuring
146 SQLite}{_ChapterStart33} chapter of this document.
149 {\bf Bacula Monitor} services is the program that allows the
150 administrator or user to watch current status of {\bf Bacula Directors},
151 {\bf Bacula File Daemons} and {\bf Bacula Storage Daemons} (see above).
152 Currently, only a GTK+ version is available, which works with Gnome and
153 KDE (or any window manager that supports the FreeDesktop.org system tray
154 standard). \end{itemize}
156 To perform a successful save or restore, the following four daemons must be
157 configured and running: the Director daemon, the File daemon, the Storage
158 daemon, and MySQL, PostgreSQL or SQLite.
160 \subsection*{Bacula Configuration}
161 \index[general]{Configuration!Bacula }
162 \index[general]{Bacula Configuration }
163 \addcontentsline{toc}{subsection}{Bacula Configuration}
165 In order for Bacula to understand your system, what clients you want backed
166 up, and how, you must create a number of configuration files containing
167 resources (or objects). The following presents an overall picture of this:
169 \addcontentsline{lof}{figure}{Bacula Objects}
170 \includegraphics{./bacula-objects.eps}
172 \subsection*{Conventions Used in this Document}
173 \index[general]{Conventions Used in this Document }
174 \index[general]{Document!Conventions Used in this }
175 \addcontentsline{toc}{subsection}{Conventions Used in this Document}
177 {\bf Bacula} is in a state of evolution, and as a consequence, this manual
178 will not always agree with the code. If an item in this manual is preceded by
179 an asterisk (*), it indicates that the particular feature is not implemented.
180 If it is preceded by a plus sign (+), it indicates that the feature may be
181 partially implemented.
183 If you are reading this manual as supplied in a released version of the
184 software, the above paragraph holds true. If you are reading the online
185 version of the manual,
186 \elink{ www.bacula.org}{http://www.bacula.org}, please bear in
187 mind that this version describes the current version in development (in the
188 CVS) that may contain features not in the released version. Just the same, it
189 generally lags behind the code a bit.
191 \subsection*{Quick Start}
192 \index[general]{Quick Start }
193 \index[general]{Start!Quick }
194 \addcontentsline{toc}{subsection}{Quick Start}
196 To get Bacula up and running quickly, we recommend that you first scan the
197 Terminology section below, then quickly review the next chapter entitled
198 \ilink{The Current State of Bacula}{_ChapterStart2}, then the
199 \ilink{Getting Started with Bacula}{_ChapterStart37}, which will
200 give you a quick overview of getting Bacula running. After which, you should
201 proceed to the chapter on
202 \ilink{Installing Bacula}{_ChapterStart17}, then
203 \ilink{How to Configure Bacula}{_ChapterStart16}, and finally the
205 \ilink{ Running Bacula}{_ChapterStart1}.
207 \subsection*{Terminology}
208 \index[general]{Terminology }
209 \addcontentsline{toc}{subsection}{Terminology}
211 To facilitate communication about this project, we provide here the
212 definitions of the terminology that we use.
216 \item [Administrator]
217 \index[fd]{Administrator }
218 The person or persons responsible for administrating the Bacula system.
222 We use the term {\bf Backup} to refer to a Bacula Job that saves files.
224 \item [Bootstrap File]
225 \index[fd]{Bootstrap File }
226 The bootstrap file is an ASCII file containing a compact form of
227 commands that allow Bacula or the stand-alone file extraction utility
228 ({\bf bextract}) to restore the contents of one or more Volumes, for
229 example, the current state of a system just backed up. With a bootstrap
230 file, Bacula can restore your system without a Catalog. You can create
231 a bootstrap file from a Catalog to extract any file or files you wish.
235 The Catalog is used to store summary information about the Jobs,
236 Clients, and Files that were backed up and on what Volume or Volumes.
237 The information saved in the Catalog permits the administrator or user
238 to determine what jobs were run, their status as well as the important
239 characteristics of each file that was backed up, and most importantly,
240 it permits you to choose what files to restore.
242 online resource, but does not contain the data for the files backed up.
243 Most of the information stored in the catalog is also stored on the
244 backup volumes (i.e. tapes). Of course, the tapes will also have a
245 copy of the file data in addition to the File Attributes (see below).
247 The catalog feature is one part of Bacula that distinguishes it from
248 simple backup and archive programs such as {\bf dump} and {\bf tar}.
252 In Bacula's terminology, the word Client refers to the machine being
253 backed up, and it is synonymous with the File services or File daemon,
254 and quite often, we refer to it as the FD. A Client is defined in a
255 configuration file resource.
259 The program that interfaces to the Director allowing the user or system
260 administrator to control Bacula.
264 Unix terminology for a program that is always present in the background to
265 carry out a designated task. On Windows systems, as well as some Linux
266 systems, daemons are called {\bf Services}.
269 \index[fd]{Directive }
270 The term directive is used to refer to a statement or a record within a
271 Resource in a configuration file that defines one specific thing. For
272 example, the {\bf Name} directive defines the name of the Resource.
275 \index[fd]{Director }
276 The main Bacula server daemon that schedules and directs all Bacula
277 operations. Occasionally, we refer to the Director as DIR.
280 \index[fd]{Differential }
281 A backup that includes all files changed since the last Full save started.
282 Note, other backup programs may define this differently.
284 \item [File Attributes]
285 \index[fd]{File Attributes }
286 identify it and all its properties such as size, creation date, modification
287 date, permissions, etc. Normally, the attributes are handled entirely by
288 Bacula so that the user never needs to be concerned about them. The
289 attributes do not include the file's data.
290 The File Attributes are all the information necessary about a file to
293 \index[fd]{File Daemon }
294 The daemon running on the client computer to be backed up. This is also
295 referred to as the File services, and sometimes as the Client services or the
301 A FileSet is a Resource contained in a configuration file that defines
302 the files to be backed up. It consists of a list of included files or
303 directories, a list of excluded files, and how the file is to be stored
304 (compression, encryption, signatures). For more details, see the
305 \ilink{FileSet Resource definition}{FileSetResource} in the Director
306 chapter of this document.
309 \index[fd]{Incremental }
310 A backup that includes all files changed since the last Full, Differential,
311 or Incremental backup started. It is normally specified on the {\bf Level}
312 directive within the Job resource definition, or in a Schedule resource.
317 A Bacula Job is a configuration resource that defines the work that
318 Bacula must perform to backup or restore a particular Client. It
319 consists of the {\bf Type} (backup, restore, verify, etc), the {\bf
320 Level} (full, incremental,...), the {\bf FileSet}, and {\bf Storage} the
321 files are to be backed up (Storage device, Media Pool). For more
322 details, see the \ilink{Job Resource definition}{JobResource} in the
323 Director chapter of this document.
327 The program that interfaces to all the daemons allowing the user or
328 system administrator to monitor Bacula status.
331 \index[fd]{Resource }
332 A resource is a part of a configuration file that defines a specific
333 unit of information that is available to Bacula. It consists of several
334 directives (individual configuration statements). For example, the {\bf
335 Job} resource defines all the properties of a specific Job: name,
336 schedule, Volume pool, backup type, backup level, ...
340 A restore is a configuration resource that describes the operation of
341 recovering a file from backup media. It is the inverse of a save,
342 except that in most cases, a restore will normally have a small set of
343 files to restore, while normally a Save backs up all the files on the
344 system. Of course, after a disk crash, Bacula can be called upon to do
345 a full Restore of all files that were on the system.
348 \index[fd]{Schedule }
349 A Schedule is a configuration resource that defines when the Bacula Job
350 will be scheduled for execution. To use the Schedule, the Job resource
351 will refer to the name of the Schedule. For more details, see the
352 \ilink{Schedule Resource definition}{ScheduleResource} in the Director
353 chapter of this document.
357 This is Windows terminology for a {\bf daemon} -- see above. It is now
358 frequently used in Unix environments as well.
360 \item [Storage Coordinates]
361 \index[fd]{Storage Coordinates }
362 The information returned from the Storage Services that uniquely locates
363 a file on a backup medium. It consists of two parts: one part pertains
364 to each file saved, and the other part pertains to the whole Job.
365 Normally, this information is saved in the Catalog so that the user
366 doesn't need specific knowledge of the Storage Coordinates. The Storage
367 Coordinates include the File Attributes (see above) plus the unique
368 location of the information on the backup Volume.
370 \item [Storage Daemon]
371 \index[fd]{Storage Daemon }
372 The Storage daemon, sometimes referred to as the SD, is the code that
373 writes the attributes and data to a storage Volume (usually a tape or
378 Normally refers to the internal conversation between the File daemon and
379 the Storage daemon. The File daemon opens a {\bf session} with the
380 Storage daemon to save a FileSet, or to restore it. A session has a one
381 to one correspondence to a Bacula Job (see above).
385 A verify is a job that compares the current file attributes to the
386 attributes that have previously been stored in the Bacula Catalog. This
387 feature can be used for detecting changes to critical system files
388 similar to what {\bf Tripwire} does. One of the major advantages of
389 using Bacula to do this is that on the machine you want protected such
390 as a server, you can run just the File daemon, and the Director, Storage
391 daemon, and Catalog reside on a different machine. As a consequence, if
392 your server is ever compromised, it is unlikely that your verification
393 database will be tampered with.
395 Verify can also be used to check that the most recent Job data written
396 to a Volume agrees with what is stored in the Catalog (i.e. it compares
397 the file attributes), *or it can check the Volume contents against the
398 original files on disk.
401 \index[fd]{*Archive }
402 An Archive operation is done after a Save, and it consists of removing the
403 Volumes on which data is saved from active use. These Volumes are marked as
404 Archived, and may no longer be used to save files. All the files contained
405 on an Archived Volume are removed from the Catalog. NOT YET IMPLEMENTED.
409 An Update operation causes the files on the remote system to be updated to be
410 the same as the host system. This is equivalent to an {\bf rdist} capability.
413 \item [Retention Period]
414 \index[fd]{Retention Period }
415 There are various kinds of retention periods that Bacula recognizes.
416 The most important are the {\bf File} Retention Period, {\bf Job}
417 Retention Period, and the {\bf Volume} Retention Period. Each of these
418 retention periods applies to the time that specific records will be kept
419 in the Catalog database. This should not be confused with the time that
420 the data saved to a Volume is valid.
422 The File Retention Period determines the time that File records are kept
423 in the catalog database. This period is important because the volume of
424 the database File records by far use the most storage space in the
425 database. As a consequence, you must ensure that regular "pruning" of
426 the database file records is done. (See the Console {\bf retention}
427 command for more details on this subject).
429 The Job Retention Period is the length of time that Job records will be
430 kept in the database. Note, all the File records are tied to the Job
431 that saved those files. The File records can be purged leaving the Job
432 records. In this case, information will be available about the jobs
433 that ran, but not the details of the files that were backed up.
434 Normally, when a Job record is purged, all its File records will also be
437 The Volume Retention Period is the minimum of time that a Volume will be
438 kept before it is reused. Bacula will normally never overwrite a Volume
439 that contains the only backup copy of a file. Under ideal conditions,
440 the Catalog would retain entries for all files backed up for all current
441 Volumes. Once a Volume is overwritten, the files that were backed up on
442 that Volume are automatically removed from the Catalog. However, if
443 there is a very large pool of Volumes or a Volume is never overwritten,
444 the Catalog database may become enormous. To keep the Catalog to a
445 manageable size, the backup information should be removed from the
446 Catalog after the defined File Retention Period. Bacula provides the
447 mechanisms for the catalog to be automatically pruned according to the
448 retention periods defined.
452 A Scan operation causes the contents of a Volume or a series of Volumes
453 to be scanned. These Volumes with the information on which files they
454 contain are restored to the Bacula Catalog. Once the information is
455 restored to the Catalog, the files contained on those Volumes may be
456 easily restored. This function is particularly useful if certain
457 Volumes or Jobs have exceeded their retention period and have been
458 pruned or purged from the Catalog. Scanning data from Volumes into the
459 Catalog is done by using the {\bf bscan} program. See the \ilink{ bscan
460 section}{bscan} of the Bacula Utilities Chapter of this manual for more
465 A Volume is an archive unit, normally a tape or a named disk file where
466 Bacula stores the data from one or more backup jobs. All Bacula Volumes
467 have a software label written to the Volume by Bacula so that it
468 identifies what Volume it is really reading. (Normally there should be
469 no confusion with disk files, but with tapes, it is easy to mount the
473 \subsection*{What Bacula is Not}
474 \index[general]{What Bacula is Not}
475 \addcontentsline{toc}{subsection}{What Bacula is Not}
477 {\bf Bacula} is a backup, restore and verification program and is not a
478 complete disaster recovery system in itself, but it can be a key part of one
479 if you plan carefully and follow the instructions included in the
480 \ilink{ Disaster Recovery}{_ChapterRescue} Chapter of this manual.
482 With proper planning, as mentioned in the Disaster Recovery chapter {\bf
483 Bacula} can be a central component of your disaster recovery system. For
484 example, if you have created an emergency boot disk, a Bacula Rescue disk to
485 save the current partitioning information of your hard disk, and maintain a
486 complete Bacula backup, it is possible to completely recover your system from
487 "bare metal" that is starting from an empty disk.
489 If you have used the {\bf WriteBootstrap} record in your job or some other
490 means to save a valid bootstrap file, you will be able to use it to extract
491 the necessary files (without using the catalog or manually searching for the
494 \subsection*{Interactions Between the Bacula Services}
495 \index[general]{Interactions Between the Bacula Services}
496 \index[general]{Services!Interactions Between the Bacula}
497 \addcontentsline{toc}{subsection}{Interactions Between the Bacula Services}
499 The following block diagram shows the typical interactions between the Bacula
500 Services for a backup job. Each block represents in general a separate process
501 (normally a daemon). In general, the Director oversees the flow of
502 information. It also maintains the Catalog.
504 \addcontentsline{lof}{figure}{Interactions between Bacula Services}
505 \includegraphics{./flow.eps}