Debian Codegraph @

manuals/en/main/general.tex

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