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