]> git.sur5r.net Git - bacula/docs/blob - docs/manual/general.tex
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  Guide.  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 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}{_ConsoleChapter}. 
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 current Windows versions (NT,
98 2000, XP, 2003, and possibly Me and 98). 
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 efficient 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}.
119
120 The three SQL databases currently supported (MySQL, PostgreSQL or SQLite) 
121 provide quite a number of features,  including rapid indexing, arbitrary
122 queries, and security. Although  we plan to support other major SQL databases,
123 the current  Bacula implementation interfaces only to MySQL, PostgreSQL and
124 SQLite.  For the technical and porting details see the Catalog Services
125 Design Document in the developer's documented.
126
127 The RPMs for MySQL and PostgreSQL ship as part of the Linux RedHat 
128 and several other releases. Alternatively, building the rpms from the source is 
129 quite easy, see the  
130 \ilink{ Installing and Configuring MySQL}{_ChapterStart} chapter  of
131 this document for the details. For more information on MySQL,  please see: 
132 \elink{www.mysql.com}{http://www.mysql.com}.  Or see the 
133 \ilink{ Installing and Configuring PostgreSQL}{_ChapterStart10}
134 chapter of this document for the details. For more  information on PostgreSQL,
135 please see: 
136 \elink{www.postgresql.org}{http://www.postgresql.org}.  
137
138 Configuring and building SQLite is even easier. For the details  of
139 configuring SQLite, please see the 
140 \ilink{ Installing and Configuring SQLite}{_ChapterStart33} chapter
141 of this document. 
142 \item 
143    \label{MonDef}
144    {\bf Bacula Monitor} services is the program that allows the  administrator or
145 user to watch current status of {\bf Bacula Directors},  {\bf Bacula File
146 Daemons} and {\bf Bacula Storage Daemons}  (see above). Currently, only a GTK+
147 version is available, which  works with Gnome and KDE (or any window manager
148 that supports the  FreeDesktop.org system tray standard). 
149 \end{itemize}
150
151 To perform a successful save or restore, the following four daemons must be
152 configured and running: the Director daemon, the File daemon, the Storage
153 daemon, and MySQL, PostgreSQL or SQLite. 
154
155 \subsection*{Bacula Configuration}
156 \index[general]{Configuration!Bacula }
157 \index[general]{Bacula Configuration }
158 \addcontentsline{toc}{subsection}{Bacula Configuration}
159
160 In order for Bacula to understand your system, what clients you want backed
161 up, and how, you must create a number of configuration files containing
162 resources (or objects). The following presents an overall picture of this: 
163
164 \addcontentsline{lof}{figure}{Bacula Objects}
165 \includegraphics{./bacula-objects.eps} 
166
167 \subsection*{Conventions Used in this Document}
168 \index[general]{Conventions Used in this Document }
169 \index[general]{Document!Conventions Used in this }
170 \addcontentsline{toc}{subsection}{Conventions Used in this Document}
171
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. 
177
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. 
185
186 \subsection*{Quick Start}
187 \index[general]{Quick Start }
188 \index[general]{Start!Quick }
189 \addcontentsline{toc}{subsection}{Quick Start}
190
191 To get Bacula up and running quickly, we recommend that you first scan the
192 Terminology section below, then quickly review the next chapter entitled 
193 \ilink{The Current State of Bacula}{_ChapterStart2}, then the 
194 \ilink{Getting Started with Bacula}{_ChapterStart37}, which will
195 give you a quick overview of getting Bacula running. After which, you should
196 proceed to the chapter on 
197 \ilink{Installing Bacula}{_ChapterStart17}, then 
198 \ilink{How to Configure Bacula}{_ChapterStart16}, and finally the
199 chapter on 
200 \ilink{ Running Bacula}{_ChapterStart1}. 
201
202 \subsection*{Terminology}
203 \index[general]{Terminology }
204 \addcontentsline{toc}{subsection}{Terminology}
205
206 To facilitate communication about this project, we provide here the
207 definitions of the terminology that we use. 
208
209 \begin{description}
210
211 \item [Administrator]
212    \index[fd]{Administrator }
213    The person or persons responsible for administrating the Bacula system. 
214
215 \item [Backup]
216    \index[fd]{Backup }
217    We use the term {\bf Backup} to refer to a Bacula Job that saves files. 
218
219 \item [Bootstrap File]
220    \index[fd]{Bootstrap File }
221    The bootstrap file is an ASCII file  containing a compact form of commands
222 that allow Bacula or the stand-alone file extraction utility ({\bf bextract})
223 to  restore the contents of one or more Volumes, for example, the  current
224 state of a system just backed up. With a bootstrap file,  Bacula can restore
225 your system without a Catalog. You can  create a bootstrap file from a Catalog
226 to extract any file or  files you wish. 
227
228 \item [Catalog]
229    \index[fd]{Catalog }
230    The Catalog is used to store summary information  about the Jobs, Clients, and
231 Files that were backed up and on  what Volume or Volumes. The information
232 saved in the Catalog  permits the administrator or user to determine what jobs
233 were  run, their status as well as the important characteristics  of each file
234 that was backed up. The Catalog is an online resource,  but does not contain
235 the data for the files backed up. Most of  the information stored in the
236 catalog is also stored on the  backup volumes (i.e. tapes). Of course, the
237 tapes will also have  a copy of the file data in addition to the File Attributes
238 (see below).  
239
240 The catalog feature is one part of Bacula that distinguishes  it from simple
241 backup and archive programs such as {\bf dump}  and {\bf tar}.  
242
243 \item [Client]
244    \index[fd]{Client }
245    In Bacula's terminology, the word Client  refers to the machine being backed
246 up, and it is synonymous  with the File services or File daemon, and quite
247 often, we  refer to it as the FD. A Client is defined in a configuration  file
248 resource. 
249
250 \item [Console]
251    \index[fd]{Console }
252    The program that interfaces to the Director allowing  the user or system
253 administrator to control Bacula. 
254
255 \item [Daemon]
256    \index[fd]{Daemon }
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}. 
260
261 \item [Directive]
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. 
266
267 \item [Director]
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. 
271
272 \item [Differential]
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. 
276
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. 
284
285 \item [File Daemon]
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
289 FD. 
290
291 \item [
292    \label{FileSetDef}
293    FileSet]
294 \index[fd]{a name }
295 A FileSet is a Resource contained in a configuration  file that defines the
296 files to be backed up. It consists  of a list of included files or
297 directories, a list of excluded files, and  how the file is to be stored
298 (compression, encryption, signatures).  For more details, see the 
299 \ilink{FileSet Resource definition}{FileSetResource}  in the
300 Director chapter of this document. 
301
302 \item [Incremental]
303    \index[fd]{Incremental }
304    A backup that includes all files changed since the  last Full, Differential,
305 or Incremental backup started. It is normally  specified on the {\bf Level}
306 directive within the Job resource  definition, or in a Schedule resource. 
307
308 \item [
309    \label{JobDef}
310    Job]
311 \index[fd]{a name }
312 A Bacula Job is a configuration resource that defines  the work that Bacula
313 must perform to backup or restore a particular  Client. It consists of the
314 {\bf Type} (backup, restore, verify,  etc), the {\bf Level} (full,
315 incremental,...), the {\bf FileSet},  and {\bf Storage} the files are to be
316 backed up (Storage device,  Media Pool). For more details, see the 
317 \ilink{Job Resource definition}{JobResource} in the  Director
318 chapter of this document. 
319
320 \item [Monitor]
321    \index[fd]{Monitor }
322    The program that interfaces to all the daemons  allowing the user or
323 system administrator to monitor Bacula status. 
324
325 \item [Resource]
326    \index[fd]{Resource }
327    A resource is a part of a configuration file that defines a specific unit of
328 information that is available to Bacula. It consists of several directives
329 (individual configuration statements). For example, the {\bf Job} resource
330 defines all the properties of a specific Job: name, schedule, Volume pool,
331 backup type, backup  level, ... 
332
333 \item [Restore]
334    \index[fd]{Restore }
335    A restore is a configuration resource that  describes the operation of
336 recovering a file from  backup media. It is the inverse of a
337 save, except that in most  cases, a restore will normally have a small set of
338 files to restore,  while normally a Save backs up all the files on the system.
339 Of  course, after a disk crash, Bacula can be called upon to do  a full
340 Restore of all files that were on the system. 
341
342 \item [Schedule]
343    \index[fd]{Schedule }
344    A Schedule is a configuration resource that  defines when the Bacula Job will
345 be scheduled for  execution. To use the Schedule, the Job resource will refer
346 to  the name of the Schedule. For more details, see the 
347 \ilink{Schedule Resource definition}{ScheduleResource} in the
348 Director chapter of this document. 
349
350 \item [Service]
351    \index[fd]{Service }
352    This is Windows terminology for a {\bf daemon} -- see  above. It is now
353 frequently used in Unix environments as well. 
354
355 \item [Storage Coordinates]
356    \index[fd]{Storage Coordinates }
357    The information returned from the  Storage Services that uniquely locates a
358 file on a backup medium. It  consists of two parts: one part pertains to each
359 file saved, and the  other part pertains to the whole Job. Normally, this
360 information is  saved in the Catalog so that the user doesn't need specific
361 knowledge  of the Storage Coordinates. The Storage Coordinates include the 
362 File Attributes (see above) plus the unique location of the information on 
363 the backup Volume. 
364
365 \item [Storage Daemon]
366    \index[fd]{Storage Daemon }
367    The Storage daemon, sometimes referred to as  the SD, is the code that writes
368 the attributes and data to a storage  Volume (usually a tape or disk). 
369
370 \item [Session]
371    \index[sd]{Session }
372    Normally refers to the internal conversation between  the File daemon and the
373 Storage daemon. The File daemon opens a  {\bf session} with the Storage daemon
374 to save a FileSet, or to restore  it. A session has a one to one
375 correspondence to a Bacula Job (see  above). 
376
377 \item [Verify]
378    \index[sd]{Verify }
379    A verify is a job that compares the current file  attributes to the attributes
380 that have previously been stored in the  Bacula Catalog. This feature can be
381 used for detecting changes to  critical system files similar to what {\bf
382 Tripwire} does. One  of the major advantages of using Bacula to do this is
383 that  on the machine you want protected such as a server, you can run  just
384 the File daemon, and the Director, Storage daemon, and Catalog  reside on a
385 different machine. As a consequence, if your server is  ever compromised, it
386 is unlikely that your verification database  will be tampered with.  
387
388 Verify can also be used to check that the most recent Job  data written to a
389 Volume agrees with what is stored in the Catalog  (i.e. it compares the file
390 attributes), *or it can check the  Volume contents against the original files
391 on disk. 
392
393 \item [*Archive]
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. 
399
400 \item [*Update]
401    \index[fd]{*Update }
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.
404 NOT YET IMPLEMENTED.  
405
406 \item [Retention Period]
407    \index[fd]{Retention Period }
408    There are various kinds of retention  periods that Bacula recognizes. The most
409 important are the  {\bf File} Retention Period, {\bf Job} Retention Period,
410 and the  {\bf Volume} Retention Period. Each of these retention periods 
411 applies to the time that specific records will be kept in the  Catalog
412 database. This should not be confused with the time that  the data saved to a
413 Volume is valid. 
414
415 The File Retention Period  determines the time that File records are kept in
416 the catalog  database. This period is important because the volume of the 
417 database File records by far use the most storage space in the  database. As a
418 consequence, you must ensure that regular  "pruning" of the database file
419 records is done. (See  the Console {\bf retention} command for more details on
420 this  subject). 
421
422 The Job Retention Period is the length of time that  Job records will be kept
423 in the database. Note, all the File  records are tied to the Job that saved
424 those files. The File  records can be purged leaving the Job records. In this
425 case,  information will be available about the jobs that ran, but not the 
426 details of the files that were backed up. Normally, when a Job  record is
427 purged, all its File records will also be purged. 
428
429 The  Volume Retention Period is the minimum of time that a Volume will be 
430 kept before it is reused. Bacula will normally never  overwrite a Volume that
431 contains the only backup copy of a file.  Under ideal conditions, the Catalog
432 would retain entries for all  files backed up for all current Volumes. Once a
433 Volume is  overwritten, the files that were backed up on that Volume are 
434 automatically removed from the Catalog. However, if there is a very  large
435 pool of Volumes or a Volume is never overwritten, the Catalog  database may
436 become enormous. To keep the Catalog to a manageable  size, the backup
437 information should be removed from the Catalog after  the defined File Retention
438 Period. Bacula provides the  mechanisms for the catalog to be automatically
439 pruned according to  the retention periods defined. 
440
441 \item [Scan]
442    \index[sd]{Scan }
443    A Scan operation causes the contents of a Volume or a  series of Volumes to be
444 scanned. These Volumes with the information  on which files they contain are
445 restored to the Bacula Catalog.  Once the information is restored to the
446 Catalog, the files contained  on those Volumes may be easily restored. This
447 function is  particularly useful if certain Volumes or Jobs have exceeded 
448 their retention period and have been pruned or purged from the  Catalog.
449 Scanning data from Volumes into the Catalog is done  by using the {\bf bscan}
450 program. See the 
451 \ilink{ bscan section}{bscan} of the Bacula Utilities Chapter of
452 this manual  for more details. 
453
454 \item [Volume]
455    \index[sd]{Volume }
456    A Volume is an archive unit, normally a tape or  a named disk file where
457 Bacula stores the data from one or more  backup jobs. All Bacula Volumes have
458 a software label written to  the Volume by Bacula so that it identifies what
459 Volume it is really  reading. (Normally there should be no confusion with disk
460 files,  but with tapes, it is easy to mount the wrong one). 
461 \end{description}
462
463 \subsection*{What Bacula is Not}
464 \index[general]{Not!What Bacula is }
465 \index[general]{What Bacula is Not }
466 \addcontentsline{toc}{subsection}{What Bacula is Not}
467
468 {\bf Bacula} is a backup, restore and verification program and is not a
469 complete disaster recovery system in itself, but it can be a key part of one
470 if you plan carefully and follow the instructions included in the 
471 \ilink{ Disaster Recovery}{_ChapterStart38} Chapter of this manual. 
472
473 With proper planning, as mentioned in the Disaster Recovery chapter {\bf
474 Bacula} can be a central component of your disaster recovery system. For
475 example, if you have created an emergency boot disk, a Bacula Rescue disk to
476 save the current partitioning information of your hard disk, and maintain a
477 complete Bacula backup, it is possible to completely recover your system from
478 "bare metal" that is starting from an empty disk. 
479
480 If you have used the {\bf WriteBootstrap} record in your job or some other
481 means to save a valid bootstrap file, you will be able to use it to extract
482 the necessary files (without using the catalog or manually searching for the
483 files to restore). 
484
485 \subsection*{Interactions Between the Bacula Services}
486 \index[general]{Interactions Between the Bacula Services }
487 \index[general]{Services!Interactions Between the Bacula }
488 \addcontentsline{toc}{subsection}{Interactions Between the Bacula Services}
489
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. 
494
495 \addcontentsline{lof}{figure}{Interactions between Bacula Services}
496 \includegraphics{./flow.eps}