Sophie

Sophie

distrib > Fedora > 16 > i386 > by-pkgid > df754e4e6f7f5fc8ab9d6ed8559f3e3d > files > 161

bacula-docs-5.0.3-19.fc16.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">

<!--Converted with LaTeX2HTML 2008 (1.71)
original version by:  Nikos Drakos, CBLU, University of Leeds
* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>Getting Started with Bacula</TITLE>
<META NAME="description" CONTENT="Getting Started with Bacula">
<META NAME="keywords" CONTENT="main">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">

<META NAME="Generator" CONTENT="LaTeX2HTML v2008">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">

<LINK REL="STYLESHEET" HREF="main.css">

<LINK REL="next" HREF="Installing_Bacula.html">
<LINK REL="previous" HREF="Supported_Tape_Drives.html">
<LINK REL="up" HREF="Bacula_Main_Reference.html">
<LINK REL="next" HREF="Installing_Bacula.html">
</HEAD>

<BODY >
<!--Navigation Panel-->
<A NAME="tex2html1309"
  HREF="Installing_Bacula.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> 
<A NAME="tex2html1303"
  HREF="Bacula_Main_Reference.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> 
<A NAME="tex2html1297"
  HREF="Supported_Tape_Drives.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> 
<A NAME="tex2html1305"
  HREF="Contents.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> 
<A NAME="tex2html1307"
  HREF="Thanks.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> 
<BR>
<B> Next:</B> <A NAME="tex2html1310"
  HREF="Installing_Bacula.html">Installing Bacula</A>
<B> Up:</B> <A NAME="tex2html1304"
  HREF="Bacula_Main_Reference.html">Bacula Main Reference</A>
<B> Previous:</B> <A NAME="tex2html1298"
  HREF="Supported_Tape_Drives.html">Supported Tape Drives</A>
 &nbsp; <B>  <A NAME="tex2html1306"
  HREF="Contents.html">Contents</A></B> 
 &nbsp; <B>  <A NAME="tex2html1308"
  HREF="Thanks.html">Index</A></B> 
<BR>
<BR>
<!--End of Navigation Panel-->
<!--Table of Child-Links-->
<A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A>

<UL>
<LI><A NAME="tex2html1311"
  HREF="Getting_Started_with_Bacula.html#SECTION001310000000000000000">Understanding Jobs and Schedules</A>
<LI><A NAME="tex2html1312"
  HREF="Getting_Started_with_Bacula.html#SECTION001320000000000000000">Understanding Pools, Volumes and Labels</A>
<LI><A NAME="tex2html1313"
  HREF="Getting_Started_with_Bacula.html#SECTION001330000000000000000">Setting Up Bacula Configuration Files</A>
<UL>
<LI><A NAME="tex2html1314"
  HREF="Getting_Started_with_Bacula.html#SECTION001331000000000000000">Configuring the Console Program</A>
<LI><A NAME="tex2html1315"
  HREF="Getting_Started_with_Bacula.html#SECTION001332000000000000000">Configuring the Monitor Program</A>
<LI><A NAME="tex2html1316"
  HREF="Getting_Started_with_Bacula.html#SECTION001333000000000000000">Configuring the File daemon</A>
<LI><A NAME="tex2html1317"
  HREF="Getting_Started_with_Bacula.html#SECTION001334000000000000000">Configuring the Director</A>
<LI><A NAME="tex2html1318"
  HREF="Getting_Started_with_Bacula.html#SECTION001335000000000000000">Configuring the Storage daemon</A>
</UL>
<BR>
<LI><A NAME="tex2html1319"
  HREF="Getting_Started_with_Bacula.html#SECTION001340000000000000000">Testing your Configuration Files</A>
<LI><A NAME="tex2html1320"
  HREF="Getting_Started_with_Bacula.html#SECTION001350000000000000000">Testing Compatibility with Your Tape Drive</A>
<LI><A NAME="tex2html1321"
  HREF="Getting_Started_with_Bacula.html#SECTION001360000000000000000">Get Rid of the /lib/tls Directory</A>
<LI><A NAME="tex2html1322"
  HREF="Getting_Started_with_Bacula.html#SECTION001370000000000000000">Running Bacula</A>
<LI><A NAME="tex2html1323"
  HREF="Getting_Started_with_Bacula.html#SECTION001380000000000000000">Log Rotation</A>
<LI><A NAME="tex2html1324"
  HREF="Getting_Started_with_Bacula.html#SECTION001390000000000000000">Log Watch</A>
<LI><A NAME="tex2html1325"
  HREF="Getting_Started_with_Bacula.html#SECTION0013100000000000000000">Disaster Recovery</A>
</UL>
<!--End of Table of Child-Links-->
<HR>

<H1><A NAME="SECTION001300000000000000000"></A>
<A NAME="QuickStartChapter"></A>
<BR>
Getting Started with Bacula
</H1>
<A NAME="2656"></A>

<P>
If you are like me, you want to get Bacula running immediately to get a feel
for it, then later you want to go back and read about all the details. This
chapter attempts to accomplish just that: get you going quickly without all
the details. If you want to skip the section on Pools, Volumes and Labels, you
can always come back to it, but please read to the end of this chapter, and in
particular follow the instructions for testing your tape drive. 

<P>
We assume that you have managed to build and install Bacula, if not, you might
want to first look at the 
System RequirementsSysReqs then at the 
Compiling and Installing BaculaInstallChapter chapter of
this manual. 

<P>
<A NAME="JobsandSchedules"></A>
<H1><A NAME="SECTION001310000000000000000">
Understanding Jobs and Schedules</A>
</H1>
<A NAME="2663"></A>
<A NAME="2664"></A>

<P>
In order to make Bacula as flexible as possible, the directions given 
to Bacula are specified in several pieces.  The main instruction is the 
job resource, which defines a job.  A backup job generally consists of a 
FileSet, a Client, a Schedule for one or several levels or times of backups, 
a Pool, as well as additional instructions. Another way of looking
at it is the FileSet is what to backup; the Client is who to backup; the
Schedule defines when, and the Pool defines where (i.e. what Volume).

<P>
Typically one FileSet/Client combination will have one corresponding job.
Most of the directives, such as FileSets, Pools, Schedules, can be mixed
and matched among the jobs.  So you might have two different Job
definitions (resources) backing up different servers using the same
Schedule, the same Fileset (backing up the same directories on two machines)
and maybe even the same Pools.  The Schedule will define what type of
backup will run when (e.g. Full on Monday, incremental the rest of the
week), and when more than one job uses the same schedule, the job priority
determines which actually runs first.  If you have a lot of jobs, you might
want to use JobDefs, where you can set defaults for the jobs, which can
then be changed in the job resource, but this saves rewriting the
identical parameters for each job.  In addition to the FileSets you want to
back up, you should also have a job that backs up your catalog.

<P>
Finally, be aware that in addition to the backup jobs there are 
restore, verify, and admin jobs, which have different requirements.

<P>
<A NAME="PoolsVolsLabels"></A>
<H1><A NAME="SECTION001320000000000000000">
Understanding Pools, Volumes and Labels</A>
</H1>
<A NAME="2667"></A>
<A NAME="2668"></A>

<P>
If you have been using a program such as <B>tar</B> to backup your system,
Pools, Volumes, and labeling may be a bit confusing at first. A Volume is a
single physical tape (or possibly a single file) on which Bacula will write
your backup data. Pools group together Volumes so that a backup is not
restricted to the length of a single Volume (tape). Consequently, rather than
explicitly naming Volumes in your Job, you specify a Pool, and Bacula will
select the next appendable Volume from the Pool and request you to mount it. 

<P>
Although the basic Pool options are specified in the Director's Pool resource,
the <B>real</B> Pool is maintained in the Bacula Catalog. It contains
information taken from the Pool resource (bacula-dir.conf) as well as
information on all the Volumes that have been added to the Pool. Adding
Volumes to a Pool is usually done manually with the Console program using the
<B>label</B> command. 

<P>
For each Volume, Bacula maintains a fair amount of catalog information such as
the first write date/time, the last write date/time, the number of files on
the Volume, the number of bytes on the Volume, the number of Mounts, etc. 

<P>
Before Bacula will read or write a Volume, the physical Volume must have a
Bacula software label so that Bacula can be sure the correct Volume is
mounted. This is usually done using the <B>label</B> command in the Console
program. 

<P>
The steps for creating a Pool, adding Volumes to it, and writing software
labels to the Volumes, may seem tedious at first, but in fact, they are quite
simple to do, and they allow you to use multiple Volumes (rather than being
limited to the size of a single tape). Pools also give you significant
flexibility in your backup process. For example, you can have a "Daily" Pool
of Volumes for Incremental backups and a "Weekly" Pool of Volumes for Full
backups. By specifying the appropriate Pool in the daily and weekly backup
Jobs, you thereby insure that no daily Job ever writes to a Volume in the
Weekly Pool and vice versa, and Bacula will tell you what tape is needed and
when. 

<P>
For more on Pools, see the 
Pool ResourcePoolResource section of the Director
Configuration chapter, or simply read on, and we will come back to this
subject later. 

<P>

<H1><A NAME="SECTION001330000000000000000"></A>
<A NAME="config"></A>
<BR>
Setting Up Bacula Configuration Files
</H1>
<A NAME="2677"></A>
<A NAME="2678"></A>

<P>
After running the appropriate <B>./configure</B> command and doing
a <B>make</B>, and a <B>make install</B>, if this is the first time
you are running Bacula, you must create valid configuration files
for the Director, the File daemon, the Storage daemon, and the
Console programs.  If you have followed our recommendations,
default configuration files as well as the daemon binaries will
be located in your installation directory.  In any case, the
binaries are found in the directory you specified on the <B><code>--</code>sbindir</B> option to the <B>./configure</B> command, and
the configuration files are found in the directory you specified
on the <B><code>--</code>sysconfdir</B> option.

<P>
When initially setting up Bacula you will need to invest a bit of time in
modifying the default configuration files to suit your environment. This may
entail starting and stopping Bacula a number of times until you get everything
right. Please do not despair. Once you have created your configuration files,
you will rarely need to change them nor will you stop and start Bacula very
often. Most of the work will simply be in changing the tape when it is full. 

<P>

<H2><A NAME="SECTION001331000000000000000">
Configuring the Console Program</A>
</H2>
<A NAME="2686"></A>
<A NAME="2687"></A>

<P>
The Console program is used by the administrator to interact with the Director
and to manually start/stop Jobs or to obtain Job status information. 

<P>
The Console configuration file is found in the directory specified on the
<B><code>--</code>sysconfdir</B> option that you specified on the <B>./configure</B> command and by default is named <B>bconsole.conf</B>.

<P>
The same applies to the wxWidgets console, which is build with the <B><code>--</code>enable-bwx-console</B> option, and the name of the default
configuration file is, in this case, <B>bwx-console.conf</B>.

<P>
Normally, for first time users, no change is needed to these files. Reasonable
defaults are set. 

<P>
Further details are in the
Console configurationConsoleConfChapter chapter.

<P>

<H2><A NAME="SECTION001332000000000000000">
Configuring the Monitor Program</A>
</H2>
<A NAME="2696"></A>
<A NAME="2697"></A>

<P>
The Monitor program is typically an icon in the system tray. However, once the
icon is expanded into a full window, the administrator or user can obtain
status information about the Director or the backup status on the local
workstation or any other Bacula daemon that is configured. 

<P>

<IMG
 WIDTH="832" HEIGHT="681" ALIGN="BOTTOM" BORDER="0"
 SRC="img19.png"
 ALT="\includegraphics{Bacula-tray-monitor.eps}"> 

<P>
The image shows a tray-monitor configured for three daemons. By clicking on
the radio buttons in the upper left corner of the image, you can see the
status for each of the daemons. The image shows the status for the Storage
daemon (MainSD) that is currently selected. 

<P>
The Monitor configuration file is found in the directory specified on the <B><code>--</code>sysconfdir</B> option that you specified on the <B>./configure</B> command
and
by default is named <B>tray-monitor.conf</B>. Normally, for first time users,
you just need to change the permission of this file to allow non-root users to
run the Monitor, as this application must run as the same user as the
graphical environment (don't forget to allow non-root users to execute <B>bacula-tray-monitor</B>). This is not a security problem as long as you use the
default settings. 

<P>
More information is in the
Monitor configuration_MonitorChapter chapter.

<P>

<H2><A NAME="SECTION001333000000000000000">
Configuring the File daemon</A>
</H2>
<A NAME="2709"></A>
<A NAME="2710"></A>

<P>
The File daemon is a program that runs on each (Client) machine. At the
request of the Director, finds the files to be backed up and sends them (their
data) to the Storage daemon. 

<P>
The File daemon configuration file is found in the directory specified on
the <B><code>--</code>sysconfdir</B> option that you specified on the <B>./configure</B>
command. By default, the File daemon's configuration file is named <B>bacula-fd.conf</B>. Normally, for first time users, no change is needed to this
file. Reasonable defaults are set. However, if you are going to back up more
than one machine, you will need to install the File daemon with a unique
configuration file on each machine to be backed up. The information about each
File daemon must appear in the Director's configuration file. 

<P>
Further details are in the 
File daemon configurationFiledConfChapter chapter.

<P>

<H2><A NAME="SECTION001334000000000000000">
Configuring the Director</A>
</H2>
<A NAME="2717"></A>
<A NAME="2718"></A>

<P>
The Director is the central control program for all the other daemons. It
schedules and monitors all jobs to be backed up. 

<P>
The Director configuration file is found in the directory specified on the
<B><code>--</code>sysconfdir</B> option that you specified on the <B>./configure</B>
command. Normally the Director's configuration file is named <B>bacula-dir.conf</B>. 

<P>
In general, the only change you must make is modify the FileSet resource so
that the <B>Include</B> configuration directive contains at least one line with
a valid name of a directory (or file) to be saved. 

<P>
If you do not have a DLT tape drive, you will probably want to edit the
Storage resource to contain names that are more representative of your actual
storage device. You can always use the existing names as you are free to
arbitrarily assign them, but they must agree with the corresponding names in
the Storage daemon's configuration file. 

<P>
You may also want to change the email address for notification from the
default <B>root</B> to your email address. 

<P>
Finally, if you have multiple systems to be backed up, you will need a
separate File daemon or Client specification for each system, specifying its
name, address, and password. We have found that giving your daemons the same
name as your system but post fixed with <B>-fd</B> helps a lot in debugging.
That is, if your system name is <B>foobaz</B>, you would give the File daemon
the name <B>foobaz-fd</B>. For the Director, you should use <B>foobaz-dir</B>,
and for the storage daemon, you might use <B>foobaz-sd</B>. 
Each of your Bacula components <B>must</B> have a unique name.  If you
make them all the same, aside from the fact that you will not
know what daemon is sending what message, if they share the same
working directory, the daemons temporary file names will not
be unique, and you will get many strange failures.

<P>
More information is in the
Director configurationDirectorChapter chapter.

<P>

<H2><A NAME="SECTION001335000000000000000">
Configuring the Storage daemon</A>
</H2>
<A NAME="2733"></A>
<A NAME="2734"></A>

<P>
The Storage daemon is responsible, at the Director's request, for accepting
data from a File daemon and placing it on Storage media, or in the case of a
restore request, to find the data and send it to the File daemon. 

<P>
The Storage daemon's configuration file is found in the directory specified on
the <B><code>--</code>sysconfdir</B> option that you specified on the <B>./configure</B>
command. By default, the Storage daemon's file is named <B>bacula-sd.conf</B>.
Edit this file to contain the correct Archive device names for any tape
devices that you have. If the configuration process properly detected your
system, they will already be correctly set. These Storage resource name and
Media Type must be the same as the corresponding ones in the Director's
configuration file <B>bacula-dir.conf</B>. If you want to backup to a file
instead of a tape, the Archive device must point to a directory in which the
Volumes will be created as files when you label the Volume. 
<A NAME="ConfigTesting"></A>
<P>
Further information is in the
Storage daemon configurationStoredConfChapter chapter.

<P>

<H1><A NAME="SECTION001340000000000000000">
Testing your Configuration Files</A>
</H1>
<A NAME="2743"></A>
<A NAME="2744"></A>

<P>
You can test if your configuration file is syntactically correct by running
the appropriate daemon with the <B>-t</B> option. The daemon will process the
configuration file and print any error messages then terminate. For example,
assuming you have installed your binaries and configuration files in the same
directory. 

<P>
<PRE>
cd &lt;installation-directory&gt;
./bacula-dir -t -c bacula-dir.conf
./bacula-fd -t -c bacula-fd.conf
./bacula-sd -t -c bacula-sd.conf
./bconsole -t -c bconsole.conf
./bwx-console -t -c bwx-console.conf
./bat -t -c bat.conf
su &lt;normal user&gt; -c "./bacula-tray-monitor -t -c tray-monitor.conf"
</PRE>
<P>
will test the configuration files of each of the main programs. If the
configuration file is OK, the program will terminate without printing
anything. Please note that, depending on the configure options you choose,
some, or even all, of the three last commands will not be available on your
system. If you have installed the binaries in traditional Unix locations
rather than a single file, you will need to modify the above commands
appropriately (no ./ in front of the command name, and a path in front of the
conf file name). 
<A NAME="TapeTesting"></A>
<P>

<H1><A NAME="SECTION001350000000000000000">
Testing Compatibility with Your Tape Drive</A>
</H1>
<A NAME="2750"></A>
<A NAME="2751"></A>

<P>
Before spending a lot of time on Bacula only to find that it doesn't work
with your tape drive, please read the <B>Testing Your Tape
Drive</B> chapter of this manual.  If you have a modern
standard SCSI tape drive on a Linux or Solaris, most likely it will work,
but better test than be sorry.  For FreeBSD (and probably other xBSD
flavors), reading the above mentioned tape testing chapter is a must.
Also, for FreeBSD, please see The FreeBSD
Diaryhttp://www.freebsddiary.org/bacula.php for a detailed description
on how to make Bacula work on your system.  In addition, users of FreeBSD
prior to 4.9-STABLE dated Mon Dec 29 15:18:01 2003 UTC who plan to use tape
devices, please see the file <B>platforms/freebsd/pthreads-fix.txt</B> in
the main Bacula directory concerning important information concerning
compatibility of Bacula and your system.  <A NAME="notls"></A>
<P>

<H1><A NAME="SECTION001360000000000000000">
Get Rid of the /lib/tls Directory</A>
</H1>
<A NAME="2758"></A>
<A NAME="2759"></A>
The new pthreads library <B>/lib/tls</B> installed by default on recent Red
Hat systems running Linux kernel 2.4.x is defective.  You must remove it or
rename it, then reboot your system before running Bacula otherwise after a
week or so of running, Bacula will either block for long periods or
deadlock entirely.  You may want to use the loader environment variable
override rather than removing /lib/tls.  Please see  Supported
Operating SystemsSupportedOSes for more information on this problem.

<P>
This problem does not occur on systems running Linux 2.6.x kernels. 

<P>
<A NAME="Running1"></A>
<P>

<H1><A NAME="SECTION001370000000000000000">
Running Bacula</A>
</H1>
<A NAME="2765"></A>
<A NAME="2766"></A>

<P>
Probably the most important part of running Bacula is being able to restore
files. If you haven't tried recovering files at least once, when you actually
have to do it, you will be under a lot more pressure, and prone to make
errors, than if you had already tried it once. 

<P>
To get a good idea how to use Bacula in a short time, we <B>strongly</B>
recommend that you follow the example in the 
Running Bacula ChapterTutorialChapter of this manual where
you will get detailed instructions on how to run Bacula. 

<P>

<H1><A NAME="SECTION001380000000000000000">
Log Rotation</A>
</H1>
<A NAME="2771"></A>
<A NAME="2772"></A>
If you use the default <B>bacula-dir.conf</B> or some variation of it, you will
note that it logs all the Bacula output to a file. To avoid that this file
grows without limit, we recommend that you copy the file <B>logrotate</B> from
the <B>scripts/logrotate</B> to <B>/etc/logrotate.d/bacula</B>. This will cause
the log file to be rotated once a month and kept for a maximum of five months.
You may want to edit this file to change the default log rotation preferences.

<P>

<H1><A NAME="SECTION001390000000000000000">
Log Watch</A>
</H1>
<A NAME="2778"></A>
<A NAME="2779"></A>
Some systems such as Red Hat and Fedora run the logwatch program
every night, which does an analysis of your log file and sends an
email report.  If you wish to include the output from your Bacula 
jobs in that report, please look in the <B>scripts/logwatch</B>
directory.  The <B>README</B> file in that directory gives a brief
explanation on how to install it and what kind of output to expect.

<P>

<H1><A NAME="SECTION0013100000000000000000">
Disaster Recovery</A>
</H1>
<A NAME="2783"></A>
<A NAME="2784"></A>

<P>
If you intend to use Bacula as a disaster recovery tool rather than simply a
program to restore lost or damaged files, you will want to read the 
Disaster Recovery Using Bacula ChapterRescueChapter of
this manual. 

<P>
In any case, you are strongly urged to carefully test restoring some files
that you have saved rather than wait until disaster strikes. This way, you
will be prepared.

<P>
<HR>
<!--Navigation Panel-->
<A NAME="tex2html1309"
  HREF="Installing_Bacula.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> 
<A NAME="tex2html1303"
  HREF="Bacula_Main_Reference.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> 
<A NAME="tex2html1297"
  HREF="Supported_Tape_Drives.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> 
<A NAME="tex2html1305"
  HREF="Contents.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> 
<A NAME="tex2html1307"
  HREF="Thanks.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> 
<BR>
<B> Next:</B> <A NAME="tex2html1310"
  HREF="Installing_Bacula.html">Installing Bacula</A>
<B> Up:</B> <A NAME="tex2html1304"
  HREF="Bacula_Main_Reference.html">Bacula Main Reference</A>
<B> Previous:</B> <A NAME="tex2html1298"
  HREF="Supported_Tape_Drives.html">Supported Tape Drives</A>
 &nbsp; <B>  <A NAME="tex2html1306"
  HREF="Contents.html">Contents</A></B> 
 &nbsp; <B>  <A NAME="tex2html1308"
  HREF="Thanks.html">Index</A></B> 
<!--End of Navigation Panel-->
<ADDRESS>

2012-01-24
</ADDRESS>
</BODY>
</HTML>