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