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