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}
11 \ilink{the bugs section}{_ChapterStart4} of this document for a list
12 of known bugs and solutions.
17 \item [What is {\bf Bacula}?
20 \index[dir]{What is Bacula? }
21 {\bf Bacula} is a network backup and restore program.
23 \item [Does Bacula support Windows?
26 \index[dir]{Does Bacula support Windows? }
27 Yes, Bacula compiles and runs on Windows machines (Win98, WinMe, WinXP,
28 WinNT, and Win2000). We provide a binary version of the Client (bacula-fd),
29 but have not tested the Director nor the Storage daemon. Note, Win95 is no
30 longer supported because it doesn't have the GetFileAttributesExA API call.
34 \item [What language is Bacula written in?
37 \index[fd]{What language is Bacula written in? }
38 It is written in C++, but it is mostly C code using only a limited set of the
39 C++ extensions over C. Thus Bacula is completely compiled using the C++
40 compiler. There are several modules, including the Win32 interface that are
41 written using the object oriented C++ features. Over time, we are slowly
42 adding a larger subset of C++.
46 \item [On what machines does Bacula run?
49 \index[fd]{On what machines does Bacula run? }
50 {\bf Bacula} builds and executes on RedHat Linux (versions RH7.1-RHEL 3.0,
51 SuSE, Gentoo, Debian, Mandrake, ...), FreeBSD, Solaris, Alpha, SGI (client),
52 NetBSD, OpenBSD, Mac OS X (client), and Win32 (client).
54 Bacula has been my only backup tool for over four years backing up 5 machines
55 nightly (3 Linux boxes running RedHat, a WinXP machine, and a WinNT machine).
60 \item [Is Bacula Stable?
63 \index[fd]{Is Bacula Stable? }
64 Yes, it is remarkably stable, but remember, there are still a lot of
65 unimplemented or partially implemented features. With a program of this size
66 (100,000+ lines of C++ code not including the SQL programs) there are bound
67 to be bugs. The current test environment (a twisted pair local network and a
68 HP DLT backup tape) is rather ideal, so additional testing on other sites is
69 necessary. The File daemon has never crashed -- running months at a time with
70 no intervention. The Storage daemon is remarkably stable with most of the
71 problems arising during labeling or switching tapes. Storage daemon crashes
72 are rare. The Director, given the multitude of functions it fulfills is also
73 relatively stable. In a production environment, it rarely if ever crashes. Of
74 the three daemons, the Director is the most prone to having problems. It
75 frequently runs several months with no problems.
77 There are a number of reasons for this stability. 1. The program was largely
78 written by one person to date (Kern). 2. The program constantly is checking
79 the chain of allocated memory buffers to ensure that no overruns have
80 occurred. 3. All memory leaks (orphaned buffers) are reported each time the
81 program terminates. 4. Any signal (segmentation fault, ...) generates a
82 traceback that is emailed to the developer. This permits quick resolution of
83 bugs even if they only show up rarely in a production system, 5. There is a
84 reasonably comprehensive set of regression tests that avoids re-creating the
85 most common errors in new versions of Bacula.
86 \label{AuthorizationErrors}
88 \item [I'm Getting Authorization Errors. What is Going On?
91 \index[fd]{I'm Getting Authorization Errors. What is Going On? }
92 For security reasons, Bacula requires that both the File daemon and the
93 Storage daemon know the name of the Director as well as his password. As a
94 consequence, if you change the Director's name or password, you must make
95 the corresponding change in the Storage daemon and in the File daemon
98 During the authorization process, the Storage daemon and File daemon also
99 require that the Director authenticate itself, so both ends require the other
100 to have the correct name and password.
102 If you have edited the conf files and modified any name or any password, and
103 you are getting authentication errors, then your best bet is to go back to
104 the original conf files generated by the Bacula installation process. Make
105 only the absolutely necessary modifications to these files -- e.g. add the
106 correct email address. Then follow the instructions in the
107 \ilink{ Running Bacula}{_ChapterStart1} chapter of this manual. You
108 will run a backup to disk and a restore. Only when that works, should you
109 begin customization of the conf files.
111 Another reason that you can get authentication errors is if you are running
112 Multiple Concurrent Jobs in the Director, but you have not set them in the
113 File daemon or the Storage daemon. Once you reach their limit, they will
114 reject the connection producing authentication (or connection) errors.
116 Here is sort of a picture of what names/passwords in which files/Resources
119 \includegraphics{./Conf-Diagram.eps}
121 In the left column, you will find the Director, Storage, and Client
122 resources, with their names and passwords -- these are all in {\bf
123 bacula-dir.conf}. In the right column are where the corresponding values
124 should be found in the Console, Storage daemon (SD), and File daemon (FD)
127 \label{AccessProblems}
129 \item [Bacula Runs Fine but Cannot Access a Client on a Different Machine.
133 \index[dir]{Bacula Runs Fine but Cannot Access a Client on a Different
135 There are several reasons why Bacula could not contact a client on a
136 different machine. They are:
139 \item It is a Windows Client, and the client died because of an improper
140 configuration file. Check that the Bacula icon is in the system tray and the
141 the menu items work. If the client has died, the icon will disappear only
142 when you move the mouse over the icon.
143 \item The Client address or port is incorrect or not resolved by DNS. See if
144 you can ping the client machine using the same address as in the Client
146 \item You have a firewall, and it is blocking traffic on port 9102 between
147 the Director's machine and the Clients machine (or on port 9103 between the
148 Client and the Storage daemon machines).
149 \item Your password or names are not correct in both the Director and the
150 Client machine. Try configuring everything identical to how you run the
151 client on the same machine as the Director, but just change the Address. If
152 that works, make the other changes one step at a time until it works.
157 \item [My Catalog is Full of Test Runs, How Can I Start Over?
160 \index[dir]{My Catalog is Full of Test Runs, How Can I Start Over? }
161 If you are using MySQL do the following:
165 cd <bacula-source>/src/cats
172 If you are using SQLite, do the following:
176 Delete bacula.db from your working directory.
177 cd <bacula-source>/src/cats
184 Then write an EOF on each tape you used with {\bf Bacula} using:
188 mt -f /dev/st0 rewind
193 where you need to adjust the device name for your system.
197 \item [I Run a Restore Job and Bacula Hangs. What do I do?
200 \index[dir]{I Run a Restore Job and Bacula Hangs. What do I do? }
201 On Bacula version 1.25 and prior, it expects you to have the correct tape
202 mounted prior to a restore. On Bacula version 1.26 and higher, it will ask
203 you for the tape, and if the wrong one it mounted, it will inform you.
205 If you have previously done an {\bf unmount} command, all Storage daemon
206 sessions (jobs) will be completely blocked from using the drive unmounted, so
207 be sure to do a {\bf mount} after your unmount. If in doubt, do a second {\bf
208 mount}, it won't cause any harm.
212 \item [I Cannot Get My Windows Client to Start Automatically?
215 \index[dir]{I Cannot Get My Windows Client to Start Automatically? }
216 You are probably having one of two problems: either the Client is dying due
217 to an incorrect configuration file, or you didn't do the Installation
218 commands necessary to install it as a Windows Service.
220 For the first problem, see the next FAQ question. For the second problem,
222 \ilink{ Windows Installation instructions}{_ChapterStart7} in this
227 \item [My Windows Client Immediately Dies When I Start It
230 \index[dir]{My Windows Client Immediately Dies When I Start It }
231 The most common problem is either that the configuration file is not where it
232 expects it to be, or that there is an error in the configuration file. You
233 must have the configuration file in {\bf
234 c:\textbackslash{}bacula\textbackslash{}bin\textbackslash{}bacula-fd.conf}.
236 To {\bf see} what is going on when the File daemon starts on Windows, do the
241 Start a DOS shell Window.
243 bacula-fd -d100 -c c:\bacula\bin\bacula-fd.conf
248 This will cause the FD to write a file {\bf bacula.trace} in the current
249 directory, which you can examine and determine the problem.
253 \item [When I Start the Console, the Error Messages Fly By. How can I see
257 \index[dir]{When I Start the Console, the Error Messages Fly By. How can I see
259 Either use a shell window with a scroll bar, or use the gnome-console. In any
260 case, you probably should be logging all output to a file, and then you can
261 simply view the file using an editor or the {\bf less} program. To log all
262 output, I have the following in my Director's Message resource definition:
266 append = "/home/kern/bacula/bin/log" = all, !skipped
271 Obviously you will want to change the filename to be appropriate for your
276 \item [I didn't realize that the backups were not working on my Windows
277 Client. What should I do?
280 \index[fd]{I didn't realize that the backups were not working on my Windows
281 Client. What should I do? }
282 You should be sending yourself an email message for each job. This will avoid
283 the possibility of not knowing about a failed backup. To do so put something
288 Mail = yourname@yourdomain = all, !skipped
293 in your Director's message resource. You should then receive one email for
294 each Job that ran. When you are comfortable with what is going on (it took me
295 9 months), you might change that to:
299 MailOnError = yourname@yourdomain = all, !skipped
304 then you only get email messages when a Job errors as is the case for your
307 You should also be logging the Director's messages, please see the previous
308 FAQ for how to do so.
312 \item [All my Jobs are scheduled for the same time. Will this cause
316 \index[fd]{All my Jobs are scheduled for the same time. Will this cause
318 No, not at all. Bacula will schedule all the Jobs at the same time, but will
319 run them one after another unless you have increased the number of
320 simultaneous jobs in the configuration files for the Director, the File
321 daemon, and the Storage daemon. The appropriate configuration record is {\bf
322 Maximum Concurrent Jobs = nn}. At the current time, we recommend that you
323 leave this set to {\bf 1} for the Director.
327 \item [Can Bacula Backup My System To Files instead of Tape?
330 \index[fd]{Can Bacula Backup My System To Files instead of Tape? }
331 Yes, in principle, Bacula can backup to any storage medium as long as you
332 have correctly defined that medium in the Storage daemon's Device resource.
333 For an example of how to backup to files, please see the
334 \ilink{Pruning Example}{PruningExample} in the Recycling
335 chapter of this manual. Also, there is a whole chapter devoted to
336 \ilink{Backing Up to Disk}{_ChapterStart39}.
340 \item [Can Bacula Backup and Restore Files Greater than 2 Giga bytes in
344 \index[sd]{Can Bacula Backup and Restore Files Greater than 2 Giga bytes in
346 If your operating system permits it, and you are running Bacula version 1.26
347 or later, the answer is yes. To the best of our knowledge all client system
348 supported by Bacula can handle files larger than 2 Giga bytes.
352 \item [I Started A Job then Decided I Really Did Not Want to Run It. Is
353 there a better way than {\bf ./bacula stop} to stop it?
356 \index[sd]{I Started A Job then Decided I Really Did Not Want to Run It. Is
357 there a better way than ./bacula stop to stop it? }
358 Yes, you normally should use the Console command {\bf cancel} to cancel a Job
359 that is either scheduled or running. If the Job is scheduled, it will be
360 marked for cancellation and will be canceled when it is scheduled to start.
361 If it is running, it will normally terminate after a few minutes. If the Job
362 is waiting on a tape mount, you may need to do a {\bf mount} command before
367 \item [Why have You Trademarked the Name
368 Bacula\raisebox{.6ex}{{\footnotesize \textsuperscript{\textregistered}}}?
371 \index[sd]{Why have You Trademarked the Name
372 Bacula\textsuperscript{\textregistered}? }
373 We have trademarked the name Bacula to ensure that all media written by any
374 program named Bacula will always be compatible. Anyone may use the name
375 Bacula, even in a derivative product as long as it remains totally compatible
376 in all respects with the program defined here.
380 \item [Why is Your Online Document for Version 1.35 of Bacula when the
381 Currently Release Version is 1.34?
384 \index[sd]{Why is Your Online Document for Version 1.35 of Bacula when the
385 Currently Release Version is 1.34? }
386 As Bacula is being developed, the document is also being enhanced, more often
387 than not it has clarifications of existing features that can be very useful
388 to our users, so we publish the very latest document. Fortunately it is rare
389 that there are confusions with new features.
391 If you want to read a document that pertains only to a specific version,
392 please use the one distributed in the source code.
396 \item [How Can I Be Sure that Bacula Really Saves and Restores All Files?
399 \index[sd]{How Can I Be Sure that Bacula Really Saves and Restores All Files?
401 It is really quite simple, but took me awhile to figure out how to ``prove''
402 it. First make a Bacula Rescue disk, see the
403 \ilink{Disaster Recovery Using Bacula}{_ChapterStart38} of this
404 manual. Second, you run a full backup of all your files on all partitions.
405 Third, you run an Verify InitCatalog Job on the same FileSet, which
406 effectively makes a record of all the files on your system. Fourth, you run a
407 Verify Catalog job and assure yourself that nothing has changed (well,
408 between an InitCatalog and Catalog one doesn't expect anything). Then do the
409 unthinkable, write zeros on your MBR (master boot record) wiping out your
410 hard disk. Now, restore your whole system using your Bacula Rescue disk and
411 the Full backup you made, and finally re-run the Verify Catalog job. You will
412 see that with the exception of the directory modification and access dates
413 and the files changed during the boot, your system is identical to what it
414 was before you wiped your hard disk.
418 \item [I did a Full backup last week, but now in running an Incremental,
419 Bacula says it did not find a FULL backup time, so it did a FULL backup. Why?
422 \index[dir]{I did a Full backup last week, but now in running an Incremental,
423 Bacula says it did not find a FULL backup time, so it did a FULL backup. Why?
425 Before doing an Incremental or a Differential backup, Bacula checks to see if
426 there was a prior Full backup of the same Job that terminated successfully.
427 If so, it uses the date that full backup started as the time for comparing if
428 files have changed. If Bacula does not find a successfully full backup, it
429 proceeds to do one. Perhaps you canceled the full backup, or it terminated in
430 error. In such cases, the full backup will not be successful. You can check
431 by entering {\bf list jobs} and look to see if there is a prior Job with the
432 same Name that has Level F and JobStatus T (normal termination).
434 Another reason why Bacula may not find a suitable Full backup is that every
435 time you change the FileSet, Bacula will require a new Full backup. This is
436 necessary to ensure that all files are properly backed up in the case where
437 you have added more files to the FileSet. Beginning with version 1.31, the
438 FileSets are also dated when they are created, and this date is displayed
439 with the name when you are listing or selecting a FileSet. For more on backup
442 \label{filenamelengths}
444 \item [How Can You Claim to Handle Unlimited Path and Filename Lengths
445 when All Other Programs Have Fixed Limits?
448 \index[dir]{How Can You Claim to Handle Unlimited Path and Filename Lengths
449 when All Other Programs Have Fixed Limits? }
450 Most of those other programs have been around for a long time, in fact since
451 the beginning of Unix, which means that they were designed for rather small
452 fixed length path and filename lengths. Over the years, these restrictions
453 have been relaxed allowing longer names. Bacula on the other hand was
454 designed in 2000, and so from the start, Path and Filenames have been keep in
455 buffers that start at 256 bytes in length but can grow as needed to handle
456 any length. Most of the work is carried out by lower level routines making
457 the coding rather easy.
461 \item [What Is the Really Unique Feature of Bacula?
464 \index[dir]{What Is the Really Unique Feature of Bacula? }
465 Well, it is hard to come up with unique features when backup programs for
466 Unix machines have been around since the 1960s. That said, I believe that
467 Bacula is the first and only program to use a standard SQL interface to its
468 catalog database. Although this adds a bit of complexity and possibly
469 overhead, it provides an amazingly rich set of features that are easy to
470 program and enhance. The current code has barely scratched the surface in
471 this regard (version 1.31).
473 The second feature, which gives a lot of power and flexibility to Bacula is
474 the Bootstrap record definition.
476 The third unique feature, which is currently (1.30) unimplemented, and thus
477 can be called vaporware :-), is Base level saves. When implemented, this will
478 enormously reduce tape usage.
482 \item [If I Do Run Multiple Simultaneous Jobs, How Can I Force One
483 Particular Job to Run After Another Job?
486 \index[dir]{If I Do Run Multiple Simultaneous Jobs, How Can I Force One
487 Particular Job to Run After Another Job? }
488 Yes, you can set Priorities on your jobs so that they run in the order you
490 \ilink{the Priority record}{Priority} in the Job resource.
494 \item [I Am Not Getting Email Notification, What Can I Do?
497 \index[dir]{I Am Not Getting Email Notification, What Can I Do? }
498 The most common problem is that you have not specified a fully qualified
499 email address and your bsmtp server is rejecting the mail. The next most
500 common problem is that your bsmtp server doesn't like the syntax on the From
501 part of the message. For more details on this and other problems, please see
503 \ilink{ Getting Email Notification to Work}{email} section of the
504 Tips chapter of this manual. The section
505 \ilink{ Getting Notified of Job Completion}{notification} of the Tips
506 chapter may also be useful. For more information on the {\bf bsmtp} mail
508 \ilink{bsmtp in the Volume Utility Tools chapter}{bsmtp} of this
513 \item [I Change Recycling, Retention Periods, or File Sizes in my Pool
514 Resource and they Still Don``t Work.
517 \index[dir]{I Change Recycling, Retention Periods, or File Sizes in my Pool
518 Resource and they Still Don"t Work. }
519 The different variables associated with a Pool are defined in the Pool
520 Resource, but are actually read by Bacula from the Catalog database. On
521 Bacula versions prior to 1.30, after changing your Pool Resource, you must
522 manually update the corresponding values in the Catalog by using the {\bf
523 update pool} command in the Console program. In Bacula version 1.30, Bacula
524 does this for you automatically every time it starts.
526 When Bacula creates a Media record (Volume), it uses many default values from
527 the Pool record. If you subsequently change the Pool record, the new values
528 will be used as a default for the next Volume that is created, but if you
529 want the new values to apply to existing Volumes, you must manually update
530 the Volume Catalog entry using the {\bf update volume} command in the Console
533 \label{CompressionNotWorking}
535 \item [I Have Configured Compression On, But None of My Files Are
539 \index[dir]{I Have Configured Compression On, But None of My Files Are
541 There are two kinds of compression. One is tape compression. This is done by
542 the tape drive hardware, and you either enable or disable it with system
543 tools such as {\bf mt}. This compression works independently of Bacula.
545 Bacula also has compression code, which is normally used only when backing up
546 to file Volumes. There are two conditions for this ''software`` to be
550 \item You must have the zip development libraries loaded on your system when
551 building Bacula and Bacula must find this library, normally {\bf
552 /usr/lib/libz.a}. On RedHat systems, this library is provided by the {\bf
555 If the library is found by Bacula during the {\bf ./configure} it will be
556 indicated on the {\bf config.out} line by:
565 \item You must add the {\bf compression=gzip} option on your Include
566 statement in the Director's configuration file.
571 \item [Bacula is Asking for a New Tape After 2 GB of Data but My Tape
575 \index[fd]{Bacula is Asking for a New Tape After 2 GB of Data but My Tape
577 There are several reasons why Bacula will request a new tape.
580 \item There is an I/O error on the tape. Bacula prints an error message and
581 requests a new tape. Bacula does not attempt to continue writing after an I/O
583 \item Bacula encounters and end of medium on the tape. This is not always
584 distinguishable from an I/O error.
585 \item You have specifically set some size limitation on the tape. For example
586 the {\bf Maximum Volume Bytes} or {\bf Maximum Volume Files} in the
587 Director's Pool resource, or {\bf Maximum Volume Size} in the Storage
588 daemon's Device resource.
591 \label{LevelChanging}
593 \item [Bacula is Not Doing the Right Thing When I Request an Incremental
597 \index[fd]{Bacula is Not Doing the Right Thing When I Request an Incremental
599 As explained in one of the previous questions, Bacula will automatically
600 upgrade an Incremental or Differential job to a Full backup if it cannot find
601 a prior Full backup or a suitable Full backup. For the gory details on
602 how/when Bacula decides to upgrade levels please see the
603 \ilink{Level record}{Level} in the Director's configuration
604 chapter of this manual.
606 If after reading the above mentioned section, you believe that Bacula is not
607 correctly handling the level (Differential/Incremental), please send us the
608 following information for analysis:
611 \item Your Director's configuration file.
612 \item The output from {\bf list jobs} covering the period where you are
614 \item The Job report output from the prior Full save (not critical).
615 \item An {\bf llist jobid=nnn} where nnn is the JobId of the prior Full save.
617 \item The Job report output from the save that is doing the wrong thing (not
619 \item An {\bf llist jobid=nnn} where nnn is the JobId of the job that was not
621 \item An explanation of what job went wrong and why you think it did.
624 The above information can allow us to analyze what happened, without it,
625 there is not much we can do.
629 \item [I am Backing Up an Offsite Machine with an Unreliable Connection.
630 The Director Waits Forever for the Client to Contact the SD. What Can I Do.
634 \index[fd]{I am Backing Up an Offsite Machine with an Unreliable Connection.
635 The Director Waits Forever for the Client to Contact the SD. What Can I Do. }
636 Bacula was written on the assumption that it will have a good TCP/IP
637 connection between all the daemons. As a consequence, the current Bacula
638 doesn't deal with faulty connection very well. This situation is slowly being
641 There are several things you can do to improve the situation.
644 \item Upgrade to version 1.32 and use the new SDConnectTimeout record. For
649 SD Connect Timeout = 5 min
654 in the FileDaemon resource.
655 \item Run these kinds of jobs after all other jobs.
660 \item [When I ssh into a machine and start Bacula then attempt to exit,
664 \index[fd]{When I ssh into a machine and start Bacula then attempt to exit,
666 This happens because Bacula leaves stdin, stdout, and stderr open for debug
667 purposes. To avoid it, the simplest thing to do is to redirect the output of
668 those files to {\bf /dev/null} or another file in your startup script (the
669 RedHat autostart scripts do this automatically). For example, you start the
674 bacula-dir -c bacula-dir.conf ... 0>\&1 2>\&1 >/dev/null
679 and likewise for the other daemons.
681 \label{RetentionPeriods}
683 \item [I'm confused by the different Retention periods: File Retention,
684 Job Retention, Volume Retention. Why are there so many?
687 \index[dir]{I'm confused by the different Retention periods: File Retention,
688 Job Retention, Volume Retention. Why are there so many? }
689 Yes, this certainly can be confusing. The basic reason for so many is to
690 allow flexibility. The File records take quite a lot of space in the catalog,
691 so they are typically records you want to remove rather quickly. The Job
692 records, take very little space, and they can be useful even without the File
693 records to see what Jobs actually ran and when. One must understand that if
694 the File records are removed from the catalog, you cannot use the {\bf
695 restore} command to restore an individual file since Bacula no longer knows
696 where it is. However, as long as the Volume Retention period has not expired,
697 the data will still be on the tape, and can be recovered from the tape.
699 For example, I keep a 30 day retention period for my Files to keep my catalog
700 from getting too big, but I keep my tapes for a minimum of one year, just in
703 \label{MaxVolumeSize}
705 \item [Why Does Bacula Ignore the MaxVolumeSize Set in my Pool?
708 \index[fd]{Why Does Bacula Ignore the MaxVolumeSize Set in my Pool? }
709 The MaxVolumeSize that Bacula uses comes from the Media record, so most
710 likely you changed your Pool, which is used as the default for creating Media
711 records, {\bf after} you created your Volume. Check what is in the Media
720 If it doesn't have the right value, you can use:
730 \label{ConnectionRefused}
732 \item [In connecting to my Client, I get ''ERR:Connection Refused. Packet
733 Size too big from File daemon:192.168.1.4:9102`` Why?
736 \index[fd]{In connecting to my Client, I get &htmlQuoteERR:Connection Refused.
737 Packet Size too big from File daemon:192.168.1.4:9102&htmlQuote Why? }
738 This is typically a communications error resulting from one of the following:
742 \item Old versions of Bacula, usually a Win32 client, where two threads were
743 using the same I/O packet. Fixed in more recent versions. Please upgrade.
744 \item Some other program such as an HP Printer using the same port (9102 in
748 If it is neither of the above, please submit a bug report at
749 \elink{bugs.bacula.org}{http://bugs.bacula.org}.
751 Another solution might be to run the daemon with the debug option by:
755 Start a DOS shell Window.
757 bacula-fd -d100 -c c:\bacula\bin\bacula-fd.conf
762 This will cause the FD to write a file {\bf bacula.trace} in the current
763 directory, which you can examine and determine the problem.