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