]> git.sur5r.net Git - bacula/docs/blob - docs/manual/faq.tex
kes Implement grow tool to grow a file for testing very large databases.
[bacula/docs] / docs / manual / faq.tex
1 %%
2 %%
3 % TODO: maybe merge all this FAQ in with the appropriate section?
4 % TODO: and use detailed indexing to help reader
5
6 \chapter{Bacula Frequently Asked Questions}
7 \label{FaqChapter}
8 \index[general]{Questions!Bacula Frequently Asked }
9 \index[general]{Bacula Frequently Asked Questions }
10
11 These are questions that have been submitted over time by the
12 Bacula users. The following
13 FAQ is very useful, but it is not always up to date 
14 with newer information, so after reading it, if you don't find what you 
15 want, you might try the following wiki maintained by Frank Sweetser, which
16 contains more than just a FAQ:
17 \elink{http://paramount.ind.wpi.edu/wiki/}{http://paramount.ind.wpi.edu/wiki/}
18 or go directly to his FAQ at: 
19 \elink{http://paramount.ind.wpi.edu/wiki/doku.php?id=faq}{http://paramount.ind.wpi.edu/wiki/doku.php?id=faq}.
20
21 Please also see
22 \ilink{the bugs section}{BugsChapter} of this document for a list
23 of known bugs and solutions.
24
25 \begin{description}
26 \label{what}
27 \section{What is Bacula?}
28 \item [What is {\bf Bacula}? ]
29    \index[general]{What is Bacula? }
30    {\bf Bacula} is a network backup and restore program. 
31
32 \section{Does Bacula support Windows?}
33 \item [Does Bacula support Windows?]
34 \index[general]{Does Bacula support Windows? }
35    Yes, Bacula compiles and runs on Windows machines (Win98, WinMe, WinXP,
36    WinNT, Win2003, and Win2000).  We provide a binary version of the Client
37    (bacula-fd), but have not tested the Director nor the Storage daemon.
38    Note, Win95 is no longer supported because it doesn't have the
39    GetFileAttributesExA API call.
40  
41
42 \label{lang}
43 \section{What language is Bacula written in?}
44 \item [What language is Bacula written in?]
45 \index[general]{What language is Bacula written in? }
46    It is written in C++, but it is mostly C  code using only a limited set of
47    the C++ extensions  over C.  Thus Bacula is completely  compiled using the
48    C++ compiler. There are several modules, including the Win32 interface, that
49    are written using the  object oriented C++ features. Over time, we are slowly
50    adding a larger  subset of C++.  
51
52 \label{run}
53 \section{On what machines does Bacula run?}
54 \item [On what machines does Bacula run? ]
55    \index[general]{On what machines does Bacula run? }
56    {\bf Bacula} builds and executes on Red Hat Linux (versions RH7.1-RHEL
57    4.0, Fedora, SuSE, Gentoo, Debian, Mandriva, ...), FreeBSD, Solaris,
58    Alpha, SGI (client), NetBSD, OpenBSD, Mac OS X (client), and Win32.
59
60    Bacula has been my only backup tool for over seven years backing up 8
61    machines nightly (6 Linux boxes running SuSE, previously
62    Red Hat and Fedora, a WinXP machine, and a WinNT machine).
63  
64
65 \label{stable}
66 \section{Is Bacula Stable?}
67 \item [Is Bacula Stable? ]
68 \index[general]{Is Bacula Stable? }
69    Yes, it is remarkably stable, but remember, there are still a lot of
70    unimplemented or partially implemented features.  With a program of this
71    size (150,000+ lines of C++ code not including the SQL programs) there
72    are bound to be bugs.  The current test environment (a twisted pair
73    local network and a HP DLT backup tape) is not exactly ideal, so
74    additional testing on other sites is necessary.  The File daemon has
75    never crashed -- running months at a time with no intervention.  The
76    Storage daemon is remarkably stable with most of the problems arising
77    during labeling or switching tapes.  Storage daemon crashes are rare
78    but running multiple drives and simultaneous jobs sometimes (rarely)
79    problems.
80    The Director, given the multitude of functions it fulfills is also
81    relatively stable.  In a production environment, it rarely if ever
82    crashes.  Of the three daemons, the Director is the most prone to having
83    problems.  Still, it frequently runs several months with no problems.
84
85    There are a number of reasons for this stability.  
86
87    \begin{enumerate}
88    \item  The program is constantly checking the chain of allocated
89       memory buffers to ensure that no overruns have occurred.  \\
90    \item All  memory leaks (orphaned buffers) are reported each time the
91       program  terminates.\\
92    \item Any signal (segmentation fault, ...) generates a 
93       traceback that is emailed to the developer.  This permits quick
94       resolution of bugs even if they only show up rarely in a production
95       system.\\
96    \item There is a reasonably comprehensive set of regression tests
97       that avoids re-creating the most common errors in new versions of
98       Bacula.
99    \end{enumerate}
100
101 \label{AuthorizationErrors}
102 \section{I'm Getting Authorization Errors. What is Going On? }
103 \item [I'm Getting Authorization Errors. What is Going On? ]
104 \index[general]{Authorization Errors}
105 \index[general]{Concurrent Jobs}
106    For security reasons, Bacula requires that both  the File daemon and the
107    Storage daemon know the name  of the Director as well as its password. As a
108    consequence,  if you change the Director's name or password, you must  make
109    the corresponding change in the Storage daemon's and  in the File daemon's
110    configuration files.  
111
112    During the authorization process, the Storage daemon and File daemon
113    also require that the Director authenticates itself, so both ends
114    require the other to have the correct name and password.
115
116    If you have edited the conf files and modified any name or any password,
117    and you are getting authentication errors, then your best bet is to go
118    back to the original conf files generated by the Bacula installation
119    process.  Make only the absolutely necessary modifications to these
120    files -- e.g.  add the correct email address.  Then follow the
121    instructions in the \ilink{ Running Bacula}{TutorialChapter} chapter of
122    this manual.  You will run a backup to disk and a restore.  Only when
123    that works, should you begin customization of the conf files.
124
125    Another reason that you can get authentication errors is if you are
126    running Multiple Concurrent Jobs in the Director, but you have not set
127    them in the File daemon or the Storage daemon.  Once you reach their
128    limit, they will reject the connection producing authentication (or
129    connection) errors.
130
131    If you are having problems connecting to a Windows machine that
132    previously worked, you might try restarting the Bacula service since
133    Windows frequently encounters networking connection problems.
134
135    Some users report that authentication fails if there is not a proper
136    reverse DNS lookup entry for the machine.  This seems to be a
137    requirement of gethostbyname(), which is what Bacula uses to translate
138    names into IP addresses.  If you cannot add a reverse DNS entry, or you
139    don't know how to do so, you can avoid the problem by specifying an IP
140    address rather than a machine name in the appropriate Bacula conf file.
141
142    Here is a picture that indicates what names/passwords in which
143    files/Resources must match up:
144
145    \includegraphics{./Conf-Diagram.eps}  
146
147    In the left column, you will find the Director, Storage, and  Client
148    resources, with their names and passwords -- these  are all in {\bf
149    bacula-dir.conf}. The right column is where the corresponding values
150    should be found in the  Console, Storage daemon (SD), and File daemon (FD)
151    configuration  files.  
152
153    Another thing to check is to ensure that the Bacula component you are
154    trying to access has {\bf Maximum Concurrent Jobs} set large enough to
155    handle each of the Jobs and the Console that want to connect
156    simultaneously.  Once the maximum connections has been reached, each
157    Bacula component will reject all new connections.
158
159    Finally, make sure you have no {\bf hosts.allow} or {\bf hosts.deny}
160    file that is not permitting access to the site trying to connect.
161
162 \label{AccessProblems}
163 \section{Bacula Runs Fine but Cannot Access a Client on a Different Machine.
164    Why? }
165 \item [Bacula Runs Fine but Cannot Access a Client on a Different Machine.
166    Why? ]
167 \index[general]{Cannot Access a Client}
168    There are several reasons why Bacula could not contact a client  on a
169    different machine. They are:  
170
171 \begin{itemize}
172 \item It is a Windows Client, and the client died because of an  improper
173    configuration file. Check that the Bacula icon is in  the system tray and the
174    the menu items work. If the client has  died, the icon will disappear only
175    when you move the mouse over  the icon.  
176 \item The Client address or port is incorrect or not resolved by  DNS. See if
177    you can ping the client machine using the same  address as in the Client
178    record.  
179 \item You have a firewall, and it is blocking traffic on port  9102 between
180    the Director's machine and the Client's  machine (or on port 9103 between the
181    Client and the Storage daemon  machines).  
182 \item Your password or names are not correct in both the Director and  the
183    Client machine. Try configuring everything identical to  how you run the
184    client on the same machine as the Director, but  just change the Address. If
185    that works, make the other changes  one step at a time until it works.  
186 \item You may also be having problems between your File daemon and your
187    Storage daemon. The name you use in the Storage resource of your
188    Director's conf file must be known (resolvable) by the File daemon, 
189    because it is passed symbolically to the File daemon, which then
190    resolves it to get an IP address used to contact the Storage daemon.
191 \item You may have a {\bf hosts.allow} or {\bf hosts.deny} file that is
192    not permitting access.
193 \end{itemize}
194
195 \label{startover}
196 \section{My Catalog is Full of Test Runs, How Can I Start Over?}
197 \item [My Catalog is Full of Test Runs, How Can I Start Over? ]
198   \index[general]{My Catalog is Full of Test Runs, How Can I Start Over? }
199   If you are using MySQL do the following:
200
201 \footnotesize
202 \begin{verbatim}
203    cd <bacula-source>/src/cats
204    ./drop_mysql_tables
205    ./make_mysql_tables
206  
207 \end{verbatim}
208 \normalsize
209
210 If you are using SQLite, do the following:
211
212 \footnotesize
213 \begin{verbatim}
214    Delete bacula.db from your working directory.
215    cd <bacula-source>/src/cats
216    ./drop_sqlite_tables
217    ./make_sqlite_tables
218  
219 \end{verbatim}
220 \normalsize
221
222 Then write an EOF on each tape you used with {\bf Bacula} using: 
223
224 \footnotesize
225 \begin{verbatim}
226 mt -f /dev/st0 rewind
227 mt -f /dev/st0 weof
228 \end{verbatim}
229 \normalsize
230
231 where you need to adjust the device name for your system.  
232
233 \label{restorehang}
234 \section{I Run a Restore Job and Bacula Hangs. What do I do?}
235 \item [I Run a Restore Job and Bacula Hangs. What do I do?]
236 \index[general]{I Run a Restore Job and Bacula Hangs. What do I do? }
237    On Bacula version 1.25 and prior, it expects you to have the correct
238    tape mounted prior to a restore.  On Bacula version 1.26 and higher, it
239    will ask you for the tape, and if the wrong one is mounted, it will
240    inform you.
241
242    If you have previously done an {\bf unmount} command, all Storage daemon
243    sessions (jobs) will be completely blocked from using the drive
244    unmounted, so be sure to do a {\bf mount} after your unmount.  If in
245    doubt, do a second {\bf mount}, it won't cause any harm.
246
247 \label{windowstart}
248 \section{I Cannot Get My Windows Client to Start Automatically? }
249 \item [I Cannot Get My Windows Client to Start Automatically? ]
250 \index[general]{Windows Auto Start}
251    You are probably having one of two problems: either the Client is dying
252    due to an incorrect configuration file, or you didn't do the
253    Installation commands necessary to install it as a Windows Service.
254
255    For the first problem, see the next FAQ question.  For the second
256    problem, please review the \ilink{ Windows Installation
257    instructions}{Win32Chapter} in this manual.
258
259 \label{windowsdie}
260 \section{My Windows Client Immediately Dies When I Start It}
261 \item [My Windows Client Immediately Dies When I Start It]
262 \index[general]{Windows Client Dies}
263 The most common problem is either that the configuration file is not where
264 it expects it to be, or that there is an error in the configuration file.
265 You must have the configuration file in {\bf
266 c:\textbackslash{}bacula\textbackslash{}bin\textbackslash{}bacula-fd.conf}.
267
268 To {\bf see} what is going on when the File daemon starts  on Windows, do the
269 following:  
270
271 \footnotesize
272 \begin{verbatim}
273     Start a DOS shell Window.
274     cd c:\bacula\bin
275     bacula-fd -d100 -c c:\bacula\bin\bacula-fd.conf
276     
277 \end{verbatim}
278 \normalsize
279
280 This will cause the FD to write a file {\bf bacula.trace}  in the current
281 directory, which you can examine and thereby determine  the problem.  
282
283 \label{scroll}
284 \item [When I Start the Console, the Error Messages Fly By. How can I see
285    them? ]
286 \index[general]{Error Messages}
287    Either use a shell window with a scroll bar, or use the gnome-console.
288    In any case, you probably should be logging all output to a file, and
289    then you can simply view the file using an editor or the {\bf less}
290    program.  To log all output, I have the following in my Director's
291    Message resource definition:
292
293 \footnotesize
294 \begin{verbatim}
295     append = "/home/kern/bacula/bin/log" = all, !skipped
296     
297 \end{verbatim}
298 \normalsize
299
300 Obviously you will want to change the filename to be appropriate  for your
301 system.  
302
303 \label{nobackup}
304 \section{My backups are not working on my Windows 
305    Client. What should I do?}
306 \item [I didn't realize that the backups were not working on my Windows 
307    Client. What should I do? ]
308 \index[general]{Backups Failing}
309 You should be sending yourself an email message for each job. This will  avoid
310 the possibility of not knowing about a failed backup. To do so  put something
311 like:  
312
313 \footnotesize
314 \begin{verbatim}
315   Mail = yourname@yourdomain = all, !skipped
316   
317 \end{verbatim}
318 \normalsize
319
320 in your Director's message resource.  You should then receive one email for
321 each Job that ran.  When you are comfortable with what is going on (it took
322 me 9 months), you might change that to:
323
324 \footnotesize
325 \begin{verbatim}
326    MailOnError = yourname@yourdomain = all, !skipped
327    
328 \end{verbatim}
329 \normalsize
330
331 then you only get email messages when a Job errors as is the case  for your
332 Windows machine.  
333
334 You should also be logging the Director's messages, please see the  previous
335 FAQ for how to do so.  
336
337 \label{sched}
338 \section{All my Jobs are scheduled for the same time. Will this cause
339    problems?}
340 \item [All my Jobs are scheduled for the same time. Will this cause
341    problems? ]
342 \index[general]{Schedule problems}
343    No, not at all.  Bacula will schedule all the Jobs at the same time, but
344    will run them one after another unless you have increased the number of
345    simultaneous jobs in the configuration files for the Director, the File
346    daemon, and the Storage daemon.  The appropriate configuration record is
347    {\bf Maximum Concurrent Jobs = nn}.  At the current time, we recommend
348    that you leave this set to {\bf 1} for the Director.
349
350 \label{disk}
351 \section{Can Bacula Backup My System To Files instead of Tape?}
352 \item [Can Bacula Backup My System To Files instead of Tape? ]
353 \index[general]{Backup to Disk}
354    Yes, in principle, Bacula can backup to any storage medium as long as
355    you have correctly defined that medium in the Storage daemon's Device
356    resource.  For an example of how to backup to files, please see the
357    \ilink{Pruning Example}{PruningExample} in the Recycling chapter of this
358    manual.  Also, there is a whole chapter devoted to \ilink{Basic Volume
359    Management}{DiskChapter}.  This chapter was originally written to
360    explain how to write to disk, but was expanded to include volume
361    management.  It is, however, still quite a good chapter to read.
362
363 \label{testbackup}
364 \section{Can I use a dummy device to test the backup?}
365    Yes, to have a {\sl Virtual} device which just consumes data, you can use a 
366    FIFO device (see \ilink{Stored configuration}{SetupFifo}).
367    It's useful to test a backup.
368 \footnotesize
369 \begin{verbatim}
370 Device {
371   Name = NULL
372   Media Type = NULL
373   Device Type = Fifo
374   Archive Device = /dev/null
375   LabelMedia = yes
376   Random Access = no
377   AutomaticMount = no
378   RemovableMedia = no
379   MaximumOpenWait = 60
380   AlwaysOpen = no
381 }
382 \end{verbatim}
383 \normalsize
384
385 \label{bigfiles}
386 \section{Can Bacula Backup and Restore Files Bigger than 2 Gigabytes?}
387 \item [Can Bacula Backup and Restore Files Bigger than 2 Gigabytes?]
388 \index[general]{Large file support}
389 If your operating system permits it, and you are running Bacula version
390 1.26 or later, the answer is yes.  To the best of our knowledge all client
391 system supported by Bacula can handle files bigger 2 Gigabytes.
392
393 \label{cancel}
394 \section{I want to stop a job.}
395 %% Is there  a better way than "./bacula stop" to stop it?}
396 \item [I Started A Job then Decided I Really Did Not Want to Run It. Is
397    there  a better way than {\bf ./bacula stop} to stop it?]
398 \index[general]{Cancelling jobs} 
399    Yes, you normally should use the Console command {\bf cancel} to cancel
400    a Job that is either scheduled or running.  If the Job is scheduled, it
401    will be marked for cancellation and will be canceled when it is
402    scheduled to start.  If it is running, it will normally terminate after
403    a few minutes.  If the Job is waiting on a tape mount, you may need to
404    do a {\bf mount} command before it will be canceled.
405
406 \label{trademark}
407 \section{Why have You Trademarked the Name Bacula?}
408 \item [Why have You Trademarked the Name
409    Bacula\raisebox{.6ex}{{\footnotesize \textsuperscript{\textregistered}}}?]
410 \index[general]{Bacula Trademark}
411 We have trademarked the name Bacula to ensure that all media  written by any
412 program named Bacula will always be compatible. Anyone  may use the name
413 Bacula, even in a derivative product as long as it  remains totally compatible
414 in all respects with the program defined  here.
415
416 \label{docversion}
417 \section{Why is the Online Document for Version 1.39 but the Released Version is 1.38?}
418 \item [Why is the Online Document for Version 1.39 of Bacula when the
419    Current Version is 1.38?]
420 \index[general]{Multiple manuals}
421 As Bacula is being developed, the document is also being enhanced, more
422 often than not it has clarifications of existing features that can be very
423 useful to our users, so we publish the very latest document.  Fortunately
424 it is rare that there are confusions with new features.
425
426 If you want to read a document that pertains only to a specific  version,
427 please use the one distributed in the source code.  The web site also has 
428 online versions of both the released manual and the current development
429 manual.
430
431 \label{sure}
432 \section{Does Bacula really save and restore all files?}
433 \item [How Can I Be Sure that Bacula Really Saves and Restores All Files? ]
434 \index[general]{Checking Restores}
435    It is really quite simple, but took me a while to figure
436    out how to "prove" it.  First make a Bacula Rescue disk, see the
437    \ilink{Disaster Recovery Using Bacula}{RescueChapter} chapter
438    of this manual.
439    Second, you run a full backup of all your files on all partitions.
440    Third, you run an Verify InitCatalog Job on the same FileSet, which
441    effectively makes a record of all the files on your system.  Fourth, you
442    run a Verify Catalog job and assure yourself that nothing has changed
443    (well, between an InitCatalog and Catalog one doesn't expect anything).
444    Then do the unthinkable, write zeros on your MBR (master boot record)
445    wiping out your hard disk.  Now, restore your whole system using your
446    Bacula Rescue disk and the Full backup you made, and finally re-run the
447    Verify Catalog job.  You will see that with the exception of the
448    directory modification and access dates and the files changed during the
449    boot, your system is identical to what it was before you wiped your hard
450    disk.
451    Alternatively you could do the wiping and restoring to another computer
452    of the same type.
453
454 \label{upgrade}
455 \section{I want an Incremental but Bacula runs it as a Full backup. Why?}
456 \item [I did a Full backup last week, but now in running an Incremental,
457    Bacula  says it did not find a FULL backup, so it did a FULL backup. Why?]
458 \index[general]{FULL backup not found}
459    Before doing an Incremental or a Differential
460    backup, Bacula checks to see if there was a prior Full backup of the
461    same Job that terminated successfully.  If so, it uses the date that
462    full backup started as the time for comparing if files have changed.  If
463    Bacula does not find a successful full backup, it proceeds to do one.
464    Perhaps you canceled the full backup, or it terminated in error.  In
465    such cases, the full backup will not be successful.  You can check by
466    entering {\bf list jobs} and look to see if there is a prior Job with
467    the same Name that has Level F and JobStatus T (normal termination).
468
469    Another reason why Bacula may not find a suitable Full backup is that
470    every time you change the FileSet, Bacula will require a new Full
471    backup.  This is necessary to ensure that all files are properly backed
472    up in the case where you have added more files to the FileSet.
473    Beginning with version 1.31, the FileSets are also dated when they are
474    created, and this date is displayed with the name when you are listing
475    or selecting a FileSet.  For more on backup levels see below.
476
477 \label{filenamelengths}
478 \section{Do you really handle unlimited path lengths?}
479 \item [How Can You Claim to Handle Unlimited Path and Filename Lengths
480    when  All Other Programs Have Fixed Limits?]
481 \index[general]{Path and Filename Lengths} 
482    Most of those other programs have been around for a long time, in fact
483    since the beginning of Unix, which means that they were designed for
484    rather small fixed length path and filename lengths.  Over the years,
485    these restrictions have been relaxed allowing longer names.  Bacula on
486    the other hand was designed in 2000, and so from the start, Path and
487    Filenames have been kept in buffers that start at 256 bytes in length,
488    but can grow as needed to handle any length.  Most of the work is
489    carried out by lower level routines making the coding rather easy.
490
491    Note that due to limitations Win32 path and filenames cannot exceed
492    260 characters. By using Win32 Unicode functions, we will remove this
493    restriction in later versions of Bacula.
494
495 \label{unique}
496 \section{What Is the Really Unique Feature of Bacula?}
497 \item [What Is the Really Unique Feature of Bacula?]
498 \index[general]{Unique Feature of Bacula} 
499    Well, it is hard to come up with unique features when backup programs
500    for Unix machines have been around since the 1960s.  That said, I
501    believe that Bacula is the first and only program to use a standard SQL
502    interface to catalog its database.  Although this adds a bit of
503    complexity and possibly overhead, it provides an amazingly rich set of
504    features that are easy to program and enhance.  The current code has
505    barely scratched the surface in this regard (version 1.38).
506
507    The second feature, which gives a lot of power and flexibility to Bacula
508    is the Bootstrap record definition.
509
510    The third unique feature, which is currently (1.30) unimplemented, and
511    thus can be called vaporware :-), is Base level saves.  When
512    implemented, this will enormously reduce tape usage.
513
514 \label{sequence}
515 \section{How can I force one job to run after another?}
516 \item [If I Run Multiple Simultaneous Jobs, How Can I Force One
517    Particular  Job to Run After Another Job? ]
518 \index[general]{Multiple Simultaneous Jobs}
519 Yes, you can set Priorities on your jobs so that they  run in the order you
520 specify. Please see:  
521 \ilink{the Priority record}{Priority} in the  Job resource.
522
523 \label{nomail}
524 \section{I Am Not Getting Email Notification, What Can I Do? }
525 \item [I Am Not Getting Email Notification, What Can I Do? ]
526 \index[general]{No Email Notification}
527    The most common problem is that you have not specified a fully qualified
528    email address and your bsmtp server is rejecting the mail.  The next
529    most common problem is that your bsmtp server doesn't like the syntax on
530    the From part of the message.  For more details on this and other
531    problems, please see the \ilink{ Getting Email Notification to
532    Work}{email} section of the Tips chapter of this manual.  The section
533    \ilink{ Getting Notified of Job Completion}{notification} of the Tips
534    chapter may also be useful.  For more information on the {\bf bsmtp}
535    mail program, please see \ilink{bsmtp in the Volume Utility Tools
536    chapter}{bsmtp} of this manual.
537
538 \label{periods}
539 \section{My retention periods don't work}
540 \item [I Change Recycling, Retention Periods, or File Sizes in my Pool
541    Resource  and they Still Don't Work.]
542 \index[general]{Recycling}
543 \index[general]{Retention Periods}
544 \index[general]{Pool changes}
545   The different variables associated with a Pool are defined in the  Pool
546   Resource, but are actually read by Bacula from the Catalog database.  On
547   Bacula versions prior to 1.30, after changing your Pool Resource,  you must
548   manually update the corresponding values in the Catalog by  using the {\bf
549   update pool} command in the Console program. In Bacula  version 1.30, Bacula
550   does this for you automatically every time it  starts.  
551   
552   When Bacula creates a Media record (Volume), it uses many default  values from
553   the Pool record. If you subsequently change the Pool  record, the new values
554   will be used as a default for the next Volume  that is created, but if you
555   want the new values to apply to existing  Volumes, you must manually update
556   the Volume Catalog entry using  the {\bf update volume} command in the Console
557   program. 
558
559 \label{CompressionNotWorking}
560 \section{Why aren't my files compressed?}
561 \item [I Have Configured Compression On, But None of My Files Are
562    Compressed.  Why?]
563 \index[general]{Compression}
564    There are two kinds of compression. One is tape compression. This  is done by
565    the tape drive hardware, and you either enable or disable  it with system
566    tools such as {\bf mt}. This compression works  independently of Bacula,  
567    and when it is enabled, you should not use the Bacula software 
568    compression.
569    
570    Bacula also has software compression code in the File daemons, which you
571    normally need to enable only when backing up to file Volumes.  There are
572    two conditions necessary to enable the Bacula software compression.
573
574 \begin{enumerate}
575 \item You must have the zip development libraries loaded on your system
576    when building Bacula and Bacula must find this library, normally {\bf
577    /usr/lib/libz.a}.  On Red Hat systems, this library is provided by the
578    {\bf zlib-devel} rpm.
579
580    If the library is found by Bacula during the {\bf ./configure} it will
581    be mentioned in the {\bf config.out} line by:
582
583 \footnotesize
584 \begin{verbatim}
585     ZLIB support:  yes
586           
587 \end{verbatim}
588 \normalsize
589
590 \item You must add the {\bf compression=gzip} option on your  Include
591    statement in the Director's configuration file.  
592 \end{enumerate}
593
594 \label{NewTape}
595 \item [Bacula is Asking for a New Tape After 2 GB of Data but My Tape
596    holds 33 GB. Why?]
597 \index[general]{Tape capacity}
598 There are several reasons why Bacula will request a new tape.  
599
600 \begin{itemize}
601 \item There is an I/O error on the tape. Bacula prints an error message  and
602    requests a new tape. Bacula does not attempt to continue writing  after an
603    I/O error.  
604 \item Bacula encounters and end of medium on the tape. This is not always 
605    distinguishable from an I/O error.  
606 \item You have specifically set some size limitation on the tape. For  example
607    the {\bf Maximum Volume Bytes} or {\bf Maximum Volume Files}  in the
608    Director's Pool resource, or {\bf Maximum Volume Size} in  the Storage
609    daemon's Device resource.  
610 \end{itemize}
611
612 \label{LevelChanging}
613 \section{Incremental backups are not working}
614 \item [Bacula is Not Doing the Right Thing When I Request an Incremental
615    Backup. Why?]
616 \index[general]{Incremental backups}
617    As explained in one of the previous questions, Bacula will automatically
618    upgrade an Incremental or Differential job to a Full backup if it cannot
619    find a prior Full backup or a suitable Full backup.  For the gory
620    details on how/when Bacula decides to upgrade levels please see the
621    \ilink{Level record}{Level} in the Director's configuration chapter of
622    this manual.
623    
624    If after reading the above mentioned section, you believe that Bacula  is not
625    correctly handling the level (Differential/Incremental),  please send us the
626    following information for analysis:  
627
628 \begin{itemize}
629 \item Your Director's configuration file.  
630 \item The output from {\bf list jobs} covering the period where you  are
631    having the problem.  
632 \item The Job report output from the prior Full save (not critical).  
633 \item An {\bf llist jobid=nnn} where nnn is the JobId of the prior  Full save.
634  
635 \item The Job report output from the save that is doing the  wrong thing (not
636    critical).  
637 \item An {\bf llist jobid=nnn} where nnn is the JobId of the job  that was not
638    correct.  
639 \item An explanation of what job went wrong and why you think it did.  
640    \end{itemize}
641
642 The above information can allow us to analyze what happened, without it, 
643 there is not much we can do.  
644
645 \label{WaitForever}
646 \section{I am waiting forever for a backup of an offsite machine}
647 \item [I am Backing Up an Offsite Machine with an Unreliable Connection.
648    The  Director Waits Forever for the Client to Contact the SD. What Can  I
649    Do?]
650 \index[general]{Backing Up Offsite Machines}
651    Bacula was written on the assumption that it will have a good TCP/IP
652    connection between all the daemons.  As a consequence, the current
653    Bacula doesn't deal with faulty connections very well.  This situation
654    is slowly being corrected over time.
655    
656    There are several things you can do to improve the situation.  
657
658 \begin{itemize}
659 \item Upgrade to version 1.32 and use the new SDConnectTimeout record.  For
660    example, set:  
661
662 \footnotesize
663 \begin{verbatim}
664           SD Connect Timeout = 5 min
665           
666 \end{verbatim}
667 \normalsize
668
669 in the FileDaemon resource.  
670 \item Run these kinds of jobs after all other jobs.  
671    \end{itemize}
672
673 \label{sshHanging}
674 \section{SSH hangs forever after starting Bacula}
675 \item [When I ssh into a machine and start Bacula then attempt to exit, 
676    ssh hangs forever.]
677 \index[general]{ssh hangs}
678    This happens because Bacula leaves stdin, stdout, and stderr open for
679    debug purposes.  To avoid it, the simplest thing to do is to redirect
680    the output of those files to {\bf /dev/null} or another file in your
681    startup script (the Red Hat autostart scripts do this automatically).
682    For example, you start the Director with:
683    
684 \footnotesize
685 \begin{verbatim}
686     bacula-dir -c bacula-dir.conf ... 0>\&1 2>\&1 >/dev/null
687     
688 \end{verbatim}
689 \normalsize
690
691 and likewise for the other daemons.  
692
693 \label{RetentionPeriods}
694 \section{I'm confused by retention periods}
695 \item [I'm confused by the different Retention periods: File Retention, 
696    Job Retention, Volume Retention. Why are there so many?]
697 \index[general]{Retention Periods}
698    Yes, this certainly can be confusing.  The basic reason for so many is
699    to allow flexibility.  The File records take quite a lot of space in the
700    catalog, so they are typically records you want to remove rather
701    quickly.  The Job records, take very little space, and they can be
702    useful even without the File records to see what Jobs actually ran and
703    when.  One must understand that if the File records are removed from the
704    catalog, you cannot use the {\bf restore} command to restore an
705    individual file since Bacula no longer knows where it is.  However, as
706    long as the Volume Retention period has not expired, the data will still
707    be on the tape, and can be recovered from the tape.
708    
709    For example, I keep a 30 day retention period for my Files to keep my
710    catalog from getting too big, but I keep my tapes for a minimum of one
711    year, just in case.
712
713 \label{MaxVolumeSize}
714 \section{MaxVolumeSize is ignored}
715 \item [Why Does Bacula Ignore the MaxVolumeSize Set in my Pool?]
716 \index[general]{MaxVolumeSize}
717    The MaxVolumeSize that Bacula uses comes from the Media record, so most
718    likely you changed your Pool, which is used as the default for creating
719    Media records, {\bf after} you created your Volume.  Check what is in
720    the Media record by doing:
721
722 \footnotesize
723 \begin{verbatim}
724 llist Volume=xxx
725 \end{verbatim}
726 \normalsize
727
728 If it doesn't have the right value, you can use: 
729
730 \footnotesize
731 \begin{verbatim}
732 update Volume=xxx
733 \end{verbatim}
734 \normalsize
735
736 to change it.  
737
738 \label{ConnectionRefused}
739 \section{I get a Connection refused when connecting to my Client}
740 \item [In connecting to my Client, I get "ERR:Connection Refused.  Packet
741    Size too big from File daemon:192.168.1.4:9102" Why?]
742 \index[general]{ERR:Connection Refused}
743    This is typically a communications error resulting  from one of the
744    following:
745  
746
747 \begin{itemize}
748 \item Old versions of Bacula, usually a Win32 client, where two  threads were
749    using the same I/O packet. Fixed in more recent  versions. Please upgrade.  
750 \item Some other program such as an HP Printer using the same  port (9102 in
751    this case).  
752 \end{itemize}
753
754 If it is neither of the above, please submit a bug report at  
755 \elink{bugs.bacula.org}{http://bugs.bacula.org}.  
756
757 Another solution might be to run the daemon with the debug  option by:  
758
759 \footnotesize
760 \begin{verbatim}
761     Start a DOS shell Window.
762     cd c:\bacula\bin
763     bacula-fd -d100 -c c:\bacula\bin\bacula-fd.conf
764     
765 \end{verbatim}
766 \normalsize
767
768 This will cause the FD to write a file {\bf bacula.trace}  in the current
769 directory, which you can examine to determine  the problem.  
770
771 \section{Long running jobs die with Pipe Error}
772 \item [During long running jobs my File daemon dies with Pipe Error, or
773        some other communications error. Why?]
774 \index[general]{Communications Errors}
775 \index[general]{Pipe Errors}
776 \index[general]{slow}
777 \index[general]{Backups!slow}
778    There are a number of reasons why a connection might break.
779    Most often, it is a router between your two computers that times out
780    inactive lines (not respecting the keepalive feature that Bacula uses).
781    In that case, you can use the {\bf Heartbeat Interval} directive in
782    both the Storage daemon and the File daemon. 
783
784    In at least one case, the problem has been a bad driver for a Win32
785    NVidia NForce 3 ethernet card with driver (4.4.2 17/05/2004). 
786    In this case, a good driver is (4.8.2.0 06/04/2005).  Moral of
787    the story, make sure you have the latest ethernet drivers
788    loaded, or use the following workaround as suggested by Thomas
789    Simmons for Win32 machines:
790      
791    Browse to:
792    Start \gt{} Control Panel \gt{} Network Connections
793
794    Right click the connection for the nvidia adapter and select properties. 
795    Under the General tab, click "Configure...". Under the Advanced tab set 
796    "Checksum Offload" to disabled and click OK to save the change.  
797
798    Lack of communications, or communications that get interrupted can
799    also be caused by Linux firewalls where you have a rule that throttles
800    connections or traffic.  For example, if you have:
801
802 \footnotesize
803 \begin{verbatim}
804 iptables -t filter -A INPUT -m limit --limit 3/second --limit-burst 3 -j DROP
805 \end{verbatim}
806 \normalsize
807
808    you will want to add the following rules {\bf before} the above rule:
809 \footnotesize
810 \begin{verbatim}
811 iptables -t filter -A INPUT --dport 9101 -j ACCEPT
812 iptables -t filter -A INPUT --dport 9102 -j ACCEPT
813 iptables -t filter -A INPUT --dport 9103 -j ACCEPT
814 \end{verbatim}
815 \normalsize
816    This will ensure that any Bacula traffic will not get terminated because
817    of high usage rates.
818    
819 \section{How to I tell the Job which Volume to use?}
820 \item[I can't figure out how to tell the job which volume to use]
821    \index[general]{What tape to mount}
822   This is an interesting statement. I now see that a number of people new to
823   Bacula have the same problem as you, probably from using programs like tar.
824
825   In fact, you do not tell Bacula what tapes to use.  It is the inverse.  Bacula
826   tells you want tapes it wants.  You put tapes at its disposition and it
827   chooses.  
828
829   Now, if you *really* want to be tricky and try to tell Bacula what to do, it
830   will be reasonable if for example you mount a valid tape that it can use on a
831   drive, it will most likely go ahead and use it.  It also has a documented
832   algorithm for choosing tapes -- but you are asking for problems ...
833
834   So, the trick is to invert your concept of things and put Bacula in charge of
835   handling the tapes.  Once you do that, you will be fine.  If you want to
836   anticipate what it is going to do, you can generally figure it out correctly
837   and  get what you want.  
838
839   If you start with the idea that you are going to force or tell Bacula to use
840   particular tapes or you insist on trying to run in that kind of mode, you will
841   probably not be too happy.
842
843   I don't want to worry about what tape has what data. That is what Bacula is
844   designed for.
845
846   If you have an application where you *really* need to remove a tape each day
847   and  insert a new one, it can be done the directives exist to accomplish that.
848   In such a case, one little "trick" to knowing what tape Bacula will want at
849   2am  while you are asleep is to run a tiny job at 4pm while you are still at
850   work  that backs up say one directory, or even one file. You will quickly find
851   out  what tape it wants, and you can mount it before you go home ... 
852
853 \end{description}