\index[general]{Labels!Tape}
\addcontentsline{toc}{section}{ANSI and IBM Tape Labels}
-Bacula can support ANSI or IBM tape labels as long as you
+Bacula supports ANSI or IBM tape labels as long as you
enable it. In fact, with the proper configuration, you can
force Bacula to require ANSI or IBM labels.
Even though Bacula will recognize and write ANSI and IBM labels,
it always writes its own tape labels as well.
-When using ANSI or IBM tape labeling, you must keep your Volume
+When using ANSI or IBM tape labeling, you must restrict your Volume
names to a maximum of 6 characters.
+If you have labeled your Volumes outside of Bacula, then the
+ANSI/IBM label will be recognized by Bacula only if you have created
+the HDR1 label with {\bf BACULA.DATA} in the Filename field (starting
+with character 5). If Bacula writes the labels, it will use
+this information to recognize the tape as a Bacula tape. This allows
+ANSI/IBM labeled tapes to be used at sites with multiple machines
+and multiple backup programs.
+
\subsection*{Director Pool Directive}
\addcontentsline{toc}{section}{Director Pool Directive}
\item [ Label Type = ANSI | IBM | Bacula]
This directive is implemented in the Director Pool resource and in the SD Device
resource. If it is specified in the SD Device resource, it will take
- precedence over the value passed from the Director to the SD.
+ precedence over the value passed from the Director to the SD. The default
+ is Label Type = Bacula.
\end{description}
\subsection*{Storage Daemon Device Directives}
This directive is implemented in the Director Pool resource and in the SD Device
resource. If it is specified in the the SD Device resource, it will take
precedence over the value passed from the Director to the SD.
-
+
\item [Check Labels = yes | no]
This directive is implemented in the the SD Device resource. If you intend
to read ANSI or IBM labels, this *must* be set. Even if the volume is
not ANSI labeled, you can set this to yes, and Bacula will check the
- label type.
+ label type. Without this directive set to yes, Bacula will assume that
+ labels are of Bacula type and will not check for ANSI or IBM labels.
+ In other words, if there is a possibility of Bacula encountering an
+ ANSI/IBM label, you must set this to yes.
\end{description}
-
\index[sd]{Resource!Autochanger }
\addcontentsline{toc}{subsection}{Autochanger Resource}
-The Autochanger resource serves to group one or more Device resources
-into one unit called an autochanger in Bacula (referred to
-as a tape library by autochanger manufacturers).
+The Autochanger resource supports single or multiple drive
+autochangers by grouping one or more Device resources
+into one unit called an autochanger in Bacula (often referred to
+as a "tape library" by autochanger manufacturers).
\begin{description}
\item [Name = \lt{}Autochanger-Name\gt{}]
This directive is required.
\item [Device = \lt{}Device-name1, device-name2, ...\gt{}]
- Specifies the names of the Device resource that corresponds
+ Specifies the names of the Device resource or
+ resources that correspond
to the autochanger drive. If you have a multiple drive
autochanger, you must specify multiple Device names, each
- one referring to a Device resource that contains a the
+ one referring to a separate Device resource that contains a the
Drive Index specification that corresponds to the drive
number. You may specify multiple device names on
a single line separated by commas, and/or you may specify
The specified {\bf name-string} gives the system file name of the autochanger
device name. If specified in this resource, the Changer Device name
is not needed in the Device resource. If it is specified in the Device
- resource (see above), it will take precidence over one specified in
+ resource (see above), it will take precedence over one specified in
the Autochanger resource.
\item [Changer Command = {\it name-string}]
you will specify the Bacula supplied {\bf mtx-changer} script as follows.
If it is specified here, it need not be specified in the Device
resource. If it is specified in the Device resource, it will take
- precidence over the one specified in the Autochanger resource.
+ precedence over the one specified in the Autochanger resource.
\end{description}
\begin{verbatim}
Autochanger {
Name = "DDS-4-changer"
- Device = DDS-4-1, DDS-4-2
+ Device = DDS-4-1, DDS-4-2, DDS-4-3
Changer Device = /dev/sg0
Changer Command = "/etc/bacula/mtx-changer %c %o %S %a %d"
}
Device {
Name = "DDS-4-1"
Drive Index = 0
+ Autochanger = yes
...
}
Device {
Name = "DDS-4-2"
Drive Index = 1
+ Autochanger = yes
+ ...
+Device {
+ Name = "DDS-4-3"
+ Drive Index = 2
+ Autochanger = yes
+ Autoselect = no
...
}
\end{verbatim}
\normalsize
+
+Please note that it is important to include the {\bf Autochanger = yes} directive
+in each Device definition that belongs to an Autochanger. A device definition
+should not belong to more than one Autochanger resource. Also, your Device
+directive in the Storage resource of the Director's conf file should have
+the Autochanger's resource name rather than a name of one of the Devices.
+
+If you have a drive that physically belongs to an Autochanger but you don't want
+to have it automatically used when Bacula references the Autochanger for backups,
+for example, you want to reserve it for restores, you can add the directive:
+
+\footnotesize
+\begin{verbatim}
+Autoselect = no
+\end{verbatim}
+\normalsize
+
+to the Device resource for that drive. In that case, Bacula will not automatically
+select that drive when accessing the Autochanger. You can, still use the drive
+by referencing it by the Device name rather than the Autochanger name. An example
+of such a definition is shown above for the Device DDS-4-3, which will not be
+selected when the name DDS-4-changer is used in a Storage definition, but will
+be used if DDS-4-3 is used.
%%
%%
-\section*{Autochangers Support}
+\section*{Autochanger Support}
\label{_ChapterStart18}
-\index[general]{Support!Autochangers }
-\index[general]{Autochangers Support }
-\addcontentsline{toc}{section}{Autochangers Support}
+\index[general]{Support!Autochanger }
+\index[general]{Autochanger Support }
+\addcontentsline{toc}{section}{Autochanger Support}
\subsection*{Autochangers -- General}
\index[general]{General!Autochangers -- }
\index[general]{Autochangers -- General }
\addcontentsline{toc}{subsection}{Autochangers -- General}
-Bacula provides autochanger support for reading
-and writing tapes. In order to work with an autochanger, Bacula requires three
-things, each of which is explained in more detail after this list:
+Bacula provides autochanger support for reading and writing tapes. In
+order to work with an autochanger, Bacula requires three things, each of
+which is explained in more detail after this list:
\begin{itemize}
\item A script that actually controls the autochanger according to commands
\item That each Volume (tape) to be used must be defined in the Catalog and
have a Slot number assigned to it so that Bacula knows where the Volume is in
the autochanger. This is generally done with the {\bf label} command. See
- below for more details.
+ below for more details. You must pre-label the tapes manually before
+ using them.
\item Modifications to your Storage daemon's Device configuration resource to
identify that the device is a changer, as well as a few other parameters.
\item You should also modify your Storage resource definition in the
Director's configuration file so that you are automatically prompted for the
Slot when labeling a Volume.
+\item You need to ensure that your Storage daemon (if not running as root)
+ has access permissions to both the tape drive and the control device.
+\item You need to have {\bf Autochanger = yes} in your Storage resource
+ in your bacula-dir.conf file so that you will be prompted for the
+ slot number when you label Volumes.
\end{itemize}
In version 1.37, there is a new \ilink{Autochanger
resource}{AutochangerRes} that permits you to group Device resources thus
-creating a multi-drive autochanger.
+creating a multi-drive autochanger. If you have a multi-drive autochanger,
+you must use this new resource. If you have a single drive autochanger,
+it is recommended, but not required.
Bacula uses its own {\bf mtx-changer} script to interface with a program
-that actually does the tape changing. Thus in principle, {\bf mtx-changer} can
-be adapted to function with any autochanger program. The current version of
-{\bf mtx-changer} works with the {\bf mtx} program. However, FreeBSD users have
-provided a script in the {\bf examples} directory that allows Bacula to use
-the {\bf chio} program.
+that actually does the tape changing. Thus in principle, {\bf mtx-changer}
+can be adapted to function with any autochanger program. The current
+version of {\bf mtx-changer} works with the {\bf mtx} program. However,
+FreeBSD users have provided a script in the {\bf examples/autochangers}
+directory that allows Bacula to use the {\bf chio} program.
Bacula also supports autochangers with barcode
-readers. This support includes two new Console commands: {\bf label barcodes}
-and {\bf update slots}. For more details on these commands, see the ``Barcode
-Support'' section below.
+readers. This support includes two Console commands: {\bf label barcodes}
+and {\bf update slots}. For more details on these commands, see the "Barcode
+Support" section below.
Current Bacula autochanger support does not include cleaning, stackers, or
silos. However, under certain conditions, you may be able to make Bacula
To list the SCSI devices as well as the {\bf /dev/passn} that you will use on
the Bacula {\bf Changer Device = } directive.
+Please check that your Storage daemon has permission to access this
+device.
+
\label{scripts}
\subsection*{Example Scripts}
in the Console program.
\label{mult}
-
\subsection*{Multiple Devices}
\index[general]{Devices!Multiple }
\index[general]{Multiple Devices }
Drive Index} directive in the Device resource of the Storage daemon's
configuration file. Drive numbers or the Device Index are numbered beginning
at zero, which is the default. To use the second Drive in an autochanger, you
-need to define a second Device resource and set the Drive Index to one for
+need to define a second Device resource and set the Drive Index to 1 for
that device. In general, the second device will have the same {\bf Changer
Device} (control channel) as the first drive, but a different {\bf Archive
Device}.
-The current version (1.37.16) of Bacula does not coordinate between the two
-drives, so you must make sure that Bacula doesn't attempt to mount the same
-Volume on both drives at the same time. There are a number of ways to do this.
-One is to use different pools for each drive.
-
\label{ConfigRecords}
\subsection*{Device Configuration Records}
\index[general]{Records!Device Configuration }
On FreeBSD systems, the changer device will typically be on {\bf /dev/pass0}
through {\bf /dev/passn}.
-On Solaris, the changer device will typically be some file under {\bf
+On Solaris, the changer device will typically be some file under {\bf
/dev/rdsk}.
+Please ensure that your Storage daemon has permission to access this
+device.
+
\item [Changer Command = \lt{}command\gt{}]
\index[sd]{Changer Command }
This record is used to specify the external program to call and what
%s = Slot base 0
%S = Slot base 1
%v = Volume name
-
\end{verbatim}
\normalsize
\footnotesize
\begin{verbatim}
Changer Command = "/etc/bacula/mtx-changer %c %o %S %a %d"
-
\end{verbatim}
\normalsize
the path to the {\bf Changer Command} to correspond to the values used on your
system.
+\subsection*{A Multi-drive Example Configuration File}
+\index[general]{Multi-drive Example Configuration File }
+\addcontentsline{toc}{subsection}{A Multi-drive Example Configuration File}
+
+The following resources implement a multi-drive autochanger:
+
+\footnotesize
+\begin{verbatim}
+Autochanger {
+ Name = "Autochanger"
+ Device = Drive-1, Drive-2
+ Changer Device = /dev/sg0
+ Changer Command = "/etc/bacula/mtx-changer %c %o %S %a %d"
+}
+
+Device {
+ Name = Drive-1
+ Drive Index = 0
+ Media Type = DDS-4
+ Archive Device = /dev/nst0 # Normal archive device
+ Autochanger = yes
+ LabelMedia = no;
+ AutomaticMount = yes;
+ AlwaysOpen = yes;
+ Mount Anonymous Volumes = no;
+}
+
+Device {
+ Name = Drive-2
+ Drive Index = 1
+ Media Type = DDS-4
+ Archive Device = /dev/nst1 # Normal archive device
+ Autochanger = yes
+ LabelMedia = no;
+ AutomaticMount = yes;
+ AlwaysOpen = yes;
+ Mount Anonymous Volumes = no;
+}
+
+\end{verbatim}
+\normalsize
+
+where you will adapt the {\bf Archive Device}, the {\bf Changer Device}, and
+the path to the {\bf Changer Command} to correspond to the values used on your
+system.
\label{SpecifyingSlots}
\subsection*{Specifying Slots When Labeling}
If you add an {\bf Autochanger = yes} record to the Storage resource in your
Director's configuration file, the Bacula Console will automatically prompt
-you for the slot number and whether or not the Volume is in the changer when
-you {\bf add} or {\bf label} tapes for that Storage device. You must also set
-{\bf Autochanger = yes} in the Device resource as we have described above in
+you for the slot number when the Volume is in the changer when
+you {\bf add} or {\bf label} tapes for that Storage device. If your
+{\bf mtx-changer} script is properly installed, Bacula will automatically
+load the correct tape during the label command.
+
+You must also set
+{\bf Autochanger = yes} in the Storage daemon's Device resource
+as we have described above in
order for the autochanger to be used. Please see the
\ilink{Storage Resource}{Autochanger1} in the Director's chapter
and the
For each tape in the changer containing a barcode, Bacula will mount the tape
and then label it with the same name as the barcode. An appropriate Media
record will also be created in the catalog. Any barcode that begins with the
-same characters as specified on the ``CleaningPrefix=xxx'' command, will be
+same characters as specified on the "CleaningPrefix=xxx" command, will be
treated as a cleaning tape, and will not be labeled. For example with:
+Please note that Volumes must be pre-labeled to be automatically used in
+the autochanger during a backup. If you do not have a barcode reader, this
+is done manually (or via a script).
+
\footnotesize
\begin{verbatim}
Pool {
\addcontentsline{toc}{subsection}{Dealing with Multiple Magazines}
If you have several magazines or if you insert or remove cartridges from a
-magazine, you will need to notify Bacula of this. By doing so, Bacula will as
+magazine, you should notify Bacula of this. By doing so, Bacula will as
a preference, use Volumes that it knows to be in the autochanger before
accessing Volumes that are not in the autochanger. This prevents unneeded
operator intervention.
mtx-changer Script}
Before attempting to use the autochanger with Bacula, it is preferable to
-``hand-test'' that the changer works. To do so, we suggest you do the
+"hand-test" that the changer works. To do so, we suggest you do the
following commands (assuming that the {\bf mtx-changer} script is installed in
{\bf /etc/bacula/mtx-changer}):
\item [/etc/bacula/mtx-changer \ /dev/sg0 \ loaded \ 0 \ /dev/nst0 \ 0]
\index[sd]{/etc/bacula/mtx-changer \ /dev/sg0 \ loaded \ 0 \ /dev/nst0 \
0 }
-It should print ``3''
+It should print "3"
\item [/etc/bacula/mtx-changer \ /dev/sg0 \ unload]
\index[sd]{/etc/bacula/mtx-changer \ /dev/sg0 \ unload }
\lt{}bacula-source\gt{}/examples/devices} that implement the above features,
so they may be a help to you in getting your script to work.
-If Bacula complains ``Rewind error on /dev/nst0. ERR=Input/output error.'' you
+If Bacula complains "Rewind error on /dev/nst0. ERR=Input/output error." you
most likely need more sleep time in your {\bf mtx-changer} before returning to
Bacula after a load command has been completed.
Once all your Volumes are labeled, Bacula will automatically load them as they
are needed.
-To ``see'' how you have labeled your Volumes, simply enter the {\bf list
+To "see" how you have labeled your Volumes, simply enter the {\bf list
volumes} command from the Console program, which should print something like
the following:
Bacula calls the autochanger script that you specify on the {\bf Changer
Device} statement. Normally this script will be the {\bf mtx-changer} script
that we can provide, but it can in fact be any program. The only requirements
-are that the ``commands'' that Bacula uses are {\bf loaded}, {\bf load}, {\bf
+are that the "commands" that Bacula uses are {\bf loaded}, {\bf load}, {\bf
unload}, {\bf list}, and {\bf slots}. In addition,
each of those commands must return the information in the precise format as
specified below:
\footnotesize
\begin{verbatim}
- Currently the changer commands used are:
- loaded -- returns number of the slot that is loaded in
- the drive or 0 if the drive is empty.
+ loaded -- returns number of the slot that is loaded, base 1,
+ in the drive or 0 if the drive is empty.
load -- loads a specified slot (note, some autochangers
require a 30 second pause after this command) into
the drive.
of Bacula. In addition, the file {\bf patches-version-number} in the
{\bf patches} directory contains a summary of each of the patches.
-A ``raw'' list of the current task list and known issues can be found in {\bf
+A "raw" list of the current task list and known issues can be found in {\bf
kernstodo} in the main Bacula source directory.
All database programs have some means of writing the database out in ASCII
format and then reloading it. Doing so will re-create the database from
scratch producing a compacted result, so below, we show you how you can do
-this for both MySQL and SQLite.
+this for MySQL, PostgreSQL and SQLite.
For a {\bf MySQL} database, you could write the Bacula database as an ASCII
file (bacula.sql) then reload it by doing the following:
using (see above).
\label{CompactingPostgres}
+\subsection*{Performance Issues}
+\index[general]{Database Performance Issues}
+\index[general]{Performance!Database}
+\addcontentsline{toc}{subsection}{Database Performance Issues}
+
+There are a considerable number of ways each of the databases can be
+tuned to improve the performance. Going from an untuned database to one
+that is properly tuned can make a difference of a factor of 100 or more
+in the time to insert or search for records.
+
+For each of the databases, you may get significant improvements by adding
+additional indexes. The comments in the Bacula make_xxx_tables give some
+indications as to what indexes may be appropriate.
+
+For MySQL, what seems to be very important is to use the examine the
+my.cnf file. You may obtain significant performances by switching to
+the my-large.cnf or my-huge.cnf files that come with the MySQL source
+code.
+
+For SQLite3, one significant factor in improving the performance is
+to ensure that there is a "PRAGMA synchronous = NORMAL;" statement.
+This reduces the number of times that the database flushes the in memory
+cache to disk. There are other settings for this PRAGMA that can
+give even further performance improvements at the risk of a database
+corruption if your system crashes.
+
+For PostgreSQL, you might want to consider turning fsync off. Of course
+doing so can cause corrupted databases in the even of a machine crash.
+There are many different ways that you can tune PostgreSQL, the
+following document discusses a few of them:
+\elink{
+http://www.varlena.com/varlena/GeneralBits/Tidbits/perf.html}
+{http://www.varlena.com/varlena/GeneralBits/Tidbits/perf.html}.
+
+There is also a PostgreSQL FAQ question number 3.3 that may
+answer some of your questions about how to improve performance
+of the PostgreSQL engine:
+\elink{
+http://www.postgresql.org/docs/faqs.FAQ.html#3.3}
+{http://www.postgresql.org/docs/faqs.FAQ.html#3.3}.
+
+
+
+
\subsection*{Compacting Your PostgreSQL Database}
\index[general]{Database!Compacting Your PostgreSQL }
\index[general]{Compacting Your PostgreSQL Database }
You may begin using Bacula with SQLite then later find that you want to switch
to MySQL for any of a number of reasons: SQLite tends to use more disk than
MySQL, SQLite apparently does not handle database sizes greater than 2GBytes,
-... Several users have done so by first producing an ASCII ``dump'' of the
+... Several users have done so by first producing an ASCII "dump" of the
SQLite database, then creating the MySQL tables with the {\bf
create\_mysql\_tables} script that comes with Bacula, and finally feeding the
SQLite dump into MySQL using the {\bf -f} command line option to continue past
the errors that are generated by the DDL statements that SQLite's dump
creates. Of course, you could edit the dump and remove the offending
statements. Otherwise, MySQL accepts the SQL produced by SQLite.
-\label{BackingUpBacula}
+\label{BackingUpBacula}
\subsection*{Backing Up Your Bacula Database}
\index[general]{Backing Up Your Bacula Database }
\index[general]{Database!Backing Up Your Bacula }
Pool = Default
RunBeforeJob = "/home/kern/bacula/bin/make_catalog_backup"
RunAfterJob = "/home/kern/bacula/bin/delete_catalog_backup"
+ Write Bootstrap = "/home/kern/bacula/working/BackupCatalog.bsr"
}
# This schedule does the catalog. It starts after the WeeklyCycle
Schedule {
\end{verbatim}
\normalsize
-\label{BackingUPOtherDBs}
+Be sure to write a bootstrap file as in the above example. It is preferable
+to write or copy the bootstrap file to another computer. It will allow
+you to quickly recover the database backup should that be necessary. If
+you do not have a bootstrap file, it is still possible to recover your
+database backup, but it will be more work and take longer.
+\label{BackingUPOtherDBs}
\subsection*{Backing Up Third Party Databases}
\index[general]{Backing Up Third Party Databases }
\index[general]{Databases!Backing Up Third Party }
\end{verbatim}
\normalsize
-Defines the Director resource with the name ``MyDir'' and a working directory
+Defines the Director resource with the name "MyDir" and a working directory
\$HOME/bacula/bin/working. In general, if you want spaces in a name to the
right of the first equal sign (=), you must enclose that name within double
quotes. Otherwise quotes are not generally necessary because once defined,
be accepted. Names may contain up to 127 characters. Currently, a name may
contain any ASCII character. Within a quoted string, any character following a
backslash (\textbackslash{}) is taken as itself (handy for inserting
-blackslashes and double quotes (``).
+blackslashes and double quotes (").
Please note, however, that Bacula resource names as well as certain other
names (e.g. Volume names) will in the future be severely limited to permit
\subsubsection*{Including other Configuration Files}
\index[general]{Including other Configuration Files }
\index[general]{Files!Including other Configuration }
+\index[general]{Using @ to include other files}
+\index[general{@{\bf filename}}
\addcontentsline{toc}{subsubsection}{Including other Configuration Files}
If you wish to break your configuration file into smaller pieces, you can do
\begin{description}
\item [name]
- \index[fd]{name }
+ \index[fd]{name}
A keyword or name consisting of alphanumeric characters, including the
hyphen, underscore, and dollar characters. The first character of a {\bf
name} must be a letter. A name has a maximum length currently set to 127
\index[dir]{yes or no }
Either a {\bf yes} or a {\bf no}.
-\item [
- \label{Size1}
- size]
-\index[dir]{a name }
+\label{Size1}
+\item [size]
+\index[dir]{size }
A size specified as bytes. Typically, this is a floating point scientific
input format followed by an optional modifier. The floating point input is
stored as a 64 bit integer value. If a modifier is present, it must
modifiers are permitted:
\begin{description}
-
\item [k]
1,024 (kilobytes)
\item [gb]
1,000,000,000 (gigabytes)
- \end{description}
-
-\item {\bf
- \label{Time}
- time}
-\index[dir]{a name }
-A time or duration specified in seconds. The time is stored internally as a
-64 bit integer value, but it is specified in two parts: a number part and a
-modifier part. The number can be an integer or a floating point number. If it
-is entered in floating point notation, it will be rounded to the nearest
-integer. The modifer is mandatory and follows the number part, either with
-or without intervening spaces. The following modifiers are permitted:
+\end{description}
+
+\label{Time}
+\item [time]
+\index[dir]{time}
+A time or duration specified in seconds. The time is stored internally as
+a 64 bit integer value, but it is specified in two parts: a number part and
+a modifier part. The number can be an integer or a floating point number.
+If it is entered in floating point notation, it will be rounded to the
+nearest integer. The modifier is mandatory and follows the number part,
+either with or without intervening spaces. The following modifiers are
+permitted:
\begin{description}
years (3600*24*365 seconds)
\end{description}
-Any abbreviation of these modifiers is also permitted (i.e. {\bf seconds} may
-be specified as {\bf sec} or {\bf s}. A specification of {\bf m} will be
-taken as months.
+Any abbreviation of these modifiers is also permitted (i.e. {\bf seconds}
+may be specified as {\bf sec} or {\bf s}. A specification of {\bf m} will
+be taken as months.
-The specification of a time may have as many number/modifier parts as you wish.
-For example:
+The specification of a time may have as many number/modifier parts as you
+wish. For example:
\footnotesize
\begin{verbatim}
\end{verbatim}
\normalsize
-are valid date specifications (beginning with version 1.35.1).
+are valid date specifications.
-Note! in Bacula version 1.31 and below, the modifier was optional. It is now
-mandatory.
\end{description}
\label{ResTypes}
-
\subsection*{Resource Types}
\index[general]{Types!Resource }
\index[general]{Resource Types }
%%
\section*{Bacula Console}
-\label{_ChapterStart23}
+\label{_ConsoleChapter}
\index[general]{Console!Bacula }
\index[general]{Bacula Console }
\addcontentsline{toc}{section}{Bacula Console}
case you must {\bf unmount} the device, insert a blank tape, then do the
{\bf label} command.
\item The tape in the device is already a Bacula labeled tape. (Bacula will
- never relabel a Bacula labeled tape unless it is recycled and you use the
+ never relabel a Bacula labeled tape unless it is recycled and you use the
{\bf relabel} command).
\item There is no tape in the drive.
\end{enumerate}
-There are two ways to relabel a volume that already has a Bacula label. The
+There are two ways to relabel a volume that already has a Bacula label. The
brute force method is to write an end of file mark on the tape using the
system {\bf mt} program, something like the following:
each tape in the changer containing a barcode, Bacula will mount the tape and
then label it with the same name as the barcode. An appropriate Media record
will also be created in the catalog. Any barcode that begins with the same
-characters as specified on the ``CleaningPrefix=xxx'' command, will be
-treated as a cleaning tape, and will not be labeled. For example with:
+characters as specified on the "CleaningPrefix=xxx" directive in the
+Director's Pool resource, will be
+treated as a cleaning tape, and will not be labeled. However,
+an entry for the cleaning tape will be created in
+the catalog. For example with:
\footnotesize
\begin{verbatim}
job for that client. Doing a {\bf status} will not cause a database record to
be created. The client database record will be created whether or not the job
fails, but it must at least start. When the Client is actually contacted,
-additional info from the client will be added to the client record (a ``uname
--a'' output).
+additional info from the client will be added to the client record (a "uname
+-a" output).
If you want to see what Client resources you have available in your conf
file, you use the Console command {\bf show clients}.
\item [llist]
\index[console]{llist }
- The llist or ``long list'' command takes all the same arguments that the list
+ The llist or "long list" command takes all the same arguments that the list
command described above does. The difference is that the llist command list
the full contents of each database record selected. It does so by listing the
various fields of the record vertically, with one field per line. It is
Device resource, under most circumstances, Bacula will automatically access
the Volume unless you have explicitly {\bf unmount}ed it in the Console
program.
-\label{ManualPruning}
+\item[python]
+ \index[console]{python}
+ The python command takes a single argument {\bf restart}:
+
+python restart
+
+ This causes the Python interpreter in the Director to be
+ reinitialized. This can be helpful for testing because once
+ the Director starts and the Python interpreter is initialized,
+ there is no other way to make it accept any changes to the
+ startup script {\bf DirStartUp.py}. For more details on
+ Python scripting, please see the \ilink{Python Scripting}{_ChapterStart60}
+ chapter of this manual.
+
+\label{ManualPruning}
\item [prune]
\index[console]{prune }
The Prune command allows you to safely remove expired database records from
command can be dangerous because you can delete catalog records associated
with current backups of files, and we recommend that you do not use it
unless you know what you are doing. The permitted forms of {\bf purge} are:
-purge files
-jobid=\lt{}jobid\gt{}|job=\lt{}job-name\gt{}|client=\lt{}client-name\gt{}
+
+purge files jobid=\lt{}jobid\gt{}|job=\lt{}job-name\gt{}|client=\lt{}client-name\gt{}
purge jobs client=\lt{}client-name\gt{} (of all jobs)
This command is used to label physical volumes. The full form of this command
is:
-relabel storage=\lt{}storage-name\gt{} volume=\lt{}newvolume-name\gt{}
-name=\lt{}old-volume-name\gt{}
-
+relabel storage=\lt{}storage-name\gt{} oldvolume=\lt{}old-volume-name\gt{}
+ volume=\lt{}newvolume-name\gt{}
+
If you leave out any part, you will be prompted for it. In order for the
Volume (old-volume-name) to be relabeled, it must be in the catalog, and the
volume status must be marked {\bf Purged} or {\bf Recycle}. This happens
automatically as a result of applying retention periods, or you may
explicitly purge the volume using the {\bf purge} command.
-Once the volume is physically relabeled, the old data written on the Volume
-is lost and cannot be recovered.
+Once the volume is physically relabeled, the old data previously written
+on the Volume is lost and cannot be recovered.
\item [release]
\index[console]{release }
{\bf mt}), you must use the {\bf unmount} command to cause Bacula to
completely release (close) the device.
+\item [reload]
+ \index[console]{reload}
+ The reload command causes the Director to re-read its configuration
+ file and apply the new values. The new values will take effect
+ immediately for all new jobs. However, if you change schedules,
+ be aware that the scheduler pre-schedules jobs up to two hours in
+ advance, so any changes that are to take place during the next two
+ hours may be delayed. Jobs that have already been scheduled to run
+ (i.e. surpassed their requested start time) will continue with the
+ old values. New jobs will use the new values. Each time you issue
+ a reload command while jobs are running, the prior config values
+ will queued until all jobs that were running before issuing
+ the reload terminate, at which time the old config values will
+ be released from memory. The Directory permits keeping up to
+ 10 prior set of configurations before it will refuse a reload
+ command. Once at least one old set of config values has been
+ released it will again accept new reload commands.
+
+While it is possible to reload the Director's configuration on the fly,
+even while jobs are executing, this is a complex operation and not
+without side effects. Accordingly, if you have to reload the Director's
+configuration while Bacula is running, it is advisable to restart the
+Director at the next convenient opportunity.
+
+
\item [restore]
\index[console]{restore }
The restore command allows you to select one or more Jobs (JobIds) to be
Looking at the above listing from bottom to top, obviously JobId 5343 (Rufus)
is running. JobId 5348 (Minou) is waiting for JobId 5343 to finish because it
-is using the Storage resource, hence the ``waiting on max Storage jobs''.
+is using the Storage resource, hence the "waiting on max Storage jobs".
JobId 5349 has a lower priority than all the other jobs so it is waiting for
higher priority jobs to finish, and finally, JobId 2508 (MatouVerify) is
-waiting because only one job can run at a time, hence it is simply ``waiting
-execution\".</dd>
+waiting because only one job can run at a time, hence it is simply "waiting
+execution"
\item [unmount]
\index[console]{unmount }
it the same way variable expansion is done on the {\bf LabelFormat} string.
Thus, for the most part, you can test your LabelFormat strings. The
difference between the {\bf var} command and the actual LabelFormat process
- is that during the var command, no job is running so ''dummy`` values are
+ is that during the var command, no job is running so "dummy" values are
used in place of Job specific variables. Generally, however, you will get a
good idea of what is going to happen in the real case.
Before adding a volume, you must know the following information:
\begin{enumerate}
-\item The name of the Pool (normally ''Default``)
+\item The name of the Pool (normally "Default")
\item The Media Type as specified in the Storage Resource in the Director's
- configuration file (e.g. ''DLT8000``)
+ configuration file (e.g. "DLT8000")
\item The number and names of the Volumes you wish to create.
\end{enumerate}
Notice that the console program automatically appended a number to the base
Volume name that you specify (Save in this case). If you don't want it to
-append a number, you can simply answer 0 (zero) to the question ''Enter number
-of Media volumes to create. Max=1000:``, and in this case, it will create a
+append a number, you can simply answer 0 (zero) to the question "Enter number
+of Media volumes to create. Max=1000:", and in this case, it will create a
single Volume with the exact name you specify.
\index[dir]{DIRPort }
Specify the port to use to connect to the Director. This value will most
likely already be set to the value you specified on the {\bf
-\verb{--{with-base-port} option of the {\bf ./configure} command. This port must be
+\verb:--:with-base-port} option of the {\bf ./configure} command. This port must be
identical to the {\bf DIRport} specified in the {\bf Director} resource of
the
\ilink{Director's configuration}{_ChapterStart40} file. The
kind of console that was initially implemented in versions prior to 1.33 and
remains valid. Typically you would use it only for administrators.
\item The second type of console, and new to version 1.33 and higher is a
- ``named'' console defined within a Console resource in both the Director's
+ "named" console defined within a Console resource in both the Director's
configuration file and in the Console's configuration file. Both the names
and the passwords in these two entries must match much as is the case for
Client programs.
permitted to use the {\bf SetIP} command to change the Address directive in
the Director's client resource to the IP address of the Console. This permits
portables or other machines using DHCP (non-fixed IP addresses) to
-``notify'' the Director of their current IP address.
+"notify" the Director of their current IP address.
\end{itemize}
The Console resource is optional and need not be specified. However, if it is
\addcontentsline{toc}{subsection}{Console Commands}
For more details on running the console and its commands, please see the
-\ilink{Bacula Console}{_ChapterStart23} chapter of this manual.
+\ilink{Bacula Console}{_ConsoleChapter} chapter of this manual.
\subsection*{Sample Console Configuration File}
\label{SampleConfiguration2}
\company\ makes no warranty, either express or implied, including but not
limited to any implied warranties of merchantability and fitness for a
particular purpose, regarding these materials and makes such materials
-available solely on an ``as-is'' basis.
+available solely on an "as-is" basis.
In no event shall \company\ be liable to anyone for special, collateral,
incidental, or consequential damages in connection with or arising out of
If you follow the instructions in this chapter, you will have covered most of
the major problems that can occur. It goes without saying that if you ever
-find that we have left out an important point, please point it out to us, so
+find that we have left out an important point, please inform us, so
that we can document it to the benefit of everyone.
\label{Critical}
understand it, you have at least worked through the tutorial or have
equivalent experience, and that you have set up a basic production
configuration. If you haven't done the above, please do so and then come back
-here. The following is a sort of checklist that points you elsewhere in the
-manual with perhaps a brief explanation of why you should do it. The order is
-more or less the order you would use in setting up a production system (if you
-already are in production, use the checklist anyway).
+here. The following is a sort of checklist that points with perhaps a brief
+explanation of why you should do it. You will find the details elsewhere in the
+manual. The order is more or less the order you would use in setting up a
+production system (if you already are in production, use the checklist anyway).
\begin{itemize}
-\item Test your tape drive with compatibility with Bacula by using the test
+\item Test your tape drive for compatibility with Bacula by using the test
command in the \ilink{btape}{btape} program.
\item Better than doing the above is to walk through the nine steps in the
\ilink{Tape Testing}{_ChapterStart27} chapter of the manual. It
may take you a bit of time, but it will eliminate surprises.
-\item Make sure that /lib/tls is disabled. Bacula does not work with this
- library. See the second point under
+\item Test your the end of tape handling of your tape drive by using the
+ fill command in the \ilink{btape}{btape} program.
+\item If you are using a 2.4 kernel, make sure that /lib/tls is disabled. Bacula
+ does not work with this library. See the second point under
\ilink{ Supported Operating Systems.}{SupportedOSes}
\item Do at least one restore of files. If you backup both Unix and Win32
systems, restore files from each system type. The
CDROM}{_ChapterStart38} chapter. It is trivial to make such a CDROM,
and it can make system recovery in the event of a lost hard disk infinitely
easier.
+\item After doing your first backup restore some or all the data. Do this for
+ at least one client on each different OS (e.g. Linux, FreeBSD, Solaris, Win32).
\end{itemize}
\subsection*{Recommended Items}
\item After installing and experimenting with Bacula, read and work carefully
through the examples in the
\ilink{Tutorial}{_ChapterStart1} chapter of this manual.
-\item Learn what each of the \ilink{Bacula Utility Programs}{_ChapterStart9} does.
+\item Learn what each of the \ilink{Bacula Utility Programs}{_ChapterStart9}
+does.
\item Set up reasonable retention periods so that your catalog does not grow
to be too big. See the following three chapters:\\
\ilink{Recycling your Volumes}{_ChapterStart22},\\
\ilink{Basic Volume Management}{_ChapterStart39},\\
\ilink{Using Pools to Manage Volumes}{_ChapterStart11}.
\item Perform a bare metal recovery using the Bacula Rescue CDROM. See the
- \ilink{Disaster Recovery Using a Bacula Rescue CDROM}{_ChapterStart38} chapter.
- \end{itemize}
+ \ilink{Disaster Recovery Using a Bacula Rescue CDROM}{_ChapterStart38}
+ chapter.
+\end{itemize}
+
+If you absolutely must implement a system where you write a different
+tape each night and take it offsite in the morning. We recommend that you do
+several things:
+\begin{itemize}
+\item Write a bootstrap file of your backed up data and a bootstrap file
+ of your catalog backup to a floppy disk or a CDROM, and take that with
+ the tape. If this is not possible, try to write those files to another
+ computer or offsite computer, or send them as email to a friend. If none
+ of that is possible, at least print the bootstrap files and take that
+ offsite with the tape. Having the bootstrap files will make recovery
+ much easier.
+\item It is better not to force Bacula to load a particular tape each day.
+ Instead, let Bacula choose the tape. If you need to know what tape to
+ mount, you can print a list of recycled and appendable tapes daily, and
+ select any tape from that list. Bacula may propose a particular tape
+ for use that it considers optimal, but it will accept any valid tape
+ from the correct pool.
+\end{itemize}
\section*{Configuring the Director}
\label{_ChapterStart40}
-\index[general]{Director!Configuring the }
-\index[general]{Configuring the Director }
+\index[general]{Director!Configuring the}
+\index[general]{Configuring the Director}
\addcontentsline{toc}{section}{Configuring the Director}
Of all the configuration files needed to run {\bf Bacula}, the Director's is
the most complicated, and the one that you will need to modify the most often
as you add clients or modify the FileSets.
-For a general discussion of configuration file and resources including the
+For a general discussion of configuration files and resources including the
data types recognized by {\bf Bacula}. Please see the
\ilink{Configuration}{_ChapterStart16} chapter of this manual.
\subsection*{Director Resource Types}
-\index[general]{Types!Director Resource }
-\index[general]{Director Resource Types }
+\index[general]{Types!Director Resource}
+\index[general]{Director Resource Types}
\addcontentsline{toc}{subsection}{Director Resource Types}
Director resource type may be one of the following:
\begin{itemize}
\item
\ilink{Director}{DirectorResource4} -- to define the Director's
- name and its access password used for authenticating the Console program.
+ name and its access password used for authenticating the Console program.
Only a single Director resource definition may appear in the Director's
configuration file. If you have either {\bf /dev/random} or {\bf bc} on your
-machine, Bacula will generate a random password during the configuration
+machine, Bacula will generate a random password during the configuration
process, otherwise it will be left blank.
\item
\ilink{Job}{JobResource} -- to define the backup/restore Jobs
- and to tie together the Client, FileSet and Schedule resources to be used for
-each Job.
+ and to tie together the Client, FileSet and Schedule resources to be used
+ for each Job.
\item
\ilink{JobDefs}{JobDefsResource} -- optional resource for
providing defaults for Job resources.
\subsection*{The Director Resource}
\label{DirectorResource4}
-\index[general]{Director Resource }
-\index[general]{Resource!Director }
+\index[general]{Director Resource}
+\index[general]{Resource!Director}
\addcontentsline{toc}{subsection}{Director Resource}
The Director resource defines the attributes of the Directors running on the
\begin{description}
\item [Director]
- \index[dir]{Director }
+ \index[dir]{Director}
Start of the Director resource. One and only one director resource must be
supplied.
\item [Name = \lt{}name\gt{}]
- \index[dir]{Name }
+ \index[dir]{Name }
The director name used by the system administrator. This directive is
required.
\item [Description = \lt{}text\gt{}]
- \index[dir]{Description }
+ \index[dir]{Description }
The text field contains a description of the Director that will be displayed
in the graphical user interface. This directive is optional.
\item [Password = \lt{}UA-password\gt{}]
- \index[dir]{Password }
+ \index[dir]{Password }
Specifies the password that must be supplied for the default Bacula Console
to be authorized. The same password must appear in the {\bf Director}
resource of the Console configuration file. For added security, the password
is never actually passed across the network but rather a challenge response
hash code created with the password. This directive is required. If you have
-either {\bf /dev/random} {\bf bc} on your machine, Bacula will generate a
+either {\bf /dev/random} or {\bf bc} on your machine, Bacula will generate a
random password during the configuration process, otherwise it will be left
blank and you must manually supply it.
\item [Messages = \lt{}Messages-resource-name\gt{}]
- \index[dir]{Messages }
+ \index[dir]{Messages }
The messages resource specifies where to deliver Director messages that are
not associated with a specific Job. Most messages are specific to a job and
will be directed to the Messages resource specified by the job. However,
directive is required.
\item [Working Directory = \lt{}Directory\gt{}]
- \index[dir]{Working Directory }
+ \index[dir]{Working Directory }
This directive is mandatory and specifies a directory in which the Director
-may put its status files. This directory should be used only by Bacula but
-may be shared by other Bacula daemons. Standard shell expansion of the {\bf
-Directory} is done when the configuration file is read so that values such
-as {\bf \$HOME} will be properly expanded. This directive is required.
+ may put its status files. This directory should be used only by Bacula but
+ may be shared by other Bacula daemons. However, please note, if this
+ directory is shared with other Bacula daemons (the File daemon and Storage
+ daemon), you must ensure that the {\bf Name} given to each daemon is
+ unique so that the temporary filenames used do not collide. By default
+ the Bacula configure process creates unique daemon names by postfixing them
+ with -dir, -fd, and -sd. Standard shell expansion of the {\bf
+ Directory} is done when the configuration file is read so that values such
+ as {\bf \$HOME} will be properly expanded. This directive is required.
\item [Pid Directory = \lt{}Directory\gt{}]
- \index[dir]{Pid Directory }
+ \index[dir]{Pid Directory }
This directive is mandatory and specifies a directory in which the Director
-may put its process Id file files. The process Id file is used to shutdown
+may put its process Id file. The process Id file is used to shutdown
Bacula and to prevent multiple copies of Bacula from running simultaneously.
Standard shell expansion of the {\bf Directory} is done when the
configuration file is read so that values such as {\bf \$HOME} will be
not installing Bacula in the system directories, you can use the {\bf Working
Directory} as defined above. This directive is required.
+\item [Scripts Directory = \lt{}Directory\gt{}]
+ \index[dir]{Scripts Directory }
+ This directive is optional and, if defined, specifies a directory in which
+the Director
+will look for the Python startup script {\bf DirStartup.py}. This directory
+may be shared by other Bacula daemons. Standard shell expansion of the
+directory is done when the configuration file is read so that values such
+as {\bf \$HOME} will be properly expanded.
+
\item [QueryFile = \lt{}Path\gt{}]
- \index[dir]{QueryFile }
+ \index[dir]{QueryFile }
This directive is mandatory and specifies a directory and file in which the
Director can find the canned SQL statements for the {\bf Query} command of
the Console. Standard shell expansion of the {\bf Path} is done when the
\label{DirMaxConJobs}
\item [Maximum Concurrent Jobs = \lt{}number\gt{}]
- \index[dir]{Maximum Concurrent Jobs }
+ \index[dir]{Maximum Concurrent Jobs }
where \lt{}number\gt{} is the maximum number of total Director Jobs that
should run concurrently. The default is set to 1, but you may set it to a
larger number.
of this manual.
\item [FD Connect Timeout = \lt{}time\gt{}]
- \index[dir]{FD Connect Timeout }
- where {\bf time} is the time that the Director should continue attempting to
+ \index[dir]{FD Connect Timeout }
+ where {\bf time} is the time that the Director should continue attempting
+to
contact the File daemon to start a job, and after which the Director will
cancel the job. The default is 30 minutes.
\item [SD Connect Timeout = \lt{}time\gt{}]
- \index[dir]{SD Connect Timeout }
- where {\bf time} is the time that the Director should continue attempting to
+ \index[dir]{SD Connect Timeout }
+ where {\bf time} is the time that the Director should continue attempting
+to
contact the Storage daemon to start a job, and after which the Director will
cancel the job. The default is 30 minutes.
\item [DirAddresses = \lt{}IP-address-specification\gt{}]
- \index[dir]{DirAddresses }
+ \index[dir]{DirAddresses }
Specify the ports and addresses on which the Director daemon will listen for
-Bacula Console connections. Probably the simplest way to explain this is to show
+Bacula Console connections. Probably the simplest way to explain this is to
+show
an example:
\footnotesize
\begin{verbatim}
DirAddresses = { ip = {
- addr = 1.2.3.4; port = 1205; }
+ addr = 1.2.3.4; port = 1205;}
ipv4 = {
- addr = 1.2.3.4; port = http; }
+ addr = 1.2.3.4; port = http;}
ipv6 = {
addr = 1.2.3.4;
port = 1205;
- }
+ }
ip = {
addr = 1.2.3.4
port = 1205
- }
+ }
ip = {
addr = 1.2.3.4
- }
+ }
ip = {
addr = 201:220:222::2
- }
+ }
ip = {
addr = bluedot.thun.net
- }
- }
+ }
+}
\end{verbatim}
\normalsize
only IPv4 resolutions will be permitted, and likewise with ip6.
\item [DIRport = \lt{}port-number\gt{}]
- \index[dir]{DIRport }
+ \index[dir]{DIRport }
Specify the port (a positive integer) on which the Director daemon will
listen for Bacula Console connections. This same port number must be
specified in the Director resource of the Console configuration file. The
directive is not needed if you specify DirAddresses.
\item [DirAddress = \lt{}IP-Address\gt{}]
- \index[dir]{DirAddress }
+ \index[dir]{DirAddress }
This directive is optional, but if it is specified, it will cause the
Director server (for the Console program) to bind to the specified {\bf
IP-Address}, which is either a domain name or an IP address specified as a
\subsection*{The Job Resource}
\label{JobResource}
-\index[general]{Resource!Job }
-\index[general]{Job Resource }
+\index[general]{Resource!Job}
+\index[general]{Job Resource}
\addcontentsline{toc}{subsection}{Job Resource}
The Job resource defines a Job (Backup, Restore, ...) that Bacula must
-perform. Each Job resource definition contains the names of the Clients and
-their FileSets to backup or restore, the Schedule for the Job, where the data
+perform. Each Job resource definition contains the name of a Client and
+a FileSet to backup, the Schedule for the Job, where the data
are to be stored, and what media Pool can be used. In effect, each Job
resource must specify What, Where, How, and When or FileSet, Storage,
-Backup/Restore/Level, and Schedule respectively.
+Backup/Restore/Level, and Schedule respectively. Note, the FileSet must
+be specified for a restore job for historical reasons, but it is no longer used.
Only a single type ({\bf Backup}, {\bf Restore}, ...) can be specified for any
job. If you want to backup multiple FileSets on the same Client or multiple
\begin{description}
\item [Job]
- \index[dir]{Job }
+ \index[dir]{Job}
Start of the Job resource. At least one Job resource is required.
\item [Name = \lt{}name\gt{}]
- \index[dir]{Name }
+ \index[dir]{Name }
The Job name. This name can be specified on the {\bf Run} command in the
console program to start a job. If the name contains spaces, it must be
specified between quotes. It is generally a good idea to give your job the
- same name as the Client that it will backup. This permits easy identification
- of jobs.
+ same name as the Client that it will backup. This permits easy
+ identification of jobs.
When the job actually runs, the unique Job Name will consist of the name you
specify here followed by the date and time the job was scheduled for
execution. This directive is required.
\item [Type = \lt{}job-type\gt{}]
- \index[dir]{Type }
+ \index[dir]{Type }
The {\bf Type} directive specifies the Job type, which may be one of the
-following: {\bf Backup}, {\bf Restore}, {\bf Verify}, or {\bf Admin}. This
-directive is required. Within a particular Job Type, there are also Levels
-as discussed in the next item.
+ following: {\bf Backup}, {\bf Restore}, {\bf Verify}, or {\bf Admin}. This
+ directive is required. Within a particular Job Type, there are also Levels
+ as discussed in the next item.
\begin{description}
\item [Backup]
- \index[dir]{Backup }
+ \index[dir]{Backup}
Run a backup Job. Normally you will have at least one Backup job for each
client you want to save. Normally, unless you turn off cataloging, most all
the important statistics and data concerning files backed up will be placed
in the catalog.
\item [Restore]
- \index[dir]{Restore }
- Run a restore Job. Normally, you will specify only one Restore job which acts
+ \index[dir]{Restore}
+ Run a restore Job. Normally, you will specify only one Restore job which
+acts
as a sort of prototype that you will modify using the console program in
order to perform restores. Although certain basic information from a Restore
job is saved in the catalog, it is very minimal compared to the information
generated since no Files are saved.
\item [Verify]
- \index[dir]{Verify }
+ \index[dir]{Verify}
Run a verify Job. In general, {\bf verify} jobs permit you to compare the
contents of the catalog to the file system, or to what was backed up. In
addition, to verifying that a tape that was written can be read, you can
also use {\bf verify} as a sort of tripwire intrusion detection.
\item [Admin]
- \index[dir]{Admin }
+ \index[dir]{Admin}
Run an admin Job. An {\bf Admin} job can be used to periodically run catalog
pruning, if you do not want to do it at the end of each {\bf Backup} Job.
Although an Admin job is recorded in the catalog, very little data is saved.
\label{Level}
\item [Level = \lt{}job-level\gt{}]
- \index[dir]{Level }
- The Level directive specifies the default Job level to be run. Each different
+ \index[dir]{Level }
+ The Level directive specifies the default Job level to be run. Each
+different
Job Type (Backup, Restore, ...) has a different set of Levels that can be
specified. The Level is normally overridden by a different value that is
specified in the {\bf Schedule} resource. This directive is not required, but
-must be specified either by a {\bf Level} directive or as a override
+must be specified either by a {\bf Level} directive or as an override
specified in the {\bf Schedule} resource.
For a {\bf Backup} Job, the Level may be one of the following:
\begin{description}
\item [Full]
- \index[dir]{Full }
+ \index[dir]{Full}
is all files in the FileSet whether or not they have changed.
\item [Incremental]
- \index[dir]{Incremental }
- is all files that have changed since the last successful backup of the
-specified FileSet. If the Director cannot find a previous Full backup then
-the job will be upgraded into a Full backup. When the Director looks for a
-``suitable'' backup record in the catalog database, it looks for a previous
-Job with:
+ \index[dir]{Incremental}
+ is all files specified in the FileSet that have changed since the last successful backup of the
+ the same Job using the same FileSet and Client.
+ If the Director cannot find a previous valid Full backup then
+ the job will be upgraded into a Full backup. When the Director looks for a
+ valid backup record in the catalog database, it looks for a previous
+ Job with:
\begin{itemize}
\item The same Job name.
The File daemon (Client) decides which files to backup for an Incremental
backup by comparing start time of the prior Job (Full, Differential, or
-Incremental) against the time each file was last ``modified'' (st\_mtime) and
-the time its attributes were last ``changed''(st\_ctime). If the file was
+Incremental) against the time each file was last "modified" (st\_mtime) and
+the time its attributes were last "changed"(st\_ctime). If the file was
modified or its attributes changed on or after this start time, it will then
be backed up.
Please note that some virus scanning software may change st\_ctime while
-doing the scan. For exaple, if the the virus scanning program attempts to
+doing the scan. For example, if the virus scanning program attempts to
reset the access time (st\_atime), which Bacula does not use, it will cause
st\_ctime to change and hence Bacula will backup the file during an
Incremental or Differential backup. In the case of Sophos virus scanning, you
can prevent it from resetting the access time (st\_atime) and hence changing
-st\_ctime by using the {\bf \verb{--{no-reset-atime} option. For other software,
+st\_ctime by using the {\bf \verb:--:no-reset-atime} option. For other
+software,
please see their manual.
When Bacula does an Incremental backup, all modified files that are still on
files from the catalog during an Incremental backup is quite a time consuming
process and not currently implemented in Bacula.
+In addition, if you move a directory rather than copy it, the files in it do not
+have their modification time (st\_mtime) or their attribute change time
+(st\_ctime)
+changed. As a consequence, those files will probably not be backed up by an
+Incremental
+or Differential backup which depend solely on these time stamps. If you move a
+directory,
+and wish it to be properly backed up, it is generally preferable to copy it,
+then
+delete the original.
+
\item [Differential]
- \index[dir]{Differential }
- is all files that have changed since the last successful Full backup of the
-specified FileSet. If the Director cannot find a previous Full backup or a
-suitable Full backup, then the Differential job will be upgraded into a Full
-backup. When the Director looks for a ``suitable'' Full backup record in the
-catalog database, it looks for a previous Job with:
+ \index[dir]{Differential}
+ is all files specified in the FileSet that have changed since the last
+ successful Full backup of the same Job. If the Director cannot find a
+ valid previous Full backup for the same Job, FileSet, and Client,
+ backup, then the Differential job will be upgraded into a Full backup.
+ When the Director looks for a valid Full backup record in the catalog
+ database, it looks for a previous Job with:
\begin{itemize}
\item The same Job name.
different FileSet.
\item The Job was a FULL backup.
\item The Job terminated normally (i.e. did not fail or was not canceled).
- \end{itemize}
+\end{itemize}
If all the above conditions do not hold, the Director will upgrade the
Differential to a Full save. Otherwise, the Differential backup will be
The File daemon (Client) decides which files to backup for a differential
backup by comparing the start time of the prior Full backup Job against the
-time each file was last ``modified'' (st\_mtime) and the time its attributes
-were last ``changed''(st\_ctime). If the file was modified or its attributs
-were changed on or after this start time, it will then be backed up. The
+time each file was last "modified" (st\_mtime) and the time its attributes
+were last "changed" (st\_ctime). If the file was modified or its attributes
+were changed on or after this start time, it will then be backed up. The
start time used is displayed after the {\bf Since} on the Job report. In rare
cases, using the start time of the prior backup may cause some files to be
backed up twice, but it ensures that no change is missed. As with the
makes the necessary adjustments to the time between the server and the client
so that the times Bacula uses are synchronized.
-When Bacula does a Differential backup, all modified files that are still on
-the system are backed up. However, any file that has been deleted since the
-last Full backup remains in the Bacula catalog, which means that if between
-a Full save and the time you do a restore, some files are deleted, those
-deleted files will also be restored. The deleted files will no longer appear
-in the catalog after doing another Full save. However, to remove deleted
-files from the catalog during a Differential backup is quite a time consuming
-process and not currently implemented in Bacula.
+When Bacula does a Differential backup, all modified files that are still
+on the system are backed up. However, any file that has been deleted since
+the last Full backup remains in the Bacula catalog, which means that if
+between a Full save and the time you do a restore, some files are deleted,
+those deleted files will also be restored. The deleted files will no
+longer appear in the catalog after doing another Full save. However, to
+remove deleted files from the catalog during a Differential backup is quite
+a time consuming process and not currently implemented in Bacula. It is,
+however, a planned future feature.
+
+
+As noted above, if you move a directory rather than copy it, the
+files in it do not have their modification time (st\_mtime) or
+their attribute change time (st\_ctime) changed. As a
+consequence, those files will probably not be backed up by an
+Incremental or Differential backup which depend solely on these
+time stamps. If you move a directory, and wish it to be
+properly backed up, it is generally preferable to copy it, then
+delete the original. Alternatively, you can move the directory, then
+use the {\bf touch} program to update the timestamps.
+
+Every once and a while, someone asks why we need Differential
+backups as long as Incremental backups pickup all changed files.
+There are possibly many answers to this question, but the one
+that is the most important for me is that it effectively combines
+all the Incremental and Differential backups since the last Full
+backup into a single Differential backup. This has two effects:
+1. It gives some redundancy. 2. More importantly, it reduces the
+number of Volumes that are needed to do a restore effectively
+eliminating the need to read all the volumes on which the
+preceding Incremental and Differential backups since the last
+Full are done.
+
+
\end{description}
For a {\bf Restore} Job, no level needs to be specified.
\begin{description}
\item [InitCatalog]
- \index[dir]{InitCatalog }
+ \index[dir]{InitCatalog}
does a scan of the specified {\bf FileSet} and stores the file
attributes in the Catalog database. Since no file data is saved, you
might ask why you would want to do this. It turns out to be a very
the files.
\item [Catalog]
- \index[dir]{Catalog }
+ \index[dir]{Catalog}
Compares the current state of the files against the state previously
saved during an {\bf InitCatalog}. Any discrepancies are reported. The
items reported are determined by the {\bf verify} options specified on
track new files.
\item [VolumeToCatalog]
- \index[dir]{VolumeToCatalog }
+ \index[dir]{VolumeToCatalog}
This level causes Bacula to read the file attribute data written to the
Volume from the last Job. The file attribute data are compared to the values
saved in the Catalog database and any differences are reported. This is
similar to the {\bf Catalog} level except that instead of comparing the disk
file attributes to the catalog database, the attribute data written to the
Volume is read and compared to the catalog database. Although the attribute
-data including the signatures (MD5 or SHA1) are compared the actual file data
+data including the signatures (MD5 or SHA1) are compared, the actual file data
is not compared (it is not in the catalog).
Please note! If you run two Verify VolumeToCatalog jobs on the same client at
Verify VolumeToCatalog modifies the Catalog database while running.
\item [DiskToCatalog]
- \index[dir]{DiskToCatalog }
- This level causes Bacula to read the files as they currently are on disk, and
+ \index[dir]{DiskToCatalog}
+ This level causes Bacula to read the files as they currently are on disk,
+and
to compare the current file attributes with the attributes saved in the
catalog from the last backup for the job specified on the {\bf VerifyJob}
directive. This level differs from the {\bf Catalog} level described above by
\end{description}
\item [Verify Job = \lt{}Job-Resource-Name\gt{}]
- \index[dir]{Verify Job }
+ \index[dir]{Verify Job }
If you run a verify job without this directive, the last job run will be
compared with the catalog, which means that you must immediately follow a
backup by a verify command. If you specify a {\bf Verify Job} Bacula will
often a {\bf VolumeToCatalog}) so that the tape just written is re-read.
\item [JobDefs = \lt{}JobDefs-Resource-Name\gt{}]
- \index[dir]{JobDefs }
+ \index[dir]{JobDefs }
If a JobDefs-Resource-Name is specified, all the values contained in the
named JobDefs resource will be used as the defaults for the current Job. Any
value that you explicitly define in the current Job resource, will override
bacula-dir.conf file.
\item [Bootstrap = \lt{}bootstrap-file\gt{}]
- \index[dir]{Bootstrap }
+ \index[dir]{Bootstrap }
The Bootstrap directive specifies a bootstrap file that, if provided, will
be used during {\bf Restore} Jobs and is ignored in other Job types. The {\bf
bootstrap} file contains the list of tapes to be used in a restore Job as
\label{writebootstrap}
\item [Write Bootstrap = \lt{}bootstrap-file-specification\gt{}]
- \index[dir]{a name }
+ \index[dir]{a name}
The {\bf writebootstrap} directive specifies a file name where Bacula will
write a {\bf bootstrap} file for each Backup job run. Thus this directive
applies only to Backup Jobs. If the Backup job is a Full save, Bacula will
\ilink{The Bootstrap File}{_ChapterStart43} of this manual.
\item [Client = \lt{}client-resource-name\gt{}]
- \index[dir]{Client }
+ \index[dir]{Client }
The Client directive specifies the Client (File daemon) that will be used in
the current Job. Only a single Client may be specified in any one Job. The
Client runs on the machine to be backed up, and sends the requested files to
This directive is required.
\item [FileSet = \lt{}FileSet-resource-name\gt{}]
- \index[dir]{FileSet }
- The FileSet directive specifies the FileSet that will be used in the current
+ \index[dir]{FileSet }
+ The FileSet directive specifies the FileSet that will be used in the
+current
Job. The FileSet specifies which directories (or files) are to be backed up,
and what options to use (e.g. compression, ...). Only a single FileSet
resource may be specified in any one Job. For additional details, see the
chapter. This directive is required.
\item [Messages = \lt{}messages-resource-name\gt{}]
- \index[dir]{Messages }
- The Messages directive defines what Messages resource should be used for this
+ \index[dir]{Messages }
+ The Messages directive defines what Messages resource should be used for
+this
job, and thus how and where the various messages are to be delivered. For
example, you can direct some messages to a log file, and others can be sent
by email. For additional details, see the
manual. This directive is required.
\item [Pool = \lt{}pool-resource-name\gt{}]
- \index[dir]{Pool }
- The Pool directive defines the pool of Volumes where your data can be backed
+ \index[dir]{Pool }
+ The Pool directive defines the pool of Volumes where your data can be backed
up. Many Bacula installations will use only the {\bf Default} pool. However,
if you want to specify a different set of Volumes for different Clients or
different Jobs, you will probably want to use Pools. For additional details,
see the
\ilink{Pool Resource section}{PoolResource} of this chapter. This
- resource is required.
+ directive is required.
\item [Full Backup Pool = \lt{}pool-resource-name\gt{}]
- \index[dir]{Full Backup Pool }
+ \index[dir]{Full Backup Pool }
The {\it Full Backup Pool} specifies a Pool to be used for Full backups. It
- will override any Pool specification during a Full backup. This resource is
+ will override any Pool specification during a Full backup. This directive is
optional.
\item [Differential Backup Pool = \lt{}pool-resource-name\gt{}]
- \index[dir]{Differential Backup Pool }
+ \index[dir]{Differential Backup Pool }
The {\it Differential Backup Pool} specifies a Pool to be used for
Differential backups. It will override any Pool specification during a
- Differential backup. This resource is optional.
+ Differential backup. This directive is optional.
\item [Incremental Backup Pool = \lt{}pool-resource-name\gt{}]
- \index[dir]{Incremental Backup Pool }
- The {\it Incremental Backup Pool} specifies a Pool to be used for Incremental
- backups. It will override any Pool specification during an Incremental backup.
- This resource is optional.
+ \index[dir]{Incremental Backup Pool }
+ The {\it Incremental Backup Pool} specifies a Pool to be used for
+Incremental
+ backups. It will override any Pool specification during an Incremental
+backup.
+ This directive is optional.
\item [Schedule = \lt{}schedule-name\gt{}]
- \index[dir]{Schedule }
- The Schedule directive defines what schedule is to be used for the Job. The
- schedule determines when the Job will be automatically started and what Job
- level (i.e. Full, Incremental, ...) is to be run. This directive is optional,
- and if left out, the Job can only be started manually. For additional
- details, see the
- \ilink{Schedule Resource Chapter}{ScheduleResource} of this
- manual. If a Schedule resource is specified, the job will be run according to
- the schedule specified. If no Schedule resource is specified for the Job,
- the job must be manually started using the Console program. Although you may
- specify only a single Schedule resource for any one job, the Schedule
- resource may contain multiple {\bf Run} directives, which allow you to run
- the Job at many different times, and each {\bf run} directive permits
- overriding the default Job Level Pool, Storage, and Messages resources. This
- gives considerable flexibility in what can be done with a single Job.
+ \index[dir]{Schedule }
+ The Schedule directive defines what schedule is to be used for the Job.
+ The schedule in turn determines when the Job will be automatically
+ started and what Job level (i.e. Full, Incremental, ...) is to be run.
+ This directive is optional, and if left out, the Job can only be started
+ manually using the Console program. Although you may specify only a
+ single Schedule resource for any one job, the Schedule resource may
+ contain multiple {\bf Run} directives, which allow you to run the Job at
+ many different times, and each {\bf run} directive permits overriding
+ the default Job Level Pool, Storage, and Messages resources. This gives
+ considerable flexibility in what can be done with a single Job. For
+ additional details, see the \ilink{Schedule Resource
+ Chapter}{ScheduleResource} of this manual.
+
\item [Storage = \lt{}storage-resource-name\gt{}]
- \index[dir]{Storage }
- The Storage directive defines the name of the storage services where you want
+ \index[dir]{Storage }
+ The Storage directive defines the name of the storage services where you
+want
to backup the FileSet data. For additional details, see the
\ilink{Storage Resource Chapter}{StorageResource2} of this manual.
This directive is required.
\item [Max Start Delay = \lt{}time\gt{}]
- \index[dir]{Max Start Delay }
+ \index[dir]{Max Start Delay }
The time specifies the maximum delay between the scheduled time and the
actual start time for the Job. For example, a job can be scheduled to
run at 1:00am, but because other jobs are running, it may wait to run.
which indicates no limit.
\item [Max Run Time = \lt{}time\gt{}]
- \index[dir]{Max Run Time }
+ \index[dir]{Max Run Time }
The time specifies the maximum allowed time that a job may run, counted
from when the job starts, ({\bf not} necessarily the same as when the
job was scheduled). This directive is implemented in version 1.33 and
later.
\item [Max Wait Time = \lt{}time\gt{}]
- \index[dir]{Max Wait Time }
+ \index[dir]{Max Wait Time }
The time specifies the maximum allowed time that a job may block waiting
for a resource (such as waiting for a tape to be mounted, or waiting for
the storage or file daemons to perform their duties), counted from the
\item [Incremental Max Wait Time = \lt{}time\gt{}]
- \index[dir]{Incremental Max Wait Time }
+ \index[dir]{Incremental Max Wait Time }
The time specifies the maximum allowed time that an Incremental backup
job may block waiting for a resource (such as waiting for a tape to be
mounted, or waiting for the storage or file daemons to perform their
{\bf Max Wait Time} it may also be applied to the job.
\item [Differential Max Wait Time = \lt{}time\gt{}]
- \index[dir]{Differential Max Wait Time }
+ \index[dir]{Differential Max Wait Time }
The time specifies the maximum allowed time that a Differential backup
job may block waiting for a resource (such as waiting for a tape to be
mounted, or waiting for the storage or file daemons to perform their
the same as when the job was scheduled). Please note that if there is a
{\bf Max Wait Time} it may also be applied to the job.
+\item [Prefer Mounted Volumes = \lt{}yes|no\gt{}]
+ \index[dir]{Prefer Mounted Volumes}
+ It the Prefer Mounted Volumes directive is set to {\bf yes}
+ (default yes), it is used to inform the Storage daemon
+ to select either an Autochanger or a drive with a valid
+ Volume already mounted in preference to a drive that is
+ not ready. If none is available, it will select the first
+ available drive. If the directive is set to {\bf no}, the
+ Storage daemon will prefer finding an unused drive. This
+ can potentially be useful for those sites that prefer to
+ maximum backup throughput at the expense of using additional
+ drives and Volumes.
+
+
\item [Prune Jobs = \lt{}yes|no\gt{}]
- \index[dir]{Prune Jobs }
+ \index[dir]{Prune Jobs }
Normally, pruning of Jobs from the Catalog is specified on a Client by
Client basis in the Client resource with the {\bf AutoPrune} directive.
If this directive is specified (not normally) and the value is {\bf
\item [Prune Files = \lt{}yes|no\gt{}]
- \index[dir]{Prune Files }
+ \index[dir]{Prune Files }
Normally, pruning of Files from the Catalog is specified on a Client by
Client basis in the Client resource with the {\bf AutoPrune} directive.
If this directive is specified (not normally) and the value is {\bf
default is {\bf no}.
\item [Prune Volumes = \lt{}yes|no\gt{}]
- \index[dir]{Prune Volumes }
+ \index[dir]{Prune Volumes }
Normally, pruning of Volumes from the Catalog is specified on a Client
by Client basis in the Client resource with the {\bf AutoPrune}
directive. If this directive is specified (not normally) and the value
resource. The default is {\bf no}.
\item [Run Before Job = \lt{}command\gt{}]
- \index[dir]{Run Before Job }
+ \index[dir]{Run Before Job }
The specified {\bf command} is run as an external program prior to
- running the current Job. Any output sent by the job to standard output
+ running the current Job. Any output sent by the command to standard output
will be included in the Bacula job report. The command string must be a
valid program name or name of a shell script. This directive is not
required, but if it is defined, and if the exit code of the program run
Thus if you edit it on a command line, you will need to enclose
it within some sort of quotes.
- Bacula checks the exit status of the RunBeforeJob
- program. If it is non-zero, the job will be error terminated. Lutz Kittler
- has pointed out that this can be a simple way to modify your schedules during
- a holiday. For example, suppose that you normally do Full backups on Fridays,
- but Thursday and Friday are holidays. To avoid having to change tapes between
- Thursday and Friday when no one is in the office, you can create a
- RunBeforeJob that returns a non-zero status on Thursday and zero on all other
- days. That way, the Thursday job will not run, and on Friday the tape you
- inserted on Wednesday before leaving will be used.
+ Bacula checks the exit status of the RunBeforeJob program. If it is
+ non-zero, the job will be error terminated. Lutz Kittler has pointed
+ out that using the RunBeforJob directive can be a simple way to modify
+ your schedules during a holiday. For example, suppose that you normally
+ do Full backups on Fridays, but Thursday and Friday are holidays. To
+ avoid having to change tapes between Thursday and Friday when no one is
+ in the office, you can create a RunBeforeJob that returns a non-zero
+ status on Thursday and zero on all other days. That way, the Thursday
+ job will not run, and on Friday the tape you inserted on Wednesday
+ before leaving will be used.
\item [Run After Job = \lt{}command\gt{}]
- \index[dir]{Run After Job }
- The specified {\bf command} is run as an external program after the current
- job terminates. This directive is not required. The command string must be a
- valid program name or name of a shell script. If the exit code of the program
- run is non-zero, the current Bacula job will terminate in error. Before
- submitting the specified command to the operating system, Bacula performs
- character substitution as described above for the {\bf Run Before Job}
- directive.
+ \index[dir]{Run After Job }
+ The specified {\bf command} is run as an external program after the
+ current job terminates. This directive is not required. The command
+ string must be a valid program name or name of a shell script. If the
+ exit code of the program run is non-zero, the current Bacula job will
+ terminate in error. Before submitting the specified command to the
+ operating system, Bacula performs character substitution as described
+ above for the {\bf Run Before Job} directive.
- An example of the use of this command is given in the
+ An example of the use of this directive is given in the
\ilink{Tips Chapter}{JobNotification} of this manual. As of version
1.30, Bacula checks the exit status of the RunAfter program. If it is
non-zero, the job will be terminated in error.
\item [Client Run Before Job = \lt{}command\gt{}]
- \index[dir]{Client Run Before Job }
- This command is the same as {\bf Run Before Job} except that it is run on
+ \index[dir]{Client Run Before Job }
+ This directive is the same as {\bf Run Before Job} except that the program is run on
the client machine. The same restrictions apply to Unix systems as noted
above for the {\bf Run Before Job}. In addition, for a Windows client on
version 1.33 and above, please take careful note that you must ensure a
{\bf Special Windows Considerations}
The command can be anything that cmd.exe or command.com will recognize as an
- executable file. Specifiying the executable's extension is optional, unless
+ executable file. Specifying the executable's extension is optional, unless
there is an ambiguity. (i.e. ls.bat, ls.exe)
- The System \%Path\% will be searched for the command. (under the envrionment
+ The System \%Path\% will be searched for the command. (under the environment
variable dialog you have have both System Environment and User Environment,
we believe that only the System environment will be available to bacula-fd,
if it is running as a service.)
- System environment variables can be called out using the \%var\% syntax and
+ System environment variables can be referenced with \%var\% and
used as either part of the command name or arguments.
- When specifiying a full path to an executable if the path or executable name
+ When specifying a full path to an executable if the path or executable name
contains whitespace or special characters they will need to be quoted.
Arguments containing whitespace or special characters will also have to be
quoted.
The special characters \&()[]\{\}\^{}=;!'+,`\~{} will need to be quoted if
they are part of a filename or argument.
- If someone is logged in, a blank ``command'' window running the commands will
+ If someone is logged in, a blank "command" window running the commands
+will
be present during the execution of the command.
Some Suggestions from Phil Stracchino for running on Win32 machines with the
\begin{enumerate}
\item You might want the ClientRunBeforeJob directive to specify a .bat file
- which runs the actual client-side commands, rather than trying to run (for
+ which runs the actual client-side commands, rather than trying to run
+(for
example) regedit /e directly.
\item The batch file should explicitly 'exit 0' on successful completion.
\item The path to the batch file should be specified in Unix form:
- ClientRunBeforeJob = ``c:/bacula/bin/systemstate.bat''
+ ClientRunBeforeJob = "c:/bacula/bin/systemstate.bat"
rather than DOS/Windows form:
ClientRunBeforeJob =
- ``c:\textbackslash{}bacula\textbackslash{}bin\textbackslash{}systemstate.bat''
+
+"c:\textbackslash{}bacula\textbackslash{}bin\textbackslash{}systemstate.bat"
INCORRECT
\end{enumerate}
The following example of the use of the Client Run Before Job directive was
submitted by a user:\\
-You could write a shell script to back up a DB2 database to a FIFO. The shell script is:
+You could write a shell script to back up a DB2 database to a FIFO. The shell
+script is:
\footnotesize
\begin{verbatim}
\end{verbatim}
\normalsize
-The following line in the Job resoure in the bacula-dir.conf file:
+The following line in the Job resource in the bacula-dir.conf file:
\footnotesize
\begin{verbatim}
- Client Run Before Job = "su - mercuryd -c \"/u01/mercuryd/backupdb.sh '%t' '%l'\""
+ Client Run Before Job = "su - mercuryd -c \"/u01/mercuryd/backupdb.sh '%t'
+'%l'\""
\end{verbatim}
\normalsize
- When the job is run, you will get messages from the output of the script stating
+ When the job is run, you will get messages from the output of the script
+stating
that the backup has started. Even though the command being run is
- backgrounded with \&, the job will block until the "db2 BACKUP DATABASE" command,
+ backgrounded with \&, the job will block until the "db2 BACKUP DATABASE"
+command,
thus the backup stalls.
- To remedy this situation, the "db2 BACKUP DATABASE" line should be changed to the following:
+ To remedy this situation, the "db2 BACKUP DATABASE" line should be changed to
+the following:
\footnotesize
\begin{verbatim}
- db2 BACKUP DATABASE mercuryd TO $DIR/dbpipe WITHOUT PROMPTING > $DIR/backup.log 2>&1 < /dev/null &
+ db2 BACKUP DATABASE mercuryd TO $DIR/dbpipe WITHOUT PROMPTING > $DIR/backup.log
+2>&1 < /dev/null &
\end{verbatim}
\normalsize
\item [Client Run After Job = \lt{}command\gt{}]
- \index[dir]{Client Run After Job }
- This command is the same as {\bf Run After Job} except that it is run on the
+ \index[dir]{Client Run After Job }
+ This directive is the same as {\bf Run After Job} except that it is run on
+the
client machine. Note, please see the notes above in {\bf Client Run Before
Job} concerning Windows clients.
\item [Rerun Failed Levels = \lt{}yes|no\gt{}]
- \index[dir]{Rerun Failed Levels }
- If this directive is set to {\bf yes} (default no), and Bacula detects that a
+ \index[dir]{Rerun Failed Levels }
+ If this directive is set to {\bf yes} (default no), and Bacula detects that
+a
previous job at a higher level (i.e. Full or Differential) has failed, the
current job level will be upgraded to the higher level. This is particularly
useful for Laptops where they may often be unreachable, and if a prior Full
- save has failed, you wish the very next backup to be a Full save rather than
+ save has failed, you wish the very next backup to be a Full save rather
+than
whatever level it is started as.
\item [Spool Data = \lt{}yes|no\gt{}]
- \index[dir]{Spool Data }
+ \index[dir]{Spool Data }
If this directive is set to {\bf yes} (default no), the Storage daemon will
be requested to spool the data for this Job to disk rather than write it
directly to tape. Once all the data arrives or the spool files' maximum sizes
disk file.
\item [Spool Attributes = \lt{}yes|no\gt{}]
- \index[dir]{Spool Attributes }
- The default is set to {\bf no}, which means that the File attributes are sent
+ \index[dir]{Spool Attributes }
+ The default is set to {\bf no}, which means that the File attributes are
+sent
by the Storage daemon to the Director as they are stored on tape. However,
if you want to avoid the possibility that database updates will slow down
writing to the tape, you may want to set the value to {\bf yes}, in which
case the Storage daemon will buffer the File attributes and Storage
coordinates to a temporary file in the Working Directory, then when writing
the Job data to the tape is completed, the attributes and storage coordinates
-will be sent to the Director. The default is {\bf no}.
+will be sent to the Director.
\item [Where = \lt{}directory\gt{}]
- \index[dir]{Where }
+ \index[dir]{Where }
This directive applies only to a Restore job and specifies a prefix to the
directory name of all files being restored. This permits files to be restored
in a different location from which they were saved. If {\bf Where} is not
accidental overwriting of your files.
\item [Replace = \lt{}replace-option\gt{}]
- \index[dir]{Replace }
+ \index[dir]{Replace }
This directive applies only to a Restore job and specifies what happens when
Bacula wants to restore a file or directory that already exists. You have the
following options for {\bf replace-option}:
\begin{description}
\item [always]
- \index[dir]{always }
- when the file to be restored already exists, it is deleted and then replaced by
+ \index[dir]{always}
+ when the file to be restored already exists, it is deleted and then replaced
+by
the copy that was backed up.
\item [ifnewer]
- \index[dir]{ifnewer }
+ \index[dir]{ifnewer}
if the backed up file (on tape) is newer than the existing file, the existing
file is deleted and replaced by the back up.
\item [ifolder]
- \index[dir]{ifolder }
+ \index[dir]{ifolder}
if the backed up file (on tape) is older than the existing file, the existing
file is deleted and replaced by the back up.
\item [never]
- \index[dir]{never }
+ \index[dir]{never}
if the backed up file already exists, Bacula skips restoring this file.
\end{description}
\item [Prefix Links=\lt{}yes|no\gt{}]
- \index[dir]{Prefix Links }
+ \index[dir]{Prefix Links}
If a {\bf Where} path prefix is specified for a recovery job, apply it
to absolute links as well. The default is {\bf No}. When set to {\bf
Yes} then while restoring files to an alternate directory, any absolute
original locations, all files linked with absolute names will be broken.
\item [Maximum Concurrent Jobs = \lt{}number\gt{}]
- \index[dir]{Maximum Concurrent Jobs }
+ \index[dir]{Maximum Concurrent Jobs }
where \lt{}number\gt{} is the maximum number of Jobs from the current
Job resource that can run concurrently. Note, this directive limits
only Jobs with the same name as the resource in which it appears. Any
Director's resource.
\item [Reschedule On Error = \lt{}yes|no\gt{}]
- \index[dir]{Reschedule On Error }
+ \index[dir]{Reschedule On Error }
If this directive is enabled, and the job terminates in error, the job
will be rescheduled as determined by the {\bf Reschedule Interval} and
{\bf Reschedule Times} directives. If you cancel the job, it will not
machines that are not always connected to the network or switched on.
\item [Reschedule Interval = \lt{}time-specification\gt{}]
- \index[dir]{Reschedule Interval }
+ \index[dir]{Reschedule Interval }
If you have specified {\bf Reschedule On Error = yes} and the job
terminates in error, it will be rescheduled after the interval of time
- specified by {\bf time-specification}. See \ilink{ the time
+ specified by {\bf time-specification}. See \ilink{the time
specification formats}{Time} in the Configure chapter for details of
time specifications. If no interval is specified, the job will not be
rescheduled on error.
\item [Reschedule Times = \lt{}count\gt{}]
- \index[dir]{Reschedule Times }
+ \index[dir]{Reschedule Times }
This directive specifies the maximum number of times to reschedule the
job. If it is set to zero (the default) the job will be rescheduled an
indefinite number of times.
+\item [Run = \lt{}job-name\gt{}]
+ \index[dir]{Run directive}
+ \index[dir]{Clone a Job}
+ The Run directive (not to be confused with the Run option in a
+ Schedule) allows you to clone jobs and thus, if you want backup
+ the same data (or almost the same data) to two or more drives
+ at the same time. The {\bf job-name} is normally the same name
+ as the current Job resource (thus creating a clone). However, it
+ may be any Job name, so one job may start other related jobs.
+
+ The part after the equal sign must be enclosed in double quotes,
+ and can contain any string or set of options (overrides) that you
+ can specify when entering the Run command from the console. For
+ example {\bf storage=DDS-4 ...}. In addition, there are two special
+ keywords that permit you to clone the current job. They are {\bf level=\%l}
+ and {\bf since=\%s}. The \%l in the level keyword permits
+ entering the actual level of the current job and the \%s in the since
+ keyword permits putting the same time for comparison as used on the
+ current job. Note, in the case of the since keyword, the \%s must be
+ enclosed in double quotes, and thus they must be preceded by a backslash
+ since they are already inside quotes. For example:
+
+\begin{verbatim}
+ run = "Nightly-backup level=%s since=\"%s\" storage=DDS-4"
+\end{verbatim}
+
+
+ A cloned job will not start additional clones, so it is not
+ possible to recurse.
+
+
+
\label{Priority}
\item [Priority = \lt{}number\gt{}]
- \index[dir]{Priority }
+ \index[dir]{Priority }
This directive permits you to control the order in which your jobs run
by specifying a positive non-zero number. The higher the number, the
lower the job priority. Assuming you are not running concurrent jobs,
The default priority is 10.
- If you want to run concurrent jobs, which is not recommended, you should keep
+ If you want to run concurrent jobs, which is not recommended, you should
+keep
these points in mind:
\begin{itemize}
is scheduled and queued waiting for the running priority 2 job to terminate.
If you then start a second priority 2 job, the waiting priority 1 job will
prevent the new priority 2 job from running concurrently with the running
- priority 2 job. That is: as long as there is a higher priority job waiting to
+ priority 2 job. That is: as long as there is a higher priority job waiting
+ to
run, no new lower priority jobs will start even if the Maximum Concurrent
Jobs settings would normally allow them to run. This ensures that higher
priority jobs will be run as soon as possible.
\end{itemize}
-If you have several jobs of different priority, it is best not to start them
-at exactly the same time, because Bacula must examine them one at a time. If
-by chance Bacula treats a lower priority first, then it will run before your
-high priority jobs. To avoid this, start any higher priority a few seconds
-before lower ones. This insures that Bacula will examine the jobs in the
-correct order, and that your priority scheme will be respected.
+If you have several jobs of different priority, it may not best to start
+them at exactly the same time, because Bacula must examine them one at a
+time. If by Bacula starts a lower priority job first, then it will run
+before your high priority jobs. If you experience this problem, you may
+avoid it by starting any higher priority jobs a few seconds before lower
+priority ones. This insures that Bacula will examine the jobs in the
+correct order, and that your priority scheme will be respected.
\label{WritePartAfterJob}
\item [Write Part After Job = \lt{}yes|no\gt{}]
- \index[dir]{Write Part After Job }
+ \index[dir]{Write Part After Job }
This directive is only implemented in version 1.37 and later.
If this directive is set to {\bf yes} (default {\bf no}), a new part file
will be created after the job is finished.
\subsection*{The JobDefs Resource}
\label{JobDefsResource}
-\index[general]{JobDefs Resource }
-\index[general]{Resource!JobDefs }
+\index[general]{JobDefs Resource}
+\index[general]{Resource!JobDefs}
\addcontentsline{toc}{subsection}{JobDefs Resource}
The JobDefs resource permits all the same directives that can appear in a Job
\subsection*{The Schedule Resource}
\label{ScheduleResource}
-\index[general]{Resource!Schedule }
-\index[general]{Schedule Resource }
+\index[general]{Resource!Schedule}
+\index[general]{Schedule Resource}
\addcontentsline{toc}{subsection}{Schedule Resource}
The Schedule resource provides a means of automatically scheduling a Job as
\begin{description}
\item [Schedule]
- \index[dir]{Schedule }
- Start of the Schedule directives. No {\bf Schedule} resource is required, but
+ \index[dir]{Schedule}
+ Start of the Schedule directives. No {\bf Schedule} resource is required,
+but
you will need at least one if you want Jobs to be automatically started.
\item [Name = \lt{}name\gt{}]
- \index[dir]{Name }
+ \index[dir]{Name }
The name of the schedule being defined. The Name directive is required.
\item [Run = \lt{}Job-overrides\gt{} \lt{}Date-time-specification\gt{}]
- \index[dir]{Run }
+ \index[dir]{Run }
The Run directive defines when a Job is to be run, and what overrides if any
to apply. You may specify multiple {\bf run} directives within a {\bf
Schedule} resource. If you do, they will all be applied (i.e. multiple
\begin{description}
\item [Level=Full]
- \index[dir]{Level }
+ \index[dir]{Level}
is all files in the FileSet whether or not they have changed.
\item [Level=Incremental]
- \index[dir]{Level }
+ \index[dir]{Level}
is all files that have changed since the last backup.
\item [Pool=Weekly]
- \index[dir]{Pool }
+ \index[dir]{Pool}
specifies to use the Pool named {\bf Weekly}.
\item [Storage=DLT\_Drive]
- \index[dir]{Storage }
+ \index[dir]{Storage}
specifies to use {\bf DLT\_Drive} for the storage device.
\item [Messages=Verbose]
- \index[dir]{Messages }
+ \index[dir]{Messages}
specifies to use the {\bf Verbose} message resource for the Job.
\item [FullPool=Full]
- \index[dir]{FullPool }
- specifies to use the Pool named {\bf Full} if the job is a full backup, or is
+ \index[dir]{FullPool}
+ specifies to use the Pool named {\bf Full} if the job is a full backup, or
+is
upgraded from another type to a full backup.
\item [DifferentialPool=Differential]
- \index[dir]{DifferentialPool }
+ \index[dir]{DifferentialPool}
specifies to use the Pool named {\bf Differential} if the job is a
differential backup.
\item [IncrementalPool=Incremental]
- \index[dir]{IncrementalPool }
+ \index[dir]{IncrementalPool}
specifies to use the Pool named {\bf Incremental} if the job is an
incremental backup.
\item [SpoolData=yes|no]
- \index[dir]{SpoolData }
+ \index[dir]{SpoolData}
tells Bacula to request the Storage daemon to spool data to a disk file
before putting it on tape.
\item [WritePartAfterJob=yes|no]
- \index[dir]{WritePartAfterJob }
+ \index[dir]{WritePartAfterJob}
tells Bacula to request the Storage daemon to write the current part file to
the device when the job is finished (see
\ilink{Write Part After Job directive in the Job
second | third | forth | fifth
<wday-keyword> = sun | mon | tue | wed | thu | fri | sat |
sunday | monday | tuesday | wednesday |
- thursday | friday
+ thursday | friday | saturday
<week-of-year-keyword> = w00 | w01 | ... w52 | w53
<month-keyword> = jan | feb | mar | apr | may | jun | jul |
aug | sep | oct | nov | dec | january |
<day-range> | <wday-range> |
<daily-keyword>
<day-spec> = <day> | <wday-keyword> |
- <week-keyword> <wday-keyword>
+ <day> | <wday-range> |
+ <week-keyword> <wday-keyword> |
+ <week-keyword> <wday-range>
<month-spec> = <month-keyword> | <month-range> |
<monthly-keyword>
<date-time-spec> = <month-spec> <day-spec> <time-spec>
\normalsize
\subsection*{Technical Notes on Schedules}
-\index[general]{Schedules!Technical Notes on }
-\index[general]{Technical Notes on Schedules }
+\index[general]{Schedules!Technical Notes on}
+\index[general]{Technical Notes on Schedules}
\addcontentsline{toc}{subsection}{Technical Notes on Schedules}
Internally Bacula keeps a schedule as a bit mask. There are six masks and a
\subsection*{The Client Resource}
\label{ClientResource2}
-\index[general]{Resource!Client }
-\index[general]{Client Resource }
+\index[general]{Resource!Client}
+\index[general]{Client Resource}
\addcontentsline{toc}{subsection}{Client Resource}
The Client resource defines the attributes of the Clients that are served by
\begin{description}
\item [Client (or FileDaemon)]
- \index[dir]{Client (or FileDaemon) }
+ \index[dir]{Client (or FileDaemon)}
Start of the Client directives.
\item [Name = \lt{}name\gt{}]
- \index[dir]{Name }
+ \index[dir]{Name }
The client name which will be used in the Job resource directive or in the
console run command. This directive is required.
\item [Address = \lt{}address\gt{}]
- \index[dir]{Address }
- Where the address is a host name, a fully qualified domain name, or a network
+ \index[dir]{Address }
+ Where the address is a host name, a fully qualified domain name, or a
+network
address in dotted quad notation for a Bacula File server daemon. This
directive is required.
\item [FD Port = \lt{}port-number\gt{}]
- \index[dir]{FD Port }
- Where the port is a port number at which the Bacula File server daemon can be
+ \index[dir]{FD Port }
+ Where the port is a port number at which the Bacula File server daemon can
+be
contacted. The default is 9102.
\item [Catalog = \lt{}Catalog-resource-name\gt{}]
- \index[dir]{Catalog }
+ \index[dir]{Catalog }
This specifies the name of the catalog resource to be used for this Client.
This directive is required.
\item [Password = \lt{}password\gt{}]
- \index[dir]{Password }
+ \index[dir]{Password }
This is the password to be used when establishing a connection with the File
services, so the Client configuration file on the machine to be backed up
must have the same password defined for this Director. This directive is
\label{FileRetention}
\item [File Retention = \lt{}time-period-specification\gt{}]
- \index[dir]{File Retention }
- The File Retention directive defines the length of time that Bacula will keep
+ \index[dir]{File Retention }
+ The File Retention directive defines the length of time that Bacula will
+keep
File records in the Catalog database. When this time period expires, and if
{\bf AutoPrune} is set to {\bf yes} Bacula will prune (remove) File records
that are older than the specified File Retention period. Note, this affects
\label{JobRetention}
\item [Job Retention = \lt{}time-period-specification\gt{}]
- \index[dir]{Job Retention }
+ \index[dir]{Job Retention }
The Job Retention directive defines the length of time that Bacula will keep
Job records in the Catalog database. When this time period expires, and if
{\bf AutoPrune} is set to {\bf yes} Bacula will prune (remove) Job records
retention periods, this affects only records in the catalog and not data in
your archive backup.
-If a Job record is selected for pruning, all associated File and JobMedia
-records will also be pruned regardless of the File Retention period set. As a
-consequence, you normally will set the File retention period to be less than
-the Job retention period. The Job retention period can actually be less than
-the value you specify here if you set the {\bf Volume Retention} directive in
-the Pool resource to a smaller duration. This is because the Job retention
-period and the Volume retention period are independently applied, so the
-smaller of the two takes precedence.
+If a Job record is selected for pruning, all associated File and JobMedia
+records will also be pruned regardless of the File Retention period set.
+As a consequence, you normally will set the File retention period to be
+less than the Job retention period. The Job retention period can actually
+be less than the value you specify here if you set the {\bf Volume
+Retention} directive in the Pool resource to a smaller duration. This is
+because the Job retention period and the Volume retention period are
+independently applied, so the smaller of the two takes precedence.
The Job retention period is specified as seconds, minutes, hours, days,
weeks, months, quarters, or years. See the
\label{AutoPrune}
\item [AutoPrune = \lt{}yes|no\gt{}]
- \index[dir]{AutoPrune }
+ \index[dir]{AutoPrune }
If AutoPrune is set to {\bf yes} (default), Bacula (version 1.20 or greater)
will automatically apply the File retention period and the Job retention
period for the Client at the end of the Job. If you set {\bf AutoPrune = no},
stored in the backup archives (on Volumes).
\item [Maximum Concurrent Jobs = \lt{}number\gt{}]
- \index[dir]{Maximum Concurrent Jobs }
+ \index[dir]{Maximum Concurrent Jobs }
where \lt{}number\gt{} is the maximum number of Jobs with the current Client
that can run concurrently. Note, this directive limits only Jobs for Clients
with the same name as the resource in which it appears. Any other
resource.
\item [*Priority = \lt{}number\gt{}]
- \index[dir]{*Priority }
+ \index[dir]{*Priority }
The number specifies the priority of this client relative to other clients
that the Director is processing simultaneously. The priority can range from
1 to 1000. The clients are ordered such that the smaller number priorities
\subsection*{The Storage Resource}
\label{StorageResource2}
-\index[general]{Resource!Storage }
-\index[general]{Storage Resource }
+\index[general]{Resource!Storage}
+\index[general]{Storage Resource}
\addcontentsline{toc}{subsection}{Storage Resource}
The Storage resource defines which Storage daemons are available for use by
\begin{description}
\item [Storage]
- \index[dir]{Storage }
+ \index[dir]{Storage}
Start of the Storage resources. At least one storage resource must be
specified.
\item [Name = \lt{}name\gt{}]
- \index[dir]{Name }
+ \index[dir]{Name }
The name of the storage resource. This name appears on the Storage directive
specified in the Job directive and is required.
\item [Address = \lt{}address\gt{}]
- \index[dir]{Address }
+ \index[dir]{Address }
Where the address is a host name, a {\bf fully qualified domain name}, or an
{\bf IP address}. Please note that the \lt{}address\gt{} as specified here
will be transmitted to the File daemon who will then use it to contact the
directive is required.
\item [SD Port = \lt{}port\gt{}]
- \index[dir]{SD Port }
+ \index[dir]{SD Port }
Where port is the port to use to contact the storage daemon for information
and to start jobs. This same port number must appear in the Storage resource
of the Storage daemon's configuration file. The default is 9103.
\item [Password = \lt{}password\gt{}]
- \index[dir]{Password }
+ \index[dir]{Password }
This is the password to be used when establishing a connection with the
Storage services. This same password also must appear in the Director
resource of the Storage daemon's configuration file. This directive is
otherwise it will be left blank.
\item [Device = \lt{}device-name\gt{}]
- \index[dir]{Device }
+ \index[dir]{Device }
This directive specifies the name of the device to be used for the
storage. This name is not the physical device name, but the logical device
name as defined on the {\bf Name} directive contained in the {\bf Device}
-resource definition of the {\bf Storage daemon} configuration file. You can
-specify any name you would like (even the device name if you prefer) up to a
+resource definition of the {\bf Storage daemon} configuration file or if
+the device is an Autochanger, you must put the name as defined on the {\bf Name}
+directive contained in the {\bf Autochanger resource definition of the {\bf
+Storage daemon}. You can specify any name you would like (even the device name
+if you prefer) up to a
maximum of 127 characters in length. The physical device name associated with
this device is specified in the {\bf Storage daemon} configuration file (as
{\bf Archive Device}). Please take care not to define two different Storage
required.
\item [Media Type = \lt{}MediaType\gt{}]
- \index[dir]{Media Type }
- This directive specifies the Media Type to be used to store the data. This is
+ \index[dir]{Media Type }
+ This directive specifies the Media Type to be used to store the data. This
+is
an arbitrary string of characters up to 127 maximum that you define. It can
be anything you want. However, it is best to make it descriptive of the
-storage media (e.g. File, DAT, ''HP DLT8000``, 8mm, ...). In addition, it is
+storage media (e.g. File, DAT, "HP DLT8000", 8mm, ...). In addition, it is
essential that you make the {\bf Media Type} specification unique for each
storage media type. If you have two DDS-4 drives that have incompatible
formats, or if you have a DDS-4 drive and a DDS-4 autochanger, you almost
\label{Autochanger1}
\item [Autochanger = \lt{}yes|no\gt{}]
- \index[dir]{Autochanger }
- If you specify {\bf yes} for this command (the default is {\bf no}), when you
+ \index[dir]{Autochanger }
+ If you specify {\bf yes} for this command (the default is {\bf no}), when
+you
use the {\bf label} command or the {\bf add} command to create a new Volume,
{\bf Bacula} will also request the Autochanger Slot number. This simplifies
creating database entries for Volumes in an autochanger. If you forget to
chapter for the details of using autochangers.
\item [Maximum Concurrent Jobs = \lt{}number\gt{}]
- \index[dir]{Maximum Concurrent Jobs }
- where \lt{}number\gt{} is the maximum number of Jobs with the current Storage
+ \index[dir]{Maximum Concurrent Jobs }
+ where \lt{}number\gt{} is the maximum number of Jobs with the current
+Storage
resource that can run concurrently. Note, this directive limits only Jobs
for Jobs using this Storage daemon. Any other restrictions on the maximum
concurrent jobs such as in the Director, Job, or Client resources will also
\subsection*{The Pool Resource}
\label{PoolResource}
-\index[general]{Resource!Pool }
-\index[general]{Pool Resource }
+\index[general]{Resource!Pool}
+\index[general]{Pool Resource}
\addcontentsline{toc}{subsection}{Pool Resource}
The Pool resource defines the set of storage Volumes (tapes or files) to be
\ilink{Backup Strategies}{_ChapterStart3} chapter of this
manual.
+
To use a Pool, there are three distinct steps. First the Pool must be defined
in the Director's configuration file. Then the Pool must be written to the
Catalog database. This is done automatically by the Director each time that it
\begin{description}
\item [Pool]
- \index[dir]{Pool }
- Start of the Pool resource. There must be at least one Pool resource defined.
+ \index[dir]{Pool}
+ Start of the Pool resource. There must be at least one Pool resource
+defined.
\item [Name = \lt{}name\gt{}]
- \index[dir]{Name }
+ \index[dir]{Name }
The name of the pool. For most applications, you will use the default pool
name {\bf Default}. This directive is required.
\item [Number of Volumes = \lt{}number\gt{}]
- \index[dir]{Number of Volumes }
+ \index[dir]{Number of Volumes }
This directive specifies the number of volumes (tapes or files) contained in
the pool. Normally, it is defined and updated automatically by the Bacula
catalog handling routines.
\label{MaxVolumes}
\item [Maximum Volumes = \lt{}number\gt{}]
- \index[dir]{Maximum Volumes }
+ \index[dir]{Maximum Volumes }
This directive specifies the maximum number of volumes (tapes or files)
contained in the pool. This directive is optional, if omitted or set to zero,
any number of volumes will be permitted. In general, this directive is useful
become too numerous or consume too much space.
\item [Pool Type = \lt{}type\gt{}]
- \index[dir]{Pool Type }
+ \index[dir]{Pool Type }
This directive defines the pool type, which corresponds to the type of Job
being run. It is required and may be one of the following:
\end{itemize}
\item [Use Volume Once = \lt{}yes|no\gt{}]
- \index[dir]{Use Volume Once }
+ \index[dir]{Use Volume Once }
This directive if set to {\bf yes} specifies that each volume is to be used
only once. This is most useful when the Media is a file and you want a new
file for each backup that is done. The default is {\bf no} (i.e. use volume
must use the {\bf update} command in the Console.
\item [Maximum Volume Jobs = \lt{}positive-integer\gt{}]
- \index[dir]{Maximum Volume Jobs }
+ \index[dir]{Maximum Volume Jobs }
This directive specifies the maximum number of Jobs that can be written to
the Volume. If you specify zero (the default), there is no limit. Otherwise,
when the number of Jobs backed up to the Volume equals {\bf positive-integer}
the Volume will be marked {\bf Used}. When the Volume is marked {\bf Used} it
can no longer be used for appending Jobs, much like the {\bf Full} status but
-it can be recycled if recycling is enabled. By setting {\bf
+it can be recycled if recycling is enabled, and thus used again.
+By setting {\bf
MaximumVolumeJobs} to one, you get the same effect as setting {\bf
-UseVolumeOnce = yes}.
+UseVolumeOnce = yes}.
Please note that the value defined by this directive in the bacula-dir.conf
file is the default value used when a Volume is created. Once the volume is
must use the {\bf update} command in the Console.
\item [Maximum Volume Files = \lt{}positive-integer\gt{}]
- \index[dir]{Maximum Volume Files }
+ \index[dir]{Maximum Volume Files }
This directive specifies the maximum number of files that can be written to
the Volume. If you specify zero (the default), there is no limit. Otherwise,
when the number of files written to the Volume equals {\bf positive-integer}
the Volume will be marked {\bf Used}. When the Volume is marked {\bf Used} it
can no longer be used for appending Jobs, much like the {\bf Full} status but
-it can be recycled if recycling is enabled. This value is checked and the
+it can be recycled if recycling is enabled and thus used again.
+This value is checked and the
{\bf Used} status is set only at the end of a job that writes to the
particular volume.
must use the {\bf update} command in the Console.
\item [Maximum Volume Bytes = \lt{}size\gt{}]
- \index[dir]{Maximum Volume Bytes }
+ \index[dir]{Maximum Volume Bytes }
This directive specifies the maximum number of bytes that can be written to
the Volume. If you specify zero (the default), there is no limit except the
physical size of the Volume. Otherwise, when the number of bytes written to
the Volume equals {\bf size} the Volume will be marked {\bf Used}. When the
Volume is marked {\bf Used} it can no longer be used for appending Jobs, much
-like the {\bf Full} status but it can be recycled if recycling is enabled.
+like the {\bf Full} status but it can be recycled if recycling is enabled,
+and thus the Volume can be re-used after recycling.
This value is checked and the {\bf Used} status set while the job is writing
to the particular volume.
must use the {\bf update} command in the Console.
\item [Volume Use Duration = \lt{}time-period-specification\gt{}]
- \index[dir]{Volume Use Duration }
- The Volume Use Duration directive defines the time period that the Volume can
- be written beginning from the time of first data write to the Volume. If the
- time-period specified is zero (the default), the Volume can be written
- indefinitely. Otherwise, when the time period from the first write to the
- volume (the first Job written) exceeds the time-period-specification, the
- Volume will be marked {\bf Used}, which means that no more Jobs can be
- appended to the Volume, but it may be recycled if recycling is enabled.
+ \index[dir]{Volume Use Duration }
+ The Volume Use Duration directive defines the time period that the
+ Volume can be written beginning from the time of first data write to the
+ Volume. If the time-period specified is zero (the default), the Volume
+ can be written indefinitely. Otherwise, when the time period from the
+ first write to the volume (the first Job written) exceeds the
+ time-period-specification, the Volume will be marked {\bf Used}, which
+ means that no more Jobs can be appended to the Volume, but it may be
+ recycled if recycling is enabled. Once the Volume is
+ recycled, it will be available for use again.
- You might use this directive, for example, if you have a Volume used for
- Incremental backups, and Volumes used for Weekly Full backups. Once the Full
- backup is done, you will want to use a different Incremental Volume. This can
- be accomplished by setting the Volume Use Duration for the Incremental Volume
- to six days. I.e. it will be used for the 6 days following a Full save, then
- a different Incremental volume will be used. Be careful about setting the
- duration to short periods such as 23 hours, or you might experience problems
- of Bacula waiting for a tape over the weekend only to complete the backups
- Monday morning when an operator mounts a new tape.
+ You might use this directive, for example, if you have a Volume used for
+ Incremental backups, and Volumes used for Weekly Full backups. Once the
+ Full backup is done, you will want to use a different Incremental
+ Volume. This can be accomplished by setting the Volume Use Duration for
+ the Incremental Volume to six days. I.e. it will be used for the 6
+ days following a Full save, then a different Incremental volume will be
+ used. Be careful about setting the duration to short periods such as 23
+ hours, or you might experience problems of Bacula waiting for a tape
+ over the weekend only to complete the backups Monday morning when an
+ operator mounts a new tape.
- The use duration is checked and the {\bf Used} status is set only at the end of a
- job that writes to the particular volume, which means that even though the
- use duration may have expired, the catalog entry will not be updated until
- the next job that uses this volume is run.
+ The use duration is checked and the {\bf Used} status is set only at the
+ end of a job that writes to the particular volume, which means that even
+ though the use duration may have expired, the catalog entry will not be
+ updated until the next job that uses this volume is run.
Please note that the value defined by this directive in the bacula-dir.conf
file is the default value used when a Volume is created. Once the volume is
\ilink{\bf update volume}{UpdateCommand} command in the Console.
\item [Catalog Files = \lt{}yes|no\gt{}]
- \index[dir]{Catalog Files }
- This directive defines whether or not you want the names of the files that
- were saved to be put into the catalog. The default is {\bf yes}. The
- advantage of specifying {\bf Catalog Files = No} is that you will have a
- significantly smaller Catalog database. The disadvantage is that you will not
- be able to produce a Catalog listing of the files backed up for each Job
- (this is often called Browsing). Also, without the File entries in the
- catalog, you will not be able to use the Console {\bf restore} command nor
- any other command that references File entries.
+ \index[dir]{Catalog Files }
+ This directive defines whether or not you want the names of the files
+ that were saved to be put into the catalog. The default is {\bf yes}.
+ The advantage of specifying {\bf Catalog Files = No} is that you will
+ have a significantly smaller Catalog database. The disadvantage is that
+ you will not be able to produce a Catalog listing of the files backed up
+ for each Job (this is often called Browsing). Also, without the File
+ entries in the catalog, you will not be able to use the Console {\bf
+ restore} command nor any other command that references File entries.
\label{PoolAutoPrune}
\item [AutoPrune = \lt{}yes|no\gt{}]
- \index[dir]{AutoPrune }
+ \index[dir]{AutoPrune }
If AutoPrune is set to {\bf yes} (default), Bacula (version 1.20 or greater)
will automatically apply the Volume Retention period when new Volume is
needed and no appendable Volumes exist in the Pool. Volume pruning causes
\label{VolRetention}
\item [Volume Retention = \lt{}time-period-specification\gt{}]
- \index[dir]{Volume Retention }
- The Volume Retention directive defines the length of time that {\bf Bacula}
- will keep Job records associated with the Volume in the Catalog database.
- When this time period expires, and if {\bf AutoPrune} is set to {\bf yes}
- Bacula will prune (remove) Job records that are older than the specified
- Volume Retention period. All File records associated with pruned Jobs are
- also pruned. The time may be specified as seconds, minutes, hours, days,
- weeks, months, quarters, or years. The {\bf Volume Retention} applied
- independently to the {\bf Job Retention} and the {\bf File Retention} periods
- defined in the Client resource. This means that the shorter period is the
- one that applies. Note, that when the {\bf Volume Retention} period has been
- reached, it will prune both the Job and the File records.
+ \index[dir]{Volume Retention }
+ The Volume Retention directive defines the length of time that {\bf
+ Bacula} will keep Job records associated with the Volume in the Catalog
+ database. When this time period expires, and if {\bf AutoPrune} is set
+ to {\bf yes} Bacula may prune (remove) Job records that are older than
+ the specified Volume Retention period if it is necessary to free up a
+ Volume. Recycling will not occur until it is absolutely necessary to
+ free up a volume. All File records associated with pruned Jobs are also
+ pruned. The time may be specified as seconds, minutes, hours, days,
+ weeks, months, quarters, or years. The {\bf Volume Retention} is
+ applied independently of the {\bf Job Retention} and the {\bf File
+ Retention} periods defined in the Client resource. This means that all
+ the retentions periods are applied in turn and that the shorter period
+ is the one that effectively takes precedence. Note, that when the {\bf
+ Volume Retention} period has been reached, and it is necessary to obtain
+ a new volume, Bacula will prune both the Job and the File records.
+
+ It is important to know that when the Volume Retention period expires,
+ Bacula does not automatically recycle a Volume. It attempts to keep the
+ Volume data intact as long as possible before pruning it.
- The default is 365 days. Note, this directive sets the default value for each
- Volume entry in the Catalog when the Volume is created. The value in the
- catalog may be later individually changed for each Volume using the Console
- program.
+ The default is 365 days. Note, this directive sets the default value
+ for each Volume entry in the Catalog when the Volume is created. The
+ value in the catalog may be later individually changed for each Volume
+ using the Console program.
- By defining multiple Pools with different Volume Retention periods, you may
- effectively have a set of tapes that is recycled weekly, another Pool of
- tapes that is recycled monthly and so on. However, one must keep in mind that
- if your {\bf Volume Retention} period is too short, it may prune the last
- valid Full backup, and hence until the next Full backup is done, you will not
- have a complete backup of your system, and in addition, the next Incremental
- or Differential backup will be promoted to a Full backup. As a consequence,
- the minimum {\bf Volume Retention} period should be at twice the interval of
- your Full backups. This means that if you do a Full backup once a month, the
- minimum Volume retention period should be two months.
+ By defining multiple Pools with different Volume Retention periods, you
+ may effectively have a set of tapes that is recycled weekly, another
+ Pool of tapes that is recycled monthly and so on. However, one must
+ keep in mind that if your {\bf Volume Retention} period is too short, it
+ may prune the last valid Full backup, and hence until the next Full
+ backup is done, you will not have a complete backup of your system, and
+ in addition, the next Incremental or Differential backup will be
+ promoted to a Full backup. As a consequence, the minimum {\bf Volume
+ Retention} period should be at twice the interval of your Full backups.
+ This means that if you do a Full backup once a month, the minimum Volume
+ retention period should be two months.
Please note that the value defined by this directive in the bacula-dir.conf
file is the default value used when a Volume is created. Once the volume is
\label{PoolRecycle}
\item [Recycle = \lt{}yes|no\gt{}]
- \index[dir]{Recycle }
+ \index[dir]{Recycle }
This directive specifies the default for recycling Purged Volumes. If it is
set to {\bf yes} and Bacula needs a volume but finds none that are
appendable, it will search for Purged Volumes (i.e. volumes with all the Jobs
\label{RecycleOldest}
\item [Recycle Oldest Volume = \lt{}yes|no\gt{}]
- \index[dir]{Recycle Oldest Volume }
+ \index[dir]{Recycle Oldest Volume }
This directive instructs the Director to search for the oldest used Volume
in the Pool when another Volume is requested by the Storage daemon and none
are available. The catalog is then {\bf pruned} respecting the retention
\label{RecycleCurrent}
\item [Recycle Current Volume = \lt{}yes|no\gt{}]
- \index[dir]{Recycle Current Volume }
+ \index[dir]{Recycle Current Volume }
If Bacula needs a new Volume, this directive instructs Bacula to Prune the
volume respecting the Job and File retention periods. If all Jobs are pruned
(i.e. the volume is Purged), then the Volume is recycled and will be used as
\label{PurgeOldest}
\item [Purge Oldest Volume = \lt{}yes|no\gt{}]
- \index[dir]{Purge Oldest Volume }
+ \index[dir]{Purge Oldest Volume }
This directive instructs the Director to search for the oldest used Volume
in the Pool when another Volume is requested by the Storage daemon and none
are available. The catalog is then {\bf purged} irrespective of retention
We {\bf highly} recommend against using this directive, because it is sure that
some day, Bacula will recycle a Volume that contains current data.
-\item [Accept Any Volume = \lt{}yes|no\gt{}]
- \index[dir]{Accept Any Volume }
- This directive specifies whether or not any volume from the Pool may be used
-for backup. The default is {\bf yes} as of version 1.27 and later. If it is
-{\bf no} then only the first writable volume in the Pool will be accepted for
-writing backup data, thus Bacula will fill each Volume sequentially in turn
-before using any other appendable volume in the Pool. If this is {\bf no} and
-you mount a volume out of order, Bacula will not accept it. If this is {\bf
-yes} any appendable volume from the pool mounted will be accepted.
-
-If your tape backup procedure dictates that you manually mount the next
-volume, you will almost certainly want to be sure this directive is turned
-on.
-
-If you are going on vacation and you think the current volume may not have
-enough room on it, you can simply label a new tape and leave it in the drive,
-and assuming that {\bf Accept Any Volume} is {\bf yes} Bacula will begin
-writing on it. When you return from vacation, simply remount the last tape,
-and Bacula will continue writing on it until it is full. Then you can remount
- your vacation tape and Bacula will fill it in turn.
-
\item [Cleaning Prefix = \lt{}string\gt{}]
- \index[dir]{Cleaning Prefix }
- This directive defines a prefix string, which if it matches the beginning of
+ \index[dir]{Cleaning Prefix }
+ This directive defines a prefix string, which if it matches the beginning
+of
a Volume name during labeling of a Volume, the Volume will be defined with
the VolStatus set to {\bf Cleaning} and thus Bacula will never attempt to use
this tape. This is primarily for use with autochangers that accept barcodes
\label{Label}
\item [Label Format = \lt{}format\gt{}]
- \index[dir]{Label Format }
- This directive specifies the format of the labels contained in this pool. The
-format directive is used as a sort of template to create new Volume names
-during automatic Volume labeling.
+ \index[dir]{Label Format }
+ This directive specifies the format of the labels contained in this
+ pool. The format directive is used as a sort of template to create new
+ Volume names during automatic Volume labeling.
The {\bf format} should be specified in double quotes, and consists of
letters, numbers and the special characters hyphen ({\bf -}), underscore
({\bf \_}), colon ({\bf :}), and period ({\bf .}), which are the legal
characters for a Volume name. The {\bf format} should be enclosed in double
-quotes ('').
+quotes (").
In addition, the format may contain a number of variable expansion characters
which will be expanded by a complex algorithm allowing you to create Volume
Generally, these variable expansion characters begin with a dollar sign ({\bf
\$}) or a left bracket ({\bf [}). If you specify variable expansion
characters, you should always enclose the format with double quote characters
-({\bf ``}). For more details on variable expansion, please see the
+({\bf "}). For more details on variable expansion, please see the
\ilink{Variable Expansion}{_ChapterStart50} Chapter of this manual.
If no variable expansion characters are found in the string, the Volume name
will be formed from the {\bf format} string appended with the number of
volumes in the pool plus one, which will be edited as four digits with
-leading zeros. For example, with a {\bf Label Format = ''File-``}, the first
+leading zeros. For example, with a {\bf Label Format = "File-"}, the first
volumes will be named {\bf File-0001}, {\bf File-0002}, ...
With the exception of Job specific variables, you can test your {\bf
\end{verbatim}
\normalsize
+\subsubsection*{The Scratch Pool}
+\addcontentsline{toc}{subsection}{Scratch Pool}
+\index[general]{Scratch Pool}
+In general, you can give your Pools any name you wish, but there is one
+important restriction: the Pool named {\bf Scratch}, if it exists behaves
+like a scratch pool of Volumes in that when Bacula needs a new Volume for
+writing and it cannot find one, it will look in the Scratch pool, and if
+it finds an available Volume, it will move it out of the Scratch pool into
+the Pool currently being used by the job.
+
+
\subsection*{The Catalog Resource}
\label{CatalogResource}
-\index[general]{Resource!Catalog }
-\index[general]{Catalog Resource }
+\index[general]{Resource!Catalog}
+\index[general]{Catalog Resource}
\addcontentsline{toc}{subsection}{Catalog Resource}
The Catalog Resource defines what catalog to use for the current job.
\begin{description}
\item [Catalog]
- \index[dir]{Catalog }
- Start of the Catalog resource. At least one Catalog resource must be defined.
+ \index[dir]{Catalog}
+ Start of the Catalog resource. At least one Catalog resource must be
+defined.
\item [Name = \lt{}name\gt{}]
- \index[dir]{Name }
+ \index[dir]{Name }
The name of the Catalog. No necessary relation to the database server name.
This name will be specified in the Client resource directive indicating that
all catalog data for that Client is maintained in this Catalog. This
directive is required.
\item [password = \lt{}password\gt{}]
- \index[dir]{password }
+ \index[dir]{password }
This specifies the password to use when logging into the database. This
directive is required.
\item [DB Name = \lt{}name\gt{}]
- \index[dir]{DB Name }
+ \index[dir]{DB Name }
This specifies the name of the database. If you use multiple catalogs
(databases), you specify which one here. If you are using an external
database server rather than the internal one, you must specify a name that
this name. This directive is required.
\item [user = \lt{}user\gt{}]
- \index[dir]{user }
- This specifies what user name to use to log into the database. This directive
+ \index[dir]{user }
+ This specifies what user name to use to log into the database. This
+directive
is required.
\item [DB Socket = \lt{}socket-name\gt{}]
- \index[dir]{DB Socket }
+ \index[dir]{DB Socket }
This is the name of a socket to use on the local host to connect to the
database. This directive is used only by MySQL and is ignored by SQLite.
Normally, if neither {\bf DB Socket} or {\bf DB Address} are specified, MySQL
will use the default socket.
\item [DB Address = \lt{}address\gt{}]
- \index[dir]{DB Address }
+ \index[dir]{DB Address }
This is the host address of the database server. Normally, you would specify
this instead of {\bf DB Socket} if the database server is on another machine.
In that case, you will also specify {\bf DB Port}. This directive is used
optional.
\item [DB Port = \lt{}port\gt{}]
- \index[dir]{DB Port }
+ \index[dir]{DB Port }
This defines the port to be used in conjunction with {\bf DB Address} to
access the database if it is on another machine. This directive is used only
by MySQL and is ignored by SQLite if provided. This directive is optional.
%% \item [Multiple Connections = \lt{}yes|no\gt{}]
-%% \index[dir]{Multiple Connections }
-%% By default, this directive is set to no. In that case, each job that uses the
+%% \index[dir]{Multiple Connections }
+%% By default, this directive is set to no. In that case, each job that uses
+the
%% same Catalog will use a single connection to the catalog. It will be shared,
%% and Bacula will allow only one Job at a time to communicate. If you set this
%% directive to yes, Bacula will permit multiple connections to the database,
%% this is no problem. For MySQL, you must be *very* careful to have the
%% multi-thread version of the client library loaded on your system. When this
%% directive is set yes, each Job will have a separate connection to the
-%% database, and the database will control the interaction between the different
+%% database, and the database will control the interaction between the
+different
%% Jobs. This can significantly speed up the database operations if you are
%% running multiple simultaneous jobs. In addition, for SQLite and PostgreSQL,
%% Bacula will automatically enable transactions. This can significantly speed
\subsection*{The Messages Resource}
\label{MessagesResource2}
-\index[general]{Resource!Messages }
-\index[general]{Messages Resource }
+\index[general]{Resource!Messages}
+\index[general]{Messages Resource}
\addcontentsline{toc}{subsection}{Messages Resource}
For the details of the Messages Resource, please see the
\subsection*{The Console Resource}
\label{ConsoleResource1}
-\index[general]{Console Resource }
-\index[general]{Resource!Console }
+\index[general]{Console Resource}
+\index[general]{Resource!Console}
\addcontentsline{toc}{subsection}{Console Resource}
As of Bacula version 1.33 and higher, there are three different kinds of
versions prior to 1.33 and remains valid. Typically you would use it only for
administrators.
\item The second type of console, and new to version 1.33 and higher is a
- ''named`` console defined within a Console resource in both the Director's
+ "named" console defined within a Console resource in both the Director's
configuration file and in the Console's configuration file. Both the names
and the passwords in these two entries must match much as is the case for
Client programs.
directive, is the same as a Client name, that console is permitted to use the
{\bf SetIP} command to change the Address directive in the Director's client
resource to the IP address of the Console. This permits portables or other
-machines using DHCP (non-fixed IP addresses) to ''notify`` the Director of
+machines using DHCP (non-fixed IP addresses) to "notify" the Director of
their current IP address.
\end{itemize}
The Console resource is optional and need not be specified. The following
-directives are permited within the Director's configuration resource:
+directives are permitted within the Director's configuration resource:
\begin{description}
\item [Name = \lt{}name\gt{}]
- \index[dir]{Name }
+ \index[dir]{Name }
The name of the console. This name must match the name specified in the
Console's configuration resource (much as is the case with Client
definitions).
\item [Password = \lt{}password\gt{}]
- \index[dir]{Password }
- Specifies the password that must be supplied for a named Bacula Console to be
+ \index[dir]{Password }
+ Specifies the password that must be supplied for a named Bacula Console to
+be
authorized. The same password must appear in the {\bf Console} resource of
the Console configuration file. For added security, the password is never
actually passed across the network but rather a challenge response hash code
password during the configuration process, otherwise it will be left blank.
\item [JobACL = \lt{}name-list\gt{}]
- \index[dir]{JobACL }
+ \index[dir]{JobACL }
This directive is used to specify a list of Job resource names that can be
accessed by the console. Without this directive, the console cannot access
any of the Director's Job resources. Multiple Job resource names may be
for the four jobs named on the JobACL directives, but for no others.
\item [ClientACL = \lt{}name-list\gt{}]
- \index[dir]{ClientACL }
- This directive is used to specify a list of Client resource names that can be
+ \index[dir]{ClientACL }
+ This directive is used to specify a list of Client resource names that can
+be
accessed by the console.
\item [StorageACL = \lt{}name-list\gt{}]
- \index[dir]{StorageACL }
+ \index[dir]{StorageACL }
This directive is used to specify a list of Storage resource names that can
be accessed by the console.
\item [ScheduleACL = \lt{}name-list\gt{}]
- \index[dir]{ScheduleACL }
+ \index[dir]{ScheduleACL }
This directive is used to specify a list of Schedule resource names that can
be accessed by the console.
\item [PoolACL = \lt{}name-list\gt{}]
- \index[dir]{PoolACL }
+ \index[dir]{PoolACL }
This directive is used to specify a list of Pool resource names that can be
accessed by the console.
\item [FileSetACL = \lt{}name-list\gt{}]
- \index[dir]{FileSetACL }
+ \index[dir]{FileSetACL }
This directive is used to specify a list of FileSet resource names that can
be accessed by the console.
\item [CatalogACL = \lt{}name-list\gt{}]
- \index[dir]{CatalogACL }
+ \index[dir]{CatalogACL }
This directive is used to specify a list of Catalog resource names that can
be accessed by the console.
\item [CommandACL = \lt{}name-list\gt{}]
- \index[dir]{CommandACL }
+ \index[dir]{CommandACL }
This directive is used to specify a list of of console commands that can be
executed by the console.
\end{description}
\subsection*{The Counter Resource}
\label{CounterResource}
-\index[general]{Resource!Counter }
-\index[general]{Counter Resource }
+\index[general]{Resource!Counter}
+\index[general]{Counter Resource}
\addcontentsline{toc}{subsection}{Counter Resource}
The Counter Resource defines a counter variable that can be accessed by
\begin{description}
\item [Counter]
- \index[dir]{Counter }
+ \index[dir]{Counter}
Start of the Counter resource. Counter directives are optional.
\item [Name = \lt{}name\gt{}]
- \index[dir]{Name }
+ \index[dir]{Name }
The name of the Counter. This is the name you will use in the variable
expansion to reference the counter value.
\item [Minimum = \lt{}integer\gt{}]
- \index[dir]{Minimum }
+ \index[dir]{Minimum }
This specifies the minimum value that the counter can have. It also becomes
the default. If not supplied, zero is assumed.
\item [Maximum = \lt{}integer\gt{}]
- \index[dir]{Maximum }
+ \index[dir]{Maximum }
This is the maximum value value that the counter can have. If not specified
or set to zero, the counter can have a maximum value of 2,147,483,648 (2 to
the 31 power). When the counter is incremented past this value, it is reset
to the Minimum.
\item [*WrapCounter = \lt{}counter-name\gt{}]
- \index[dir]{*WrapCounter }
- If this value is specified, when the counter is incremented past the maximum
+ \index[dir]{*WrapCounter }
+ If this value is specified, when the counter is incremented past the
+maximum
and thus reset to the minimum, the counter specified on the {\bf WrapCounter}
is incremented. (This is not currently implemented).
\item [Catalog = \lt{}catalog-name\gt{}]
- \index[dir]{Catalog }
+ \index[dir]{Catalog }
If this directive is specified, the counter and its values will be saved in
the specified catalog. If this directive is not present, the counter will be
redefined each time that Bacula is started.
\subsection*{Example Director Configuration File}
\label{SampleDirectorConfiguration}
-\index[general]{File!Example Director Configuration }
-\index[general]{Example Director Configuration File }
+\index[general]{File!Example Director Configuration}
+\index[general]{Example Director Configuration File}
\addcontentsline{toc}{subsection}{Example Director Configuration File}
An example Director configuration file might be the following:
#
# Note: / backs up everything
File = /
- }
- Exclude { }
+ }
+ Exclude {}
}
# When to do the backups
Schedule {
Device = "HP DLT 80" # same as Device in Storage daemon
Media Type = DLT8000 # same as MediaType in Storage daemon
}
+# Definition for a DLT autochanger device
+Storage {
+ Name = Autochanger
+ Address = rufus
+ Password = "jMeWZvfikUHvt3kzKVVPpQ0ccmV6emPnF2cPYFdhLApQ"
+ Device = "Autochanger" # same as Device in Storage daemon
+ Media Type = DLT-8000 # Different from DLTDrive
+ Autochanger = yes
+}
# Definition of DDS tape storage device
Storage {
Name = SDT-10000
\item The
\ilink{ Recycle Oldest Volume = yes}{RecycleOldest} record in the
Pool resource tells Bacula to Prune the oldest volume in the Pool, and if all
- files were pruned to recyle this volume and use it.
+ files were pruned to recycle this volume and use it.
\item The
\ilink{ Recycle Current Volume = yes}{RecycleCurrent} record in
the Pool resource tells Bacula to Prune the currently mounted volume in the
- Pool, and if all files were pruned to recyle this volume and use it.
+ Pool, and if all files were pruned to recycle this volume and use it.
\item The
\ilink{ Purge Oldest Volume = yes}{PurgeOldest} record in the
Pool resource permits a forced recycling of the oldest Volume when a new one
}
Schedule {
Name = "FourPerHour"
- Run = Level=Full Pool=Recycle Storage=File hourly at 0:05
- Run = Level=Full Pool=Recycle Storage=File hourly at 0:20
- Run = Level=Full Pool=Recycle Storage=File hourly at 0:35
- Run = Level=Full Pool=Recycle Storage=File hourly at 0:50
+ Run = Level=Full Pool=Recycle Storage=FileStorage hourly at 0:05
+ Run = Level=Full Pool=Recycle Storage=FileStorage hourly at 0:20
+ Run = Level=Full Pool=Recycle Storage=FileStorage hourly at 0:35
+ Run = Level=Full Pool=Recycle Storage=FileStorage hourly at 0:50
}
Job {
Name = "RecycleExample"
- %%
+%%
%%
\section*{Bacula Frequently Asked Questions}
\ilink{the bugs section}{_ChapterStart4} of this document for a list
of known bugs and solutions.
-\subsection*{Frequently Asked Questions}
-\addcontentsline{toc}{section}{Frequently Asked Questions}
-
\begin{description}
\label{what}
-
+\subsection*{What is Bacula?}
\item [What is {\bf Bacula}? ]
\index[general]{What is Bacula? }
{\bf Bacula} is a network backup and restore program.
+\subsection*{Does Bacula support Windows?}
\item [Does Bacula support Windows?]
\index[general]{Does Bacula support Windows? }
Yes, Bacula compiles and runs on Windows machines (Win98, WinMe, WinXP,
WinNT, and Win2000). We provide a binary version of the Client (bacula-fd),
but have not tested the Director nor the Storage daemon. Note, Win95 is no
- longer supported because it doesn't have the GetFileAttributesExA API call.
+ longer supported because it doesn't have the GetFileAttributesExA API call.
+
\label{lang}
+\subsection*{What language is Bacula written in?}
\item [What language is Bacula written in?]
\index[general]{What language is Bacula written in? }
- It is written in C++, but it is mostly C code using only a limited set of the
- C++ extensions over C. Thus Bacula is completely compiled using the C++
- compiler. There are several modules, including the Win32 interface, that
+ It is written in C++, but it is mostly C code using only a limited set of
+ the C++ extensions over C. Thus Bacula is completely compiled using the
+ C++ compiler. There are several modules, including the Win32 interface, that
are written using the object oriented C++ features. Over time, we are slowly
adding a larger subset of C++.
\label{run}
+\subsection*{On what machines does Bacula run?}
\item [On what machines does Bacula run? ]
\index[general]{On what machines does Bacula run? }
{\bf Bacula} builds and executes on RedHat Linux (versions RH7.1-RHEL 3.0,
- SUSE, Gentoo, Debian, Mandriva, ...), FreeBSD, Solaris, Alpha, SGI (client),
+ SuSE, Gentoo, Debian, Mandriva, ...), FreeBSD, Solaris, Alpha, SGI (client),
NetBSD, OpenBSD, Mac OS X (client), and Win32 (client).
- Bacula has been my only backup tool for over four years backing up 5 machines
- nightly (3 Linux boxes running RedHat, a WinXP machine, and a WinNT machine).
+ Bacula has been my only backup tool for over four years backing up 5
+ machines nightly (3 Linux boxes running RedHat, a WinXP machine, and a WinNT
+ machine).
\label{stable}
+\subsection*{Is Bacula Stable?}
\item [Is Bacula Stable? ]
\index[general]{Is Bacula Stable? }
Yes, it is remarkably stable, but remember, there are still a lot of
unimplemented or partially implemented features. With a program of this size
(100,000+ lines of C++ code not including the SQL programs) there are bound
to be bugs. The current test environment (a twisted pair local network and a
- HP DLT backup tape) is not exactly ideal, so additional testing on other sites is
- necessary. The File daemon has never crashed -- running months at a time with
+ HP DLT backup tape) is not exactly ideal, so additional testing on other
+sites is
+ necessary. The File daemon has never crashed -- running months at a time
+with
no intervention. The Storage daemon is remarkably stable with most of the
problems arising during labeling or switching tapes. Storage daemon crashes
- are rare. The Director, given the multitude of functions it fulfills is also
+ are rare. The Director, given the multitude of functions it fulfills is
+also
relatively stable. In a production environment, it rarely if ever crashes. Of
- the three daemons, the Director is the most prone to having problems. Still, it
+ the three daemons, the Director is the most prone to having problems. Still,
+it
frequently runs several months with no problems.
There are a number of reasons for this stability.
\item All memory leaks (orphaned buffers) are reported each time the
program terminates.\\
\item Any signal (segmentation fault, ...) generates a
- traceback that is emailed to the developer. This permits quick resolution of
+ traceback that is emailed to the developer. This permits quick resolution
+of
bugs even if they only show up rarely in a production system.\\
\item There is a reasonably comprehensive set of regression tests
that avoids re-creating the most common errors in new versions of
\end{enumerate}
\label{AuthorizationErrors}
-
+\subsection*{I'm Getting Authorization Errors. What is Going On? }
\item [I'm Getting Authorization Errors. What is Going On? ]
\index[general]{I'm Getting Authorization Errors. What is Going On? }
For security reasons, Bacula requires that both the File daemon and the
the corresponding change in the Storage daemon's and in the File daemon's
configuration files.
- During the authorization process, the Storage daemon and File daemon also
- require that the Director authenticates itself, so both ends require the other
- to have the correct name and password.
-
- If you have edited the conf files and modified any name or any password, and
- you are getting authentication errors, then your best bet is to go back to
- the original conf files generated by the Bacula installation process. Make
- only the absolutely necessary modifications to these files -- e.g. add the
- correct email address. Then follow the instructions in the
- \ilink{ Running Bacula}{_ChapterStart1} chapter of this manual. You
- will run a backup to disk and a restore. Only when that works, should you
- begin customization of the conf files.
-
- Another reason that you can get authentication errors is if you are running
- Multiple Concurrent Jobs in the Director, but you have not set them in the
- File daemon or the Storage daemon. Once you reach their limit, they will
- reject the connection producing authentication (or connection) errors.
-
- If you are having problems connecting to a Windows machine that previously
- worked, you might try restarting the Bacula service since Windows frequently
- encounters networking connection problems.
-
- Here is a picture that indicates what names/passwords in which files/Resources
- must match up:
+ During the authorization process, the Storage daemon and File daemon
+ also require that the Director authenticates itself, so both ends
+ require the other to have the correct name and password.
+
+ If you have edited the conf files and modified any name or any password,
+ and you are getting authentication errors, then your best bet is to go
+ back to the original conf files generated by the Bacula installation
+ process. Make only the absolutely necessary modifications to these
+ files -- e.g. add the correct email address. Then follow the
+ instructions in the \ilink{ Running Bacula}{_ChapterStart1} chapter of
+ this manual. You will run a backup to disk and a restore. Only when
+ that works, should you begin customization of the conf files.
+
+ Another reason that you can get authentication errors is if you are
+ running Multiple Concurrent Jobs in the Director, but you have not set
+ them in the File daemon or the Storage daemon. Once you reach their
+ limit, they will reject the connection producing authentication (or
+ connection) errors.
+
+ If you are having problems connecting to a Windows machine that
+ previously worked, you might try restarting the Bacula service since
+ Windows frequently encounters networking connection problems.
+
+ Some users report that authentication fails if there is not a proper
+ reverse DNS lookup entry for the machine. This seems to be a
+ requirement of gethostbyname(), which is what Bacula uses to translate
+ names into IP addresses. If you cannot add a reverse DNS entry, or you
+ don't know how to do so, you can avoid the problem by specifying an IP
+ address rather than a machine name in the appropriate Bacula conf file.
+
+ Here is a picture that indicates what names/passwords in which
+ files/Resources must match up:
\includegraphics{./Conf-Diagram.eps}
Bacula component will reject all new connections.
\label{AccessProblems}
-
+\subsection*{Bacula Runs Fine but Cannot Access a Client on a Different Machine.
+ Why? }
\item [Bacula Runs Fine but Cannot Access a Client on a Different Machine.
Why? ]
\index[general]{Bacula Runs Fine but Cannot Access a Client on a Different
\item It is a Windows Client, and the client died because of an improper
configuration file. Check that the Bacula icon is in the system tray and the
the menu items work. If the client has died, the icon will disappear only
-when you move the mouse over the icon.
+ when you move the mouse over the icon.
\item The Client address or port is incorrect or not resolved by DNS. See if
you can ping the client machine using the same address as in the Client
record.
\item Your password or names are not correct in both the Director and the
Client machine. Try configuring everything identical to how you run the
client on the same machine as the Director, but just change the Address. If
-that works, make the other changes one step at a time until it works.
+ that works, make the other changes one step at a time until it works.
+\item You may also be having problems betwen your File daemon and your
+ Storage daemon. The name you use in the Storage resource of your
+ Director's conf file must be known (resolvable) by the File daemon,
+ because it is passed symbolically to the File daemon, which then
+ resolves it to get an IP address used to contact the Storage daemon.
\end{itemize}
\label{startover}
-
+\subsection*{My Catalog is Full of Test Runs, How Can I Start Over?}
\item [My Catalog is Full of Test Runs, How Can I Start Over? ]
\index[general]{My Catalog is Full of Test Runs, How Can I Start Over? }
If you are using MySQL do the following:
where you need to adjust the device name for your system.
\label{restorehang}
+\subsection*{I Run a Restore Job and Bacula Hangs. What do I do?}
\item [I Run a Restore Job and Bacula Hangs. What do I do?]
\index[general]{I Run a Restore Job and Bacula Hangs. What do I do? }
On Bacula version 1.25 and prior, it expects you to have the correct tape
you for the tape, and if the wrong one is mounted, it will inform you.
If you have previously done an {\bf unmount} command, all Storage daemon
- sessions (jobs) will be completely blocked from using the drive unmounted, so
- be sure to do a {\bf mount} after your unmount. If in doubt, do a second {\bf
- mount}, it won't cause any harm.
+ sessions (jobs) will be completely blocked from using the drive unmounted,
+so
+ be sure to do a {\bf mount} after your unmount. If in doubt, do a second
+ {\bf mount}, it won't cause any harm.
\label{windowstart}
+\subsection*{I Cannot Get My Windows Client to Start Automatically? }
\item [I Cannot Get My Windows Client to Start Automatically? ]
\index[general]{I Cannot Get My Windows Client to Start Automatically? }
You are probably having one of two problems: either the Client is dying due
manual.
\label{windowsdie}
-
+\subsection*{My Windows Client Immediately Dies When I Start It}
\item [My Windows Client Immediately Dies When I Start It ]
\index[general]{My Windows Client Immediately Dies When I Start It }
The most common problem is either that the configuration file is not where it
\label{scroll}
\item [When I Start the Console, the Error Messages Fly By. How can I see
them? ]
- \index[general]{When I Start the Console, the Error Messages Fly By. How can I see them? }
- Either use a shell window with a scroll bar, or use the gnome-console. In any
+ \index[general]{When I Start the Console, the Error Messages Fly By. How can
+I see them? }
+ Either use a shell window with a scroll bar, or use the gnome-console. In
+any
case, you probably should be logging all output to a file, and then you can
simply view the file using an editor or the {\bf less} program. To log all
output, I have the following in my Director's Message resource definition:
system.
\label{nobackup}
+\subsection*{My backups are not working on my Windows
+ Client. What should I do?}
+
\item [I didn't realize that the backups were not working on my Windows
Client. What should I do? ]
\index[general]{I didn't realize that the backups were not working on my Windows
FAQ for how to do so.
\label{sched}
+\subsection*{All my Jobs are scheduled for the same time. Will this cause
+ problems?}
\item [All my Jobs are scheduled for the same time. Will this cause
problems? ]
\index[general]{All my Jobs are scheduled for the same time. Will this cause
leave this set to {\bf 1} for the Director.
\label{disk}
+\subsection*{Can Bacula Backup My System To Files instead of Tape?}
\item [Can Bacula Backup My System To Files instead of Tape? ]
\index[general]{Can Bacula Backup My System To Files instead of Tape? }
Yes, in principle, Bacula can backup to any storage medium as long as you
For an example of how to backup to files, please see the
\ilink{Pruning Example}{PruningExample} in the Recycling
chapter of this manual. Also, there is a whole chapter devoted to
- \ilink{Backing Up to Disk}{_ChapterStart39}.
+ \ilink{Basic Volume Management}{_ChapterStart39}. This chapter was
+ originally written to explain how to write to disk, but was expanded
+ to include volume management. It is, however, still quite a good
+ chapter to read.
\label{bigfiles}
+\subsection*{Can Bacula Backup and Restore Files Greater than 2 Gigabytes?}
\item [Can Bacula Backup and Restore Files Greater than 2 Gigabytes in
Size? ]
\index[general]{Can Bacula Backup and Restore Files Greater than 2 Gigabytes in
supported by Bacula can handle files larger than 2 Gigabytes.
\label{cancel}
+\subsection*{I want to stop a job. Is
+ there a better way than {\bf ./bacula stop} to stop it?}
\item [I Started A Job then Decided I Really Did Not Want to Run It. Is
there a better way than {\bf ./bacula stop} to stop it?]
\index[general]{I Started A Job then Decided I Really Did Not Want to
{\bf mount} command before it will be canceled.
\label{trademark}
+\subsection*{Why have You Trademarked the Name
+ Bacula\raisebox{.6ex}{{\footnotesize \textsuperscript{\textregistered}}}?}
\item [Why have You Trademarked the Name
Bacula\raisebox{.6ex}{{\footnotesize \textsuperscript{\textregistered}}}?]
\index[general]{Why have You Trademarked the Name
in all respects with the program defined here.
\label{docversion}
-\item [Why is Your Online Document for Version 1.35 of Bacula when the
- Currently Release Version is 1.34?]
-\index[general]{Why is Your Online Document for Version 1.35 of Bacula when the
-Currently Release Version is 1.34? }
+\subsection*{Why is Your Online Document for Version 1.37 but the Released Version is 1.36?}
+\item [Why is Your Online Document for Version 1.37 of Bacula when the
+ Currently Release Version is 1.36?]
+\index[general]{Why is Your Online Document for Version 1.37 but Released Version is 1.36? }
As Bacula is being developed, the document is also being enhanced, more often
than not it has clarifications of existing features that can be very useful
to our users, so we publish the very latest document. Fortunately it is rare
please use the one distributed in the source code.
\label{sure}
-
+\subsection*{Does Bacula really save and restore all files?}
\item [How Can I Be Sure that Bacula Really Saves and Restores All Files? ]
\index[general]{How Can I Be Sure that Bacula Really Saves and Restores
All Files? } It is really quite simple, but took me a while to figure
- out how to ``prove'' it. First make a Bacula Rescue disk, see the
+ out how to "prove" it. First make a Bacula Rescue disk, see the
\ilink{Disaster Recovery Using Bacula}{_ChapterStart38} of this manual.
Second, you run a full backup of all your files on all partitions.
Third, you run an Verify InitCatalog Job on the same FileSet, which
of the same type.
\label{upgrade}
+\subsection*{I want an Incremental but Bacula runs it as a Full backup. Why?}
\item [I did a Full backup last week, but now in running an Incremental,
Bacula says it did not find a FULL backup, so it did a FULL backup. Why?]
\index[general]{I did a Full backup last week, but now in running an
or selecting a FileSet. For more on backup levels see below.
\label{filenamelengths}
+\subsection*{Do you really handle unlimited path lengths?}
\item [How Can You Claim to Handle Unlimited Path and Filename Lengths
when All Other Programs Have Fixed Limits?]
\index[general]{How Can You Claim to Handle Unlimited Path and Filename
but can grow as needed to handle any length. Most of the work is
carried out by lower level routines making the coding rather easy.
+ Note that due to limitations Win32 path and filenames cannot exceed
+ 260 characters. By using Win32 Unicode functions, we will remove this
+ restriction in later versions of Bacula.
+
\label{unique}
-\item [What Is the Really Unique Feature of Bacula? ]
+\subsection*{What Is the Really Unique Feature of Bacula?}
+\item [What Is the Really Unique Feature of Bacula?]
\index[general]{What Is the Really Unique Feature of Bacula? } Well, it
is hard to come up with unique features when backup programs for Unix
machines have been around since the 1960s. That said, I believe that
implemented, this will enormously reduce tape usage.
\label{sequence}
-
-\item [If I Do Run Multiple Simultaneous Jobs, How Can I Force One
+\subsection*{How can I force one job to run after another?}
+\item [If I Run Multiple Simultaneous Jobs, How Can I Force One
Particular Job to Run After Another Job? ]
-\index[general]{If I Do Run Multiple Simultaneous Jobs, How Can I Force One
+\index[general]{If I Run Multiple Simultaneous Jobs, How Can I Force One
Particular Job to Run After Another Job? }
Yes, you can set Priorities on your jobs so that they run in the order you
specify. Please see:
\ilink{the Priority record}{Priority} in the Job resource.
\label{nomail}
-
+\subsection*{I Am Not Getting Email Notification, What Can I Do? }
\item [I Am Not Getting Email Notification, What Can I Do? ]
\index[general]{I Am Not Getting Email Notification, What Can I Do? }
manual.
\label{periods}
-
+\subsection*{My retention periods don't work}
\item [I Change Recycling, Retention Periods, or File Sizes in my Pool
- Resource and they Still Don``t Work.]
- \index[general]{I Change Recycling, Retention Periods, or File Sizes in my Pool
- Resource and they Still Don"t Work. }
+ Resource and they Still Don't Work.]
+ \index[general]{I Change Recycling, Retention Periods, or File Sizes in my
+Pool
+ Resource and they Still Don't Work. }
The different variables associated with a Pool are defined in the Pool
Resource, but are actually read by Bacula from the Catalog database. On
Bacula versions prior to 1.30, after changing your Pool Resource, you must
program.
\label{CompressionNotWorking}
+\subsection*{Why aren't my files compressed?}
\item [I Have Configured Compression On, But None of My Files Are
Compressed. Why?]
\index[general]{I Have Configured Compression On, But None of My Files Are
the tape drive hardware, and you either enable or disable it with system
tools such as {\bf mt}. This compression works independently of Bacula.
- Bacula also has compression code, which is normally used only when backing up
- to file Volumes. There are two conditions for this ''software`` to become
+ Bacula also has compression code, which is normally used only when backing
+up
+ to file Volumes. There are two conditions for this "software" to become
enabled.
\begin{enumerate}
\begin{itemize}
\item There is an I/O error on the tape. Bacula prints an error message and
- requests a new tape. Bacula does not attempt to continue writing after an I/O
+ requests a new tape. Bacula does not attempt to continue writing after an
+I/O
error.
\item Bacula encounters and end of medium on the tape. This is not always
distinguishable from an I/O error.
\end{itemize}
\label{LevelChanging}
-
+\subsection*{Incremental backups are not working}
\item [Bacula is Not Doing the Right Thing When I Request an Incremental
Backup. Why?]
- \index[general]{Bacula is Not Doing the Right Thing When I Request an Incremental
+ \index[general]{Bacula is Not Doing the Right Thing When I Request an
+Incremental
Backup. Why? }
As explained in one of the previous questions, Bacula will automatically
- upgrade an Incremental or Differential job to a Full backup if it cannot find
+ upgrade an Incremental or Differential job to a Full backup if it cannot
+find
a prior Full backup or a suitable Full backup. For the gory details on
how/when Bacula decides to upgrade levels please see the
\ilink{Level record}{Level} in the Director's configuration
there is not much we can do.
\label{WaitForever}
+\subsection*{I am waiting forever for a backup of an offsite machine}
\item [I am Backing Up an Offsite Machine with an Unreliable Connection.
- The Director Waits Forever for the Client to Contact the SD. What Can I Do?]
- \index[general]{I am Backing Up an Offsite Machine with an Unreliable Connection.
+ The Director Waits Forever for the Client to Contact the SD. What Can I
+Do?]
+ \index[general]{I am Backing Up an Offsite Machine with an Unreliable
+Connection.
The Director Waits Forever for the Client to Contact the SD. What Can I Do?}
Bacula was written on the assumption that it will have a good TCP/IP
connection between all the daemons. As a consequence, the current Bacula
- doesn't deal with faulty connections very well. This situation is slowly being
+ doesn't deal with faulty connections very well. This situation is slowly
+being
corrected over time.
There are several things you can do to improve the situation.
\end{itemize}
\label{sshHanging}
+\subsection*{SSH hangs forever after starting Bacula}
\item [When I ssh into a machine and start Bacula then attempt to exit,
ssh hangs forever.]
- \index[general]{When I ssh into a machine and start Bacula then attempt to exit,
+ \index[general]{When I ssh into a machine and start Bacula then attempt to
+exit,
ssh hangs forever. }
This happens because Bacula leaves stdin, stdout, and stderr open for debug
purposes. To avoid it, the simplest thing to do is to redirect the output of
and likewise for the other daemons.
\label{RetentionPeriods}
-
+\subsection*{I'm confused by retention periods}
\item [I'm confused by the different Retention periods: File Retention,
Job Retention, Volume Retention. Why are there so many?]
- \index[general]{I'm confused by the different Retention periods: File Retention,
+ \index[general]{I'm confused by the different Retention periods: File
+Retention,
Job Retention, Volume Retention. Why are there so many? }
Yes, this certainly can be confusing. The basic reason for so many is to
- allow flexibility. The File records take quite a lot of space in the catalog,
+ allow flexibility. The File records take quite a lot of space in the
+catalog,
so they are typically records you want to remove rather quickly. The Job
- records, take very little space, and they can be useful even without the File
+ records, take very little space, and they can be useful even without the
+File
records to see what Jobs actually ran and when. One must understand that if
the File records are removed from the catalog, you cannot use the {\bf
restore} command to restore an individual file since Bacula no longer knows
- where it is. However, as long as the Volume Retention period has not expired,
+ where it is. However, as long as the Volume Retention period has not
+expired,
the data will still be on the tape, and can be recovered from the tape.
- For example, I keep a 30 day retention period for my Files to keep my catalog
+ For example, I keep a 30 day retention period for my Files to keep my
+catalog
from getting too big, but I keep my tapes for a minimum of one year, just in
case.
\label{MaxVolumeSize}
+\subsection*{MaxVolumeSize is ignored}
\item [Why Does Bacula Ignore the MaxVolumeSize Set in my Pool?]
\index[general]{Why Does Bacula Ignore the MaxVolumeSize Set in my Pool? }
The MaxVolumeSize that Bacula uses comes from the Media record, so most
- likely you changed your Pool, which is used as the default for creating Media
+ likely you changed your Pool, which is used as the default for creating
+Media
records, {\bf after} you created your Volume. Check what is in the Media
record by doing:
to change it.
\label{ConnectionRefused}
-\item [In connecting to my Client, I get ''ERR:Connection Refused. Packet
- Size too big from File daemon:192.168.1.4:9102`` Why?]
- \index[general]{In connecting to my Client, I get ``:Connection Refused.
- Packet Size too big from File daemon:192.168.1.4:9102'' Why? }
- This is typically a communications error resulting from one of the following:
+\subsection*{I get a Connection refused when connecting to my Client}
+\item [In connecting to my Client, I get "ERR:Connection Refused. Packet
+ Size too big from File daemon:192.168.1.4:9102" Why?]
+ \index[general]{In connecting to my Client, I get "ERR:Connection
+Refused.
+ Packet Size too big from File daemon:192.168.1.4:9102" Why? }
+ This is typically a communications error resulting from one of the
+following:
\begin{itemize}
This will cause the FD to write a file {\bf bacula.trace} in the current
directory, which you can examine to determine the problem.
+\subsection*{Long running jobs die with Pipe Error}
+\item [During long running jobs my File daemon dies with Pipe Error, or
+ some other communications error. Why?]
+ \index[general]{Communications Errors}
+ \index[general]{Pipe Errors}
+ There are a number of reasons why a connection might break.
+ Most often, it is a router between your two computers that times out
+ inactive lines (not respecting the keepalive feature that Bacula uses).
+ In that case, you can use the {\bf Heartbeat Interval} directive in
+ both the Storage daemon and the File daemon.
+
+ In at least one case, the problem has been a bad driver for a Win32
+ NVidia NForce 3 ethernet card with driver (4.4.2 17/05/2004).
+ In this case, a good driver is (4.8.2.0 06/04/2005). Moral of
+ the story, make sure you have the latest ethernet drivers
+ loaded, or use the following workaround as suggested by Thomas
+ Simmons for Win32 machines:
+
+ Browse to:
+ Start \gt{} Control Panel \gt{} Network Connections
+
+ Right click the connection for the nvidia adapter and select properties.
+ Under the General tab, click "Configure...". Under the Advanced tab set
+ "Checksum Offload" to disabled and click OK to save the change.
+
+ Lack of communications, or communications that get interrupted can
+ also be caused by Linux firewalls where you have a rule that throttles
+ connections or traffic. For example, if you have:
+
+\footnotesize
+\begin{verbatim}
+iptables -t filter -A INPUT -m limit --limit 3/second --limit-burst 3 -j DROP
+\end{verbatim}
+\normalsize
+
+ you will want to add the following rules {\bf before} the above rule:
+\footnotesize
+\begin{verbatim}
+iptables -t filter -A INPUT --dport 9101 -j ACCEPT
+iptables -t filter -A INPUT --dport 9102 -j ACCEPT
+iptables -t filter -A INPUT --dport 9103 -j ACCEPT
+\end{verbatim}
+\normalsize
+ This will ensure that any Bacula traffic will not get terminated because
+ of high usage rates.
+
+\subsection*{How to I tell the Job which Volume to use?}
+\item[I can't figure out how to tell the job which volume to use]
+ \index[general]{What tape to mount}
+ This is an interesting statement. I now see that a number of people new to
+ Bacula have the same problem as you, probably from using programs like tar.
+
+ In fact, you do not tell Bacula what tapes to use. It is the inverse. Bacula
+ tells you want tapes it wants. You put tapes at its disposition and it
+ chooses.
+
+ Now, if you *really* want to be tricky and try to tell Bacula what to do, it
+ will be reasonable if for example you mount a valid tape that it can use on a
+ drive, it will most likely go ahead and use it. It also has a documented
+ algorithm for choosing tapes -- but you are asking for problems ...
+
+ So, the trick is to invert your concept of things and put Bacula in charge of
+ handling the tapes. Once you do that, you will be fine. If you want to
+ anticipate what it is going to do, you can generally figure it out correctly
+ and get what you want.
+
+ If you start with the idea that you are going to force or tell Bacula to use
+ particular tapes or you insist on trying to run in that kind of mode, you will
+ probably not be too happy.
+
+ I don't want to worry about what tape has what data. That is what Bacula is
+ designed for.
+
+ If you have an application where you *really* need to remove a tape each day
+ and insert a new one, it can be done the directives exist to accomplish that.
+ In such a case, one little "trick" to knowing what tape Bacula will want at
+ 2am while you are asleep is to run a tiny job at 4pm while you are still at
+ work that backs up say one directory, or even one file. You will quickly find
+ out what tape it wants, and you can mount it before you go home ...
+
\end{description}
\item [Name = \lt{}name\gt{}]
\index[fd]{Name }
The client name that must be used by the Director when connecting. Generally,
-it is a good idea to use a name related to the machine so that error messages
-can be easily identified if you have multiple Clients. This record is
-required.
+ it is a good idea to use a name related to the machine so that error messages
+ can be easily identified if you have multiple Clients. This directive is
+ required.
\item [Working Directory = \lt{}Directory\gt{}]
\index[fd]{Working Directory }
This directive is mandatory and specifies a directory in which the File
-daemon may put its status files. This directory should be used only by {\bf
-Bacula}, but may be shared by other Bacula daemons. This record is required
+ daemon may put its status files. This directory should be used only by {\bf
+ Bacula}, but may be shared by other Bacula daemons provided the daemon
+ names on the {\bf Name} definition are unique for each daemon. This directive
+ is required.
+
+ On Win32 systems, in some circumstances you may need to specify a drive
+ letter in the specified working directory path. Also, please be sure
+ that this directory is writable by the SYSTEM user otherwise restores
+ may fail (the bootstrap file that is transferred to the File daemon from
+ the Director is temporarily put in this directory before being passed
+ to the Storage daemon).
\item [Pid Directory = \lt{}Directory\gt{}]
- \index[dir]{Pid Directory }
+ \index[fd]{Pid Directory }
This directive is mandatory and specifies a directory in which the Director
may put its process Id file files. The process Id file is used to shutdown
Bacula and to prevent multiple copies of Bacula from running simultaneously.
Directory} as defined above.
\item [Heartbeat Interval = \lt{}time-interval\gt{}]
- \index[dir]{Heartbeat Interval }
+ \index[fd]{Heartbeat Interval }
+ \index[general]{Heartbeat Interval}
+ \index[general]{Broken pipe}
This record defines an interval of time. For each heartbeat that the
File daemon receives from the Storage daemon, it will forward it to the
Director. In addition, if no heartbeat has been received from the
signal to the Director and to the Storage daemon to keep the channels
active. The default interval is zero which disables the heartbeat.
This feature is particularly useful if you have a router such as 3Com
- that does not follow Internet standards and times out an inactive
- connection after a short duration.
+ that does not follow Internet standards and times out a valid
+ connection after a short duration despite the fact that keepalive is
+ set. This usually results in a broken pipe error message.
+
+ If you continue getting broken pipe error messages despite using the
+ Heartbeat Interval, and you are using Windows, you should consider
+ upgrading your ethernet driver. This is a known problem with NVidia
+ NForce 3 drivers (4.4.2 17/05/2004), or try the following workaround
+ suggested by Thomas Simmons for Win32 machines:
+
+ Browse to:
+ Start \gt{} Control Panel \gt{} Network Connections
+
+ Right click the connection for the nvidia adapter and select properties.
+ Under the General tab, click "Configure...". Under the Advanced tab set
+ "Checksum Offload" to disabled and click OK to save the change.
+
+ Lack of communications, or communications that get interrupted can
+ also be caused by Linux firewalls where you have a rule that throttles
+ connections or traffic.
+
\item [Maximum Concurrent Jobs = \lt{}number\gt{}]
- \index[dir]{Maximum Concurrent Jobs }
+ \index[fd]{Maximum Concurrent Jobs }
where \lt{}number\gt{} is the maximum number of Jobs that should run
concurrently. The default is set to 2, but you may set it to a larger
number. Each contact from the Director (e.g. status request, job start
The name of the FileSet resource. This directive is required.
\item [Ignore FileSet Changes = \lt{}yes|no\gt{}]
-\index[dir]{Ignore FileSet Changes }
+\index[dir]{Ignore FileSet Changes}
If this directive is set to {\bf yes}, any changes you make to the FileSet
Include or Exclude lists will be ignored and not cause Bacula to immediately
perform a Full backup. The default is {\bf no}, in which case, if you change
everything is properly backed up. It is not recommended to set this directive
to yes. This directive is available in Bacula version 1.35.4 or later.
+\item [Enable VSS = \lt{}yes|no\gt{}]
+\index[dir]{Enable VSS}
+ If this directive is set to {\bf yes} the File daemon will be notified
+ that the user wants to use a Volume Shadow Copy Service (VSS) backup
+ for this job. The default is {\bf no}. This directive is effective
+ only for VSS enabled Win32 File daemons. It permits a consistent copy
+ of open files to be made for cooperating writer applications, and for
+ applications that are not VSS away, Bacula can at least copy open files.
+ For more information, please see the
+ \ilink{Windows}{VSS} chapter of this manual.
+
\item [Include \{ Options \{\lt{}file-options\gt{}\} ...;
\lt{}file-list\gt{} \} ]
-\index[dir]{Include \ \{ [ Options \{\lt{}file-options\gt{}\} ...]
+\index[dir]{Include \{ [ Options \{\lt{}file-options\gt{}\} ...]
\lt{}file-list\gt{} \} }
-\item [Options \ \{ \lt{}file-options\gt{} \} ]
-\index[dir]{Options \ \{ \lt{}file-options\gt{} \} }
+\item [Options \{ \lt{}file-options\gt{} \} ]
+\index[dir]{Options \{ \lt{}file-options\gt{} \} }
-\item [Exclude \ \{ \lt{}file-list\gt{} \}]
-\index[dir]{Exclude \ \{ \lt{}file-list\gt{} \} }
+\item [Exclude \{ \lt{}file-list\gt{} \}]
+\index[dir]{Exclude \{ \lt{}file-list\gt{} \} }
\end{description}
The Include resource must contain a list of directories and/or files to be
processed in the backup job. Normally, all files found in all
subdirectories of any directory in the Include File list will be backed up.
+Note, see below for the definition of \lt{}file-list\gt{}.
The Include resource may also contain one or more Options resources that
specify options such as compression to be applied to all or any subset of
the files found for backup.
versions prior to 1.32f-5-09Mar04 due to a bug, you will not be able to
restore hard linked files that were backed up twice.
-If you have used Bacula prior to version 1.34.3, you will note three things in
+If you have used Bacula prior to version 1.36.3, you will note three things in
the new FileSet syntax:
\begin{enumerate}
The Options resource is optional, but when specified, it will contain a
list of {\bf keyword=value} options to be applied to the file-list.
+See below for the definition of file-list.
Multiple Options resources may be specified one after another. As the
files are found in the specified directories, the Options will applied to
the filenames to determine if and how the file should be backed up. The
However, one additional point is that
in the case that no match was found, Bacula will use the options found in
the last Options resource. As a consequence, if you want a particular set
-of ``default'' options, you should put them in an Options resource after
+of "default" options, you should put them in an Options resource after
any other Options.
+It is a good idea to put all your wild-card and regex expressions inside
+double quotes to prevent conf file scanning problems.
+
This is perhaps a bit overwhelming, so there are a number of examples included
below to illustrate how this works.
the backup. This option is not generally recommended as there are very
few programs that use st\_atime, and the backup overhead is increased
because of the additional system call necessary to reset the times.
+ However, for some files, such as mailboxes, when Bacula backs up the
+ file, the user will notice that someone (Bacula) has accessed the
+ file. In this, case keepatime can be useful.
(I'm not sure this works on Win32).
+ Note, if you use this feature, when Bacula resets the access time, the
+ change time (st\_ctime) will automatically be modified by the system,
+ so on the next incremental job, the file will be backed up even if
+ it has not changed. As a consequence, you will probably also want
+ to use {\bf mtimeonly = yes} as well as keepatime (thanks to
+ Rudolf Cejka for this tip).
+
+\item [hardlinks=yes|no]
+\index[dir]{hardlinks}
+ When enabled (default), this directive will cause hard inks to be
+ backed up. However, the File daemon keeps track of hard linked files and
+ will backup the data only once. The process of keeping track of the
+ hard links can be quite expensive if you have lots of them (tens of
+ thousands or more). This doesn't occur on normal Unix systems, but if
+ you use a program like BackupPC, it can create hundreds of thousands, or
+ even millions of hard links. Backups become very long and the File daemon
+ will consume a lot of CPU power checking hard links. In such a case,
+ set {\bf hardlinks=no} and hard links will not be backed up. Note, using
+ this option will most likely backup more data and on a restore the file
+ system will not be restored identically to the original.
+
\item [wild=\lt{}string\gt{}]
\index[dir]{wild }
Specifies a wild-card string to be applied to the filenames and
Multiple wild-card directives may be specified, and they will be applied
in turn until the first one that matches. Note, if you exclude a
directory, no files or directories below it will be matched.
+ It is recommended to enclose the string in double quotes.
\item [wildfile=\lt{}string\gt{}]
\index[dir]{wildfile }
which files are to be excluded. Multiple wild-card directives may be
specified, and they will be applied in turn until the first one that
matches.
+ It is recommended to enclose the string in double quotes.
\item [wilddir=\lt{}string\gt{}]
\index[dir]{wilddir }
specified, and they will be applied in turn until the first one that
matches. Note, if you exclude a directory, no files or directories
below it will be matched.
+ It is recommended to enclose the string in double quotes.
\item [regex=\lt{}string\gt{}]
included. If {\bf Exclude=yes} is specified, the regex will select
which files are to be excluded. Multiple regex directives may be
specified within an Options resource, and they will be applied in turn
- until the first one that matches. Note, if you exculde a
+ until the first one that matches. Note, if you exclude a
directory, no files or directories below it will be matched.
+ It is recommended to enclose the string in double quotes.
\item [regexfile=\lt{}string\gt{}]
\index[dir]{regexfile }
which files are to be excluded. Multiple regex directives may be
specified, and they will be applied in turn until the first one that
matches.
+ It is recommended to enclose the string in double quotes.
\item [regexdir=\lt{}string\gt{}]
\index[dir]{regexdir }
regex directives may be specified, and they will be applied in turn
until the first one that matches. Note, if you exclude a directory, no
files or directories below it will be matched.
+ It is recommended to enclose the string in double quotes.
\item [exclude=yes|no]
\index[dir]{exclude }
The default is {\bf no}. If this option is set to yes, and you have the
POSIX {\bf libacl} installed on your system, Bacula will backup the file
and directory UNIX Access Control Lists (ACL) as defined in IEEE Std
- 1003.1e draft 17 and ``POSIX.1e'' (abandoned). This feature is
+ 1003.1e draft 17 and "POSIX.1e" (abandoned). This feature is
available on UNIX only and depends on the ACL library. Bacula is
automatically compiled with ACL support if the {\bf libacl} library is
installed on your system (shown in config.out). While restoring the
\begin{itemize}
\item Any name preceded by an at-sign (@) is assumed to be the name of a
- file, which contains a list of files each preceded by a ``File =''. The
+ file, which contains a list of files each preceded by a "File =". The
named file is read once when the configuration file is parsed during the
Director startup. Note, that the file is read on the Director's machine
and not on the Client's. In fact, the @filename can appear anywhere
a program. This program will be executed on the Director's machine at
the time the Job starts (not when the Director reads the configuration
file), and any output from that program will be assumed to be a list of
- files or directories, one per line, to be included. This allows you to
- have a job that for example includes all the local partitions even if
- you change the partitioning by adding a disk. In general, you will need
+ files or directories, one per line, to be included.
+
+ This allows you to
+ have a job that, for example, includes all the local partitions even if
+ you change the partitioning by adding a disk. The examples
+ below show you how to do this. However, please note two
+ things: 1. if you want the local filesystems, you probably
+ should be using the new {\bf fstype} directive, which was
+ added in version 1.36.3. 2. the exact syntax of the command
+ needed in the examples below is very system dependent. For
+ example, on recent Linux systems, you may need to add the -P
+ option, on FreeBSD systems, the options will be different as
+ well.
+
+ In general, you will need
to prefix your command or commands with a {\bf sh -c} so that they are
invoked by a shell. This will not be the case if you are invoking a
script as in the second example below. Also, you must take care to
escape (precede with a \textbackslash{}) wild-cards, shell character,
and to ensure that any spaces in your command are escaped as well. If
- you use a single quotes (') within a double quote (``), Bacula will
+ you use a single quotes (') within a double quote ("), Bacula will
treat everything between the single quotes as one field so it will not
be necessary to escape the spaces. In general, getting all the quotes
and escapes correct is a real pain as you can see by the next example.
will produce a list of all the local partitions on a RedHat Linux system.
Note, the above line was split, but should normally be written on one line.
Quoting is a real problem because you must quote for Bacula which consists of
- preceding every \textbackslash{} and every '' with a \textbackslash{}, and
+ preceding every \textbackslash{} and every " with a \textbackslash{}, and
you must also quote for the shell command. In the end, it is probably easier
just to execute a small file with:
If the vertical bar (|) in front of my\_partitions is preceded by a
backslash as in \textbackslash{}|, the program will be executed on the
- Client's machine instead of on the Director's machine -- (this is
- implemented but not thoroughly tested, and is reported to work on
- Windows). Please note that if the filename is given within quotes, you
+ Client's machine instead of on the Director's machine.
+ Please note that if the filename is given within quotes, you
will need to use two slashes. An example, provided by John Donagher,
that backs up all the local UFS partitions on a remote system is:
\end{verbatim}
\normalsize
- Note, it requires two backslash characters after the double quote (one
+ The above requires two backslash characters after the double quote (one
preserves the next one). If you are a Linux user, just change the {\bf ufs}
- to {\bf ext3} (or your preferred filesystem type) and you will be in
+ to {\bf ext3} (or your preferred filesystem type), and you will be in
business.
\item Any file-list item preceded by a less-than sign (\lt{}) will be taken
and after one minute of waiting, Bacula will give up and go on to the next
file. The data read can be anything since Bacula treats it as a stream.
- This feature can be an excellent way to do a ``hot'' backup of a very large
+ This feature can be an excellent way to do a "hot" backup of a very large
database. You can use the {\bf RunBeforeJob} to create the fifo and to start
a program that dynamically reads your database and writes it to the fifo.
Bacula will then write it to the Volume.
The following is an example of a valid FileSet resource definition. Note, the
first Include pulls in the contents of the file {\bf /etc/backup.list} when
-Bacula is started (i.e. the @).
+Bacula is started (i.e. the @), and that file must have each filename to be
+backed up preceded by a {\bf File =} and on a separate line.
\footnotesize
\begin{verbatim}
signature=SHA1
Sparse = yes
}
- File = @/etc/backup.list
+ @/etc/backup.list
}
Include {
Options {
- wildfile = *.o
- wildfile = *.exe
+ wildfile = "*.o"
+ wildfile = "*.exe"
Exclude = yes
}
File = /root/myfile
signature=SHA1
Sparse = yes
}
- File = @/etc/backup.list
+ @/etc/backup.list
}
Include {
Options {
- wildfile = *.o
- wildfile = *.exe
+ wildfile = "*.o"
+ wildfile = "*.exe"
Exclude = yes
}
File = /root/myfile
Options {
wilddir = /proc
wilddir = /tmp
- wildfile = \.journal
- wildfile = \.autofsck
+ wildfile = ".journal"
+ wildfile = ".autofsck"
exclude = yes
}
File = /
Name = "Full Set"
Include { !!!!!!!!!!!!
Options { This
- wildfile = *.Z example
- wildfile = *.gz doesn't
+ wildfile = "*.Z" example
+ wildfile = "*.gz" doesn't
Include = yes work
} !!!!!!!!!!!!
File = /myfile
Name = "Full Set"
Include {
Options {
- wildfile = *.Z
- wildfile = *.gz
+ wildfile = "*.Z"
+ wildfile = "*.gz"
Include = yes
}
Options {
\end{verbatim}
\normalsize
-The ``trick'' here was to add a RegexFile expression that matches
+The "trick" here was to add a RegexFile expression that matches
all files. It does not match directory names, so all directories in
/myfile will be backed up (the directory entry) and any *.Z and *.gz
files contained in them. If you know that certain directories do
specified in Unix convention (i.e. forward slash (/)). If you wish to include
a quote in a file name, precede the quote with a backslash
(\textbackslash{}). For example you might use the following
-for a Windows machine to backup the ``My Documents'' directory:
+for a Windows machine to backup the "My Documents" directory:
\footnotesize
\begin{verbatim}
Name = "Windows Set"
Include {
Options {
- WildFile = *.obj
- WildFile = *.exe
+ WildFile = "*.obj"
+ WildFile = "*.exe"
exclude = yes
}
File = "c:/My Documents"
\item To exclude a directory, you must not have a trailing slash on the
directory name.
\item If you have spaces in your filename, you must enclose the entire name
- in double-quote characters (``). Trying to use a backslash before the space
+ in double-quote characters ("). Trying to use a backslash before the space
will not work.
\item If you are using the old Exclude syntax (noted below), you may not
specify a drive letter in the exclude. The new syntax noted above should work
\index[general]{Considerations!Windows NTFS Naming }
\addcontentsline{toc}{paragraph}{Windows NTFS Naming Considerations}
-NTFS filenames containing Unicode characters (i.e. \gt{} 0xFF) cannot be
-explicitly named at the moment. You must include such names by naming a higher
-level directory or a drive letter that does not contain Unicode characters.
+NTFS filenames containing Unicode characters should now be supported
+as of version 1.37.30 or later.
\subsubsection*{Testing Your FileSet}
\index[general]{FileSet!Testing Your }
estimate} command in the Console program. See the
\ilink{estimate command}{estimate} in the Console chapter of this
manual.
-
-\subsubsection*{The Old FileSet Resource}
-\index[general]{Resource!Old FileSet }
-\index[general]{Old FileSet Resource }
-\addcontentsline{toc}{subsection}{Old FileSet Resource}
-
-The old pre-version 1.34.3 FileSet Resource has been deprecated but may still
-work. You are encouraged to convert to using the new form since the old code
-will be removed sometime during 1.37 development.
daemon or client, and SD the Storage daemon. The numbers that follow those
names are the standard ports used by Bacula, and the -\gt{} represents the
left side making a connection to the right side (i.e. the right side is the
-``server'' or is listening on the specified port), and the left side is the
-``client'' who initiates the conversation.
+"server" or is listening on the specified port), and the left side is the
+"client" who initiates the conversation.
Note, port 9103 serves both the Director and the File daemon, each having its
own independent connection.
firewall.mydomain.tld:9103 MUST be forwarded using the firewall's
configuration software to server.int.mydomain.tld:9103. Some firewalls call
this 'Server Publication'. Others may call it 'Port Forwarding'.
+
+\subsubsection*{Firewall Problems}
+\index[general]{Firewall Problems}
+\index[general]{Problems!Firewalls}
+\addcontentsline{toc}{subsubsection}{Firewall Problems}
+Either a firewall or a router may decide to timeout and terminate
+open connections if they are not active for a short time. By Internet
+standards the period should be two hours, and should be indefinitely
+extended if KEEPALIVE is set as is the case by Bacula. If your firewall
+or router does not respect these rules, you may find Bacula connections
+terminated. In that case, the first thing to try is turning on the
+{\bf Heart Beat Interval} both in the File daemon and the Storage daemon
+and set an interval of say five minutes.
+
+Also, if you have denial of service rate limiting in your firewall, this
+too can cause Bacula disconnects since Bacula can at times use very high
+access rates. To avoid this, you should implement default accept
+rules for the Bacula ports involved before the rate limiting rules.
+
+Finally, if you have a Windows machine, it will most likely by default
+disallow connections to the Bacula Windows File daemon. See the
+Windows chapter of this manual for additional details.
{\bf Bacula} is a set of computer programs that permits you (or the system
administrator) to manage backup, recovery, and verification of computer data
-across a network of computers of different kinds. In technical terms, it is a
+across a network of computers of different kinds. Bacula can also run entirely
+upon a single computer, and can backup to various types of media, including tape
+and disk.
+
+In technical terms, it is a
network Client/Server based backup program. Bacula is relatively easy to use
and efficient, while offering many advanced storage management features that
make it easy to find and recover lost or damaged files. Due to its modular
programs and write over any tape that you put in the drive, then you will find
working with Bacula difficult. Bacula is designed to protect your data
following the rules you specify, and this means reusing a tape only
-as the last resort. It is possible to ``force'' Bacula to write
+as the last resort. It is possible to "force" Bacula to write
over any tape in the drive, but it is easier and more efficient to use a
simpler program for that kind of operation.
\begin{itemize}
\item
\label{DirDef}
- {\bf Bacula Director} service consists of the program that supervises all the
+ {\bf Bacula Director} service consists of the program that supervises all
+the
backup, restore, verify and archive operations. The system administrator uses
the Bacula Director to schedule backups and to recover files. For more
details see the Director Services Daemon Design Document in the Bacula
-Developer's Guild. The Director runs as a daemon or a service (i.e. in the
+Developer's Guide. The Director runs as a daemon or a service (i.e. in the
background).
\item
\label{UADef}
- {\bf Bacula Console} services is the program that allows the administrator or
+ {\bf Bacula Console} services is the program that allows the administrator
+or
user to communicate with the {\bf Bacula Director} (see above). Currently,
the Bacula Console is available in three versions. The first and simplest is
to run the Console program in a shell window (i.e. TTY interface). Most
system administrators will find this completely adequate. The second version
-is a GNOME GUI interface that for the moment (23 November 2003) is far from
+is a GNOME GUI interface that is far from
complete, but quite functional as it has most the capabilities of the shell
Console. The third version is a wxWidgets GUI with an interactive file
restore. It also has most of the capabilities of the shell console, allows
command completion with tabulation, and gives you instant help about the
command you are typing. For more details see the
-\ilink{Bacula Console Design Document}{_ChapterStart23}.
+\ilink{Bacula Console Design Document}{_ConsoleChapter}.
\item
\label{FDDef}
{\bf Bacula File} services (or Client program) is the software program that
documentation, the File daemon is referred to as the Client (for example in
Bacula's configuration file). In addition to Unix/Linux File daemons, there
is a Windows File daemon (normally distributed in binary format). The Windows
-File daemon runs on all currently known Windows versions (95, 98, Me, NT,
-2000, XP).
+File daemon runs on current Windows versions (NT,
+2000, XP, 2003, and possibly Me and 98).
\item
\label{SDDef}
{\bf Bacula Storage} services consist of the software programs that perform
has the backup device (usually a tape drive).
\item
\label{DBDefinition}
- {\bf Catalog} services are comprised of the software programs responsible for
+ {\bf Catalog} services are comprised of the software programs responsible
+for
maintaining the file indexes and volume databases for all files backed up.
The Catalog services permit the System Administrator or user to quickly
locate and restore any desired file. The Catalog services sets Bacula apart
from simple backup programs like tar and bru, because the catalog maintains a
record of all Volumes used, all Jobs run, and all Files saved, permitting
-efficicient restoration and Volume management. Bacula currently supports
+efficient restoration and Volume management. Bacula currently supports
three different databases, MySQL, PostgreSQL, and SQLite, one of which must
-be chosen when building {\bf Bacula}. There also exists an Internal database,
-but it is no longer supported.
+be chosen when building {\bf Bacula}.
The three SQL databases currently supported (MySQL, PostgreSQL or SQLite)
provide quite a number of features, including rapid indexing, arbitrary
queries, and security. Although we plan to support other major SQL databases,
the current Bacula implementation interfaces only to MySQL, PostgreSQL and
-SQLite. For more details see the
-\ilink{Catalog Services Design Document}{_ChapterStart30}.
+SQLite. For the technical and porting details see the Catalog Services
+Design Document in the developer's documented.
The RPMs for MySQL and PostgreSQL ship as part of the Linux RedHat
-and several other releases, or building the rpms from the source is
+and several other releases. Alternatively, building the rpms from the source is
quite easy, see the
\ilink{ Installing and Configuring MySQL}{_ChapterStart} chapter of
this document for the details. For more information on MySQL, please see:
of this document.
\item
\label{MonDef}
- {\bf Bacula Monitor} services is the program that allows the administrator or
+ {\bf Bacula Monitor} services is the program that allows the administrator
+or
user to watch current status of {\bf Bacula Directors}, {\bf Bacula File
Daemons} and {\bf Bacula Storage Daemons} (see above). Currently, only a GTK+
version is available, which works with Gnome and KDE (or any window manager
\item [Catalog]
\index[fd]{Catalog }
- The Catalog is used to store summary information about the Jobs, Clients, and
+ The Catalog is used to store summary information about the Jobs, Clients,
+and
Files that were backed up and on what Volume or Volumes. The information
saved in the Catalog permits the administrator or user to determine what jobs
were run, their status as well as the important characteristics of each file
\item [Monitor]
\index[fd]{Monitor }
- The program that interfaces to the all the daemons allowing the user or
+ The program that interfaces to all the daemons allowing the user or
system administrator to monitor Bacula status.
\item [Resource]
\index[fd]{Resource }
A resource is a part of a configuration file that defines a specific unit of
information that is available to Bacula. It consists of several directives
-(individual configuation statements). For example, the {\bf Job} resource
+(individual configuration statements). For example, the {\bf Job} resource
defines all the properties of a specific Job: name, schedule, Volume pool,
backup type, backup level, ...
\item [Restore]
\index[fd]{Restore }
A restore is a configuration resource that describes the operation of
-recovering a file (lost or damaged) from backup media. It is the inverse of a
+recovering a file from backup media. It is the inverse of a
save, except that in most cases, a restore will normally have a small set of
files to restore, while normally a Save backs up all the files on the system.
Of course, after a disk crash, Bacula can be called upon to do a full
\item [Verify]
\index[sd]{Verify }
- A verify is a job that compares the current file attributes to the attributes
+ A verify is a job that compares the current file attributes to the
+attributes
that have previously been stored in the Bacula Catalog. This feature can be
used for detecting changes to critical system files similar to what {\bf
Tripwire} does. One of the major advantages of using Bacula to do this is
\item [Retention Period]
\index[fd]{Retention Period }
- There are various kinds of retention periods that Bacula recognizes. The most
+ There are various kinds of retention periods that Bacula recognizes. The
+most
important are the {\bf File} Retention Period, {\bf Job} Retention Period,
and the {\bf Volume} Retention Period. Each of these retention periods
applies to the time that specific records will be kept in the Catalog
The File Retention Period determines the time that File records are kept in
the catalog database. This period is important because the volume of the
database File records by far use the most storage space in the database. As a
-consequence, you must ensure that regular ``pruning'' of the database file
+consequence, you must ensure that regular "pruning" of the database file
records is done. (See the Console {\bf retention} command for more details on
this subject).
\item [Scan]
\index[sd]{Scan }
- A Scan operation causes the contents of a Volume or a series of Volumes to be
+ A Scan operation causes the contents of a Volume or a series of Volumes to
+be
scanned. These Volumes with the information on which files they contain are
restored to the Bacula Catalog. Once the information is restored to the
Catalog, the files contained on those Volumes may be easily restored. This
example, if you have created an emergency boot disk, a Bacula Rescue disk to
save the current partitioning information of your hard disk, and maintain a
complete Bacula backup, it is possible to completely recover your system from
-``bare metal'' that is starting from an empty disk.
+"bare metal" that is starting from an empty disk.
If you have used the {\bf WriteBootstrap} record in your job or some other
means to save a valid bootstrap file, you will be able to use it to extract
The licenses for most software are designed to take away your freedom to share
and change it. By contrast, the GNU General Public License is intended to
-guarantee your freedom to share and change free software\verb{--{to make sure the
+guarantee your freedom to share and change free software\verb:--:to make sure the
software is free for all its users. This General Public License applies to
most of the Free Software Foundation's software and to any other program whose
authors commit to using it. (Some other Free Software Foundation software is
{\bf 0.} This License applies to any program or other work which contains a
notice placed by the copyright holder saying it may be distributed under the
-terms of this General Public License. The ``Program'', below, refers to any
-such program or work, and a ``work based on the Program'' means either the
+terms of this General Public License. The "Program", below, refers to any
+such program or work, and a "work based on the Program" means either the
Program or any derivative work under copyright law: that is to say, a work
containing the Program or a portion of it, either verbatim or with
modifications and/or translated into another language. (Hereinafter,
-translation is included without limitation in the term ``modification''.) Each
-licensee is addressed as ``you''.
+translation is included without limitation in the term "modification".) Each
+licensee is addressed as "you".
Activities other than copying, distribution and modification are not covered
by this License; they are outside its scope. The act of running the Program is
new problems or concerns.
Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and ``any later
-version'', you have the option of following the terms and conditions either of
+specifies a version number of this License which applies to it and "any later
+version", you have the option of following the terms and conditions either of
that version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of this License,
you may choose any version ever published by the Free Software Foundation.
{\bf 11.} BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE
-THE PROGRAM ``AS IS'' WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR
+THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR
IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO
THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM
To do so, attach the following notices to the program. It is safest to attach
them to the start of each source file to most effectively convey the exclusion
-of warranty; and each file should have at least the ``copyright'' line and a
+of warranty; and each file should have at least the "copyright" line and a
pointer to where the full notice is found.
\footnotesize
The hypothetical commands {\tt `show w'} and {\tt `show c'} should show the
appropriate parts of the General Public License. Of course, the commands you
use may be called something other than {\tt `show w'} and {\tt `show c'}; they
-could even be mouse-clicks or menu items\verb{--{whatever suits your program.
+could even be mouse-clicks or menu items\verb:--:whatever suits your program.
You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a ``copyright disclaimer'' for the program, if
+school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
\footnotesize
In general, you will need the Bacula source release, and if you want to run a
Windows client, you will need the Bacula Windows binary release. However,
-Bacula needs certain third party packages (such as {\bf SQLite}, {\bf MySQL}
+Bacula needs certain third party packages (such as {\bf SQLite}, {\bf MySQL}, or
+{\bf PostgreSQL}
to build properly depending on the options you specify. To simplify your task,
we have combined a number of these packages into two {\bf depkgs} releases
(Dependency Packages). This can vastly simplify your life by providing you
Although the exact composition of the dependency packages may change from time
to time, the current makeup is the following:
-\addcontentsline{lot}{table}{Depedency Packages}
+\addcontentsline{lot}{table}{Dependency Packages}
\begin{longtable}{|l|l|l|l|}
\hline
\multicolumn{1}{|c| }{\bf 3rd Party Package } & \multicolumn{1}{c| }{\bf
\multicolumn{1}{c| }{X } \\
\hline {zlib } & \multicolumn{1}{c| }{- } & \multicolumn{1}{c| }{- } &
\multicolumn{1}{c| }{X } \\
- \hline {wxWidgits } & \multicolumn{1}{c| }{- } & \multicolumn{1}{c| }{- } &
+ \hline {wxWidgets } & \multicolumn{1}{c| }{- } & \multicolumn{1}{c| }{- } &
\multicolumn{1}{c| }{X }
\\ \hline
with valuable information about your SCSI tape drive (e.g. compression,
min/max block sizes, ...).
-The {\bf depkgs-win32} package contains the source code for the pthreads and
-zlib libraries used by the native Win32 client program. It will only be needed
+The {\bf depkgs-win32} package contains the source code for the pthreads,
+zlib, and wxWidgets libraries used by the native Win32 client program.
+It will only be needed
if you intend to build the Win32 client from source.
\subsection*{Supported Operating Systems}
\item {\bf cd} to the directory containing the source code.
\item ./configure (with appropriate options as described below)
\item Check the output of ./configure very carefully, especially the Install
- binaries and Install config files directories. If they are not correct,
+ binaries and Install config directories. If they are not correct,
please rerun ./configure until they are. The output from ./configure is
stored in {\bf config.out} and can be re-displayed at any time without
rerunning the ./configure by doing {\bf cat config.out}.
so that you are sure to start from scratch and not have a mixture of the two
options. This is because ./configure caches much of the information. The {\bf
-make distclean} is also critical if you move the source file from one
+make distclean} is also critical if you move the source directory from one
machine to another. If the {\bf make distclean} fails, just ignore it and
continue on.
\item make
If you get errors while linking in the Storage daemon directory (src/stored),
it is probably because you have not loaded the static libraries on your
system. I noticed this problem on a Solaris system. To correct it, make sure
-that you have not added {\bf \verb{--{enable-static-tools} to the {\bf ./configure}
+that you have not added {\bf \verb:--:enable-static-tools} to the {\bf ./configure}
command.
\item make install
\item If you are new to Bacula, we {\bf strongly} recommend that you skip the
heavy modifications to the configuration files so that you are sure that
Bacula works and are familiar with it. After that changing the conf files
will be easier.
-\item If after installing Bacula, you decide to ``move it'', that is to
+\item If after installing Bacula, you decide to "move it", that is to
install it in a different set of directories, proceed as follows:
\footnotesize
If you install Bacula on more than one system, and they are identical, you can
-simply transfer the source tree to that other system and do a ``make
-install''. However, if there are differences in the libraries or OS versions,
+simply transfer the source tree to that other system and do a "make
+install". However, if there are differences in the libraries or OS versions,
or you wish to install on a different OS, you should start from the original
compress tar file. If you do transfer the source tree, and you have previously
done a ./configure command, you MUST do:
prior to doing your new ./configure. This is because the GNU autoconf tools
cache the configuration, and if you re-use a configuration for a Linux machine
on a Solaris, you can be sure your build will fail. To avoid this, as
-mentioned above, either start from the tar file, or do a ``make distclean''.
+mentioned above, either start from the tar file, or do a "make distclean".
In general, you will probably want to supply a more complicated {\bf
configure} statement to ensure that the modules you want are built and that
would normally use, and each developer/user may modify them to suit his needs.
You should find additional useful examples in this directory as well.
-The {\bf \verb{--{enable-conio} or {\bf \verb{--{enable-readline} options are useful because
+The {\bf \verb:--:enable-conio} or {\bf \verb:--:enable-readline} options are useful because
they provide a command line history and editing capability for the Console
program. If you have included either option in the build, either the {\bf
termcap} or the {\bf ncurses} package will be needed to link. On some systems,
On some systems such as Mandriva, readline tends to
gobble up prompts, which makes it totally useless. If this happens to you, use
the disable option, or if you are using version 1.33 and above try using {\bf
-\verb{--{enable-conio} to use a built-in readline replacement. You will still need
+\verb:--:enable-conio} to use a built-in readline replacement. You will still need
either the termcap or the ncurses library, but it is unlikely that the {\bf conio}
package will gobble up prompts.
\addcontentsline{toc}{subsection}{What Database to Use?}
Before building Bacula you need to decide if you want to use SQLite, MySQL, or
-PostgreSQL. If you are not already running MySQL or PostgreSQL, we recommend
-that you start by using SQLite. This will greatly simplify the setup for you
+PostgreSQL. If you are not already running MySQL or PostgreSQL, you might
+want to start by testing with SQLite. This will greatly simplify the setup for you
because SQLite is compiled into Bacula an requires no administration. It
performs well and is suitable for small to medium sized installations (maximum
-10-20 machines).
+10-20 machines). However, we should note that a number of users have
+had unexplained database corruption with SQLite. For that reason, we
+recommend that you install either MySQL or PostgreSQL for production
+work.
If you wish to use MySQL as the Bacula catalog, please see the
\ilink{Installing and Configuring MySQL}{_ChapterStart} chapter of
continuing with the configuration of Bacula. PostgreSQL is very similar to
MySQL, though it tends to be slightly more SQL92 compliant and has many more
advanced features such as transactions, stored procedures, and the such. It
-requires a certain knowledge to install and maintain. There are some important
-performance problems with PostgreSQL in Bacula versions prior to 1.35.5.
+requires a certain knowledge to install and maintain.
If you wish to use SQLite as the Bacula catalog, please see
\ilink{Installing and Configuring SQLite}{_ChapterStart33} chapter of
There are a number of options and important considerations given below
that you can skip for the moment if you have not had any problems building
Bacula with a simplified configuration as shown above.
+
+If the ./configure process is unable to find specific libraries (e.g.
+libintl, you should ensure that the appropriate package is installed on
+your system. Alternatively, if the package is installed in a non-standard
+location (as far as Bacula is concerned), then there is generally an
+option listed below (or listed with "./configure {-}{-}help" that will
+permit you to specify the directory that should be searched. In other
+cases, there are options that will permit you to disable to feature
+(e.g. {-}{-}disable-nls).
If you want to dive right into it, we recommend you skip to the next chapter,
and run the example program. It will teach you a lot about Bacula and as an
\begin{description}
\item [ {-}{-}sysbindir=\lt{}binary-path\gt{}]
- \index[dir]{{-}{-}sysbindir }
+ \index[general]{{-}{-}sysbindir }
Defines where the Bacula binary (executable) files will be placed during a
{\bf make install} command.
\item [ {-}{-}sysconfdir=\lt{}config-path\gt{}]
- \index[dir]{{-}{-}sysconfdir }
- Defines where the Bacula configuration files should be placed during a {\bf
- make install} command.
+ \index[general]{{-}{-}sysconfdir }
+ Defines where the Bacula configuration files should be placed during a
+ {\bf make install} command.
+
+\item [ {-}{-}mandir=\lt{}path\gt{}]
+ \index[general]{{-}{-}mandir}
+ By default, Bacula will install a simple Unix man page in
+ /usr/share/man. If you wish the man page to be installed in
+ a different location, use this option to specify the path.
+ Note, the main HTML and PDF Bacula documents are in a separate
+ tar file that is not part of the source distribution.
+
+\item [ {-}{-}datadir=\lt{}path\gt{}]
+ \index[general]{{-}{-}datadir}
+ If you translate Bacula or parts of Bacula into a different language
+ you may specify the location of the po files using the {\bf
+ {-}{-}datadir} option. You must manually install any po files as
+ Bacula does not (yet) automatically do so.
+
\item [ {-}{-}enable-smartalloc ]
- \index[dir]{{-}{-}enable-smartalloc }
- This enables the inclusion of the Smartalloc orphaned buffer detection code.
- This option is highly recommended. Because we never build without this
- option, you may experience problems if it is not enabled. In this case,
- simply re-enable the option. We strongly recommend keeping this option
- enabled as it helps detect memory leaks. This configuration parameter is used
- while building Bacula
+ \index[general]{{-}{-}enable-smartalloc }
+ This enables the inclusion of the Smartalloc orphaned buffer detection
+ code. This option is highly recommended. Because we never build
+ without this option, you may experience problems if it is not enabled.
+ In this case, simply re-enable the option. We strongly recommend
+ keeping this option enabled as it helps detect memory leaks. This
+ configuration parameter is used while building Bacula
\item [ {-}{-}enable-gnome ]
- \index[dir]{{-}{-}enable-gnome }
- If you have GNOME installed on your computer and you want to use the GNOME
- GUI Console interface to Bacula, you must specify this option. Doing so will
- build everything in the {\bf src/gnome-console} directory.
+ \index[general]{{-}{-}enable-gnome }
+ If you have GNOME installed on your computer and you want to use the
+ GNOME GUI Console interface to Bacula, you must specify this option.
+ Doing so will build everything in the {\bf src/gnome-console} directory.
\item [ {-}{-}enable-wx-console ]
- \index[console]{{-}{-}enable-wx-console }
- If you have wxWidgets installed on your computer and you want to use the
- wxWidgets GUI Console interface to Bacula, you must specify this option.
- Doing so will build everything in the {\bf src/wx-console} directory. This
- could also be useful to users who want a GUI Console and don't want to
- install Gnome, as wxWidgets can work with GTK+, Motif or even X11 libraries.
+ \index[general]{{-}{-}enable-wx-console }
+ If you have wxWidgets installed on your computer and you want to use the
+ wxWidgets GUI Console interface to Bacula, you must specify this option.
+ Doing so will build everything in the {\bf src/wx-console} directory.
+ This could also be useful to users who want a GUI Console and don't want
+ to install Gnome, as wxWidgets can work with GTK+, Motif or even X11
+ libraries.
\item [ {-}{-}enable-tray-monitor ]
- \index[dir]{{-}{-}enable-tray-monitor }
- If you have GTK installed on your computer, you run a graphical environment
- or a window manager compatible with the FreeDesktop system tray standard
- (like KDE and GNOME) and you want to use a GUI to monitor Bacula daemons, you
- must specify this option. Doing so will build everything in the {\bf
- src/tray-monitor} directory.
+ \index[general]{{-}{-}enable-tray-monitor }
+ If you have GTK installed on your computer, you run a graphical
+ environment or a window manager compatible with the FreeDesktop system
+ tray standard (like KDE and GNOME) and you want to use a GUI to monitor
+ Bacula daemons, you must specify this option. Doing so will build
+ everything in the {\bf src/tray-monitor} directory.
\item [ {-}{-}enable-static-tools]
- \index[dir]{{-}{-}enable-static-tools }
- This option causes the linker to link the Storage daemon utility tools ({\bf
- bls}, {\bf bextract}, and {\bf bscan}) statically. This permits using them
- without having the shared libraries loaded. If you have problems linking in
- the {\bf src/stored} directory, make sure you have not enabled this option,
- or explicitly disable static linking by adding {\bf \verb{--{disable-static-tools}.
+ \index[general]{{-}{-}enable-static-tools }
+ This option causes the linker to link the Storage daemon utility tools
+ ({\bf bls}, {\bf bextract}, and {\bf bscan}) statically. This permits
+ using them without having the shared libraries loaded. If you have
+ problems linking in the {\bf src/stored} directory, make sure you have
+ not enabled this option, or explicitly disable static linking by adding
+ {\bf \verb:--:disable-static-tools}.
\item [ {-}{-}enable-static-fd]
- \index[fd]{{-}{-}enable-static-fd }
- This option causes the make process to build a {\bf static-bacula-fd} in
- addition to the standard File daemon. This static version will include
- statically linked libraries and is required for the Bare Metal recovery. This
- option is largely superseded by using {\bf make static-bacula-fd} from with
- in the {\bf src/filed} directory. Also, the {\bf \verb{--{enable-client-only} option
- described below is useful for just building a client so that all the other
- parts of the program are not compiled.
+ \index[general]{{-}{-}enable-static-fd }
+ This option causes the make process to build a {\bf static-bacula-fd} in
+ addition to the standard File daemon. This static version will include
+ statically linked libraries and is required for the Bare Metal recovery.
+ This option is largely superseded by using {\bf make static-bacula-fd}
+ from with in the {\bf src/filed} directory. Also, the {\bf
+ \verb:--:enable-client-only} option described below is useful for just
+ building a client so that all the other parts of the program are not
+ compiled.
\item [ {-}{-}enable-static-sd]
- \index[sd]{{-}{-}enable-static-sd }
- This option causes the make process to build a {\bf static-bacula-sd} in
- addition to the standard Storage daemon. This static version will include
- statically linked libraries and could be useful during a Bare Metal recovery.
+ \index[general]{{-}{-}enable-static-sd }
+ This option causes the make process to build a {\bf static-bacula-sd} in
+ addition to the standard Storage daemon. This static version will
+ include statically linked libraries and could be useful during a Bare
+ Metal recovery.
\item [ {-}{-}enable-static-dir]
- \index[dir]{{-}{-}enable-static-dir }
+ \index[general]{{-}{-}enable-static-dir }
This option causes the make process to build a {\bf static-bacula-dir} in
addition to the standard Director. This static version will include
statically linked libraries and could be useful during a Bare Metal recovery.
\item [ {-}{-}enable-static-cons]
- \index[dir]{{-}{-}enable-static-cons }
+ \index[general]{{-}{-}enable-static-cons }
This option causes the make process to build a {\bf static-console} and a
{\bf static-gnome-console} in addition to the standard console. This static
version will include statically linked libraries and could be useful during a
Bare Metal recovery.
\item [ {-}{-}enable-client-only]
- \index[console]{{-}{-}enable-client-only }
+ \index[general]{{-}{-}enable-client-only }
This option causes the make process to build only the File daemon and the
libraries that it needs. None of the other daemons, storage tools, nor the
console will be built. Likewise a {\bf make install} will then only install
Client on a client only machine.
\item [ {-}{-}enable-largefile]
- \index[console]{{-}{-}enable-largefile }
+ \index[general]{{-}{-}enable-largefile }
This option (default) causes Bacula to be built with 64 bit file address
support if it is available on your system. This permits Bacula to read and
write files greater than 2 GBytes in size. You may disable this feature and
- revert to 32 bit file addresses by using {\bf \verb{--{disable-largefile}.
+ revert to 32 bit file addresses by using {\bf \verb:--:disable-largefile}.
+
+\item [ {-}{-}disable-nls]
+ \index[general]{{-}{-}disable-nls}
+ By default, Bacula uses the GNU Native Language Support (NLS) libraries. On
+ some machines, these libraries may not be present or may not function
+ correctly (especially on non-Linux implementations). In such cases, you
+ may specify {\bf {-}{-}disable-nls} to disable use of those libraries.
+ In such a case, Bacula will revert to using English.
\item [ {-}{-}with-sqlite=\lt{}sqlite-path\gt{}]
- \index[fd]{{-}{-}with-sqlite }
- This enables use of the SQLite database. The {\bf sqlite-path} is not
+ \index[general]{{-}{-}with-sqlite }
+ This enables use of the SQLite version 2.8.x database. The {\bf sqlite-path} is not
normally specified as Bacula looks for the necessary components in a
standard location ({\bf depkgs/sqlite}). See
\ilink{Installing and Configuring SQLite}{_ChapterStart33} chapter of
this manual for more details.
+\item [ {-}{-}with-sqlite3=\lt{}sqlite3-path\gt{}]
+ \index[general]{{-}{-}with-sqlite3 }
+ This enables use of the SQLite version 3.x database. The {\bf sqlite3-path} is not
+ normally specified as Bacula looks for the necessary components in a
+ standard location ({\bf depkgs/sqlite3}). Although Bacula will run
+ with SQLite version 3.x, our testing shows that it is 4 to 10 times
+ slower than version 2.8.x and consequently, we do not recommend using
+ it. See
+ \ilink{Installing and Configuring SQLite}{_ChapterStart33} chapter of
+ this manual for more details.
+
\item [ {-}{-}with-mysql=\lt{}mysql-path\gt{}]
- \index[fd]{{-}{-}with-mysql }
+ \index[general]{{-}{-}with-mysql }
This enables building of the Catalog services for Bacula. It assumes that
MySQL is running on your system, and expects it to be installed in the {\bf
mysql-path} that you specify. If this option is not present, the build will
you use this option if possible. If you do use this option, please proceed to
installing MySQL in the
\ilink{Installing and Configuring MySQL}{_ChapterStart} chapter
- before proceeding with the configuration.
+ before proceeding with the configuration.
+
+\item [ {-}{-}with-openssl=\lt{}path\gt{}]
+ This configuration option is necessary if you want to enable TLS (ssl)
+ in Bacula. Normally, the {\bf path} specification is not necessary since
+ the configuration searches for the OpenSSL libraries in standard system
+ locations. Enabling OpenSSL in Bacula permits secure communications
+ between the daemons. For more information on using TLS, please see the
+ \ilink{Bacula TLS}{_ChapterStart61} chapter of this manual.
\item [ {-}{-}with-postgresql=\lt{}path\gt{}]
- \index[fd]{{-}{-}with-postgresql }
+ \index[general]{{-}{-}with-postgresql }
This provides an explicit path to the PostgreSQL libraries if Bacula cannot
find it by default.
+\item [ {-}{-}with-python=\lt{}path\gt{}]
+ \index[general]{{-}{-}with-python }
+ This option enables Bacula support for Python. If no path is
+ supplied, configure will search the
+ standard library locations for Python 2.2, 2.3, or 2.4. If it cannot
+ find the library, you will need to supply a path to your Python
+ library directory. Please see the
+ \ilink{Python chapter}{_ChapterStart60} for the details of using
+ Python scripting.
+
+\item [ {-}{-}with-libintl-prefix=\lt{}DIR\gt{}]
+ \index[general]{{-}{-}with-libintl-prefix}
+ This option may be used to tell Bacula to search DIR/include and
+ DIR/lib for the libintl headers and libraries needed for Native
+ Language Support (NLS).
+
\item [ {-}{-}enable-conio]
- \index[fd]{{-}{-}enable-conio }
+ \index[general]{{-}{-}enable-conio }
Tells Bacula to enable building the small, light weight readline replacement
routine. It is generally much easier to configure than readline, although,
like readline, it needs either the termcap or ncurses library.
\item [ {-}{-}with-readline=\lt{}readline-path\gt{}]
- \index[fd]{{-}{-}with-readline }
+ \index[general]{{-}{-}with-readline }
Tells Bacula where {\bf readline} is installed. Normally, Bacula will find
readline if it is in a standard library. If it is not found and no
- \verb{--{with-readline is specified, readline will be disabled. This option affects
+ \verb:--:with-readline is specified, readline will be disabled. This option affects
the Bacula build. Readline provides the Console program with a command line
history and editing capability and is no longer supported, so you are on your
own if you have problems.
\item [ {-}{-}enable-readline]
- \index[fd]{{-}{-}enable-readline }
+ \index[general]{{-}{-}enable-readline }
Tells Bacula to enable readline support. It is normally disabled due to the
large number of configuration problems and the fact that the package seems to
change in incompatible ways from version to version.
\item [ {-}{-}with-tcp-wrappers=\lt{}path\gt{}]
- \index[fd]{{-}{-}with-tcp-wrappers }
+ \index[general]{{-}{-}with-tcp-wrappers }
This specifies that you want TCP wrappers (man hosts\_access(5)) compiled in.
The path is optional since Bacula will normally find the libraries in the
standard locations. This option affects the Bacula build. In specifying your
restrictions in the {\bf /etc/hosts.allow} or {\bf /etc/hosts.deny} files, do
not use the {\bf twist} option (hosts\_options(5)) or the Bacula process will
- be terminated.
+ be terminated. Note, when setting up your {\bf /etc/hosts.allow}
+ or {\bf /etc/hosts.deny}, you must identify the Bacula daemon in
+ question with the name you give it in your conf file rather than the
+ name of the executable.
For more information on configuring and testing TCP wrappers, please see the
\ilink{Configuring and Testing TCP Wrappers}{wrappers} section
in the Security Chapter.
\item [ {-}{-}with-working-dir=\lt{}working-directory-path\gt{} ]
- \index[dir]{{-}{-}with-working-dir }
+ \index[general]{{-}{-}with-working-dir }
This option is mandatory and specifies a directory into which Bacula may
safely place files that will remain between Bacula executions. For example,
if the internal database is used, Bacula will keep those files in this
you must ensure that it exists before using Bacula for the first time.
\item [ {-}{-}with-base-port=\lt{}port=number\gt{}]
- \index[dir]{{-}{-}with-base-port }
+ \index[general]{{-}{-}with-base-port }
In order to run, Bacula needs three TCP/IP ports (one for the Bacula
Console, one for the Storage daemon, and one for the File daemon). The {\bf
- \verb{--{with-baseport} option will automatically assign three ports beginning at
+ \verb:--:with-baseport} option will automatically assign three ports beginning at
the base port address specified. You may also change the port number in the
resulting configuration files. However, you need to take care that the
numbers correspond correctly in each of the three daemon configuration
may also accomplish the same thing by directly editing them later.
\item [ {-}{-}with-dump-email=\lt{}email-address\gt{}]
- \index[dir]{{-}{-}with-dump-email }
+ \index[general]{{-}{-}with-dump-email }
This option specifies the email address where any core dumps should be set.
This option is normally only used by developers.
\item [ {-}{-}with-pid-dir=\lt{}PATH\gt{} ]
- \index[dir]{{-}{-}with-pid-dir }
+ \index[general]{{-}{-}with-pid-dir }
This specifies where Bacula should place the process id file during
execution. The default is: {\bf /var/run}. This directory is not created by
the install process, so you must ensure that it exists before using Bacula
the first time.
\item [ {-}{-}with-subsys-dir=\lt{}PATH\gt{}]
- \index[dir]{{-}{-}with-subsys-dir }
+ \index[general]{{-}{-}with-subsys-dir }
This specifies where Bacula should place the subsystem lock file during
execution. The default is {\bf /var/run/subsys}. Please make sure that you do
not specify the same directory for this directory and for the {\bf sbindir}
create it before using Bacula.
\item [ {-}{-}with-dir-password=\lt{}Password\gt{}]
- \index[dir]{{-}{-}with-dir-password }
+ \index[general]{{-}{-}with-dir-password }
This option allows you to specify the password used to access the Directory
(normally from the Console program). If it is not specified, configure will
automatically create a random password.
\item [ {-}{-}with-fd-password=\lt{}Password\gt{} ]
- \index[fd]{{-}{-}with-fd-password }
+ \index[general]{{-}{-}with-fd-password }
This option allows you to specify the password used to access the File daemon
(normally called from the Director). If it is not specified, configure will
automatically create a random password.
\item [ {-}{-}with-sd-password=\lt{}Password\gt{} ]
- \index[sd]{{-}{-}with-sd-password }
+ \index[general]{{-}{-}with-sd-password }
This option allows you to specify the password used to access the Directory
(normally called from the Director). If it is not specified, configure will
automatically create a random password.
\item [ {-}{-}with-dir-user=\lt{}User\gt{} ]
- \index[dir]{{-}{-}with-dir-user }
+ \index[general]{{-}{-}with-dir-user }
This option allows you to specify the Userid used to run the Director. The
Director must be started as root, but doesn't need to run as root, and after
- doing preliminary initializations, it can ``drop'' to the UserId specified on
+ doing preliminary initializations, it can "drop" to the UserId specified on
this option.
\item [ {-}{-}with-dir-group=\lt{}Group\gt{} ]
- \index[dir]{{-}{-}with-dir-group }
+ \index[general]{{-}{-}with-dir-group }
This option allows you to specify the GroupId used to run the Director. The
Director must be started as root, but doesn't need to run as root, and after
- doing preliminary initializations, it can ``drop'' to the GroupId specified
+ doing preliminary initializations, it can "drop" to the GroupId specified
on this option.
\item [ {-}{-}with-sd-user=\lt{}User\gt{} ]
- \index[sd]{{-}{-}with-sd-user }
+ \index[general]{{-}{-}with-sd-user }
This option allows you to specify the Userid used to run the Storage daemon.
The Storage daemon must be started as root, but doesn't need to run as root,
- and after doing preliminary initializations, it can ``drop'' to the UserId
+ and after doing preliminary initializations, it can "drop" to the UserId
specified on this option. If you use this option, you will need to take care
that the Storage daemon has access to all the devices (tape drives, ...) that
it needs.
\item [ {-}{-}with-sd-group=\lt{}Group\gt{} ]
- \index[sd]{{-}{-}with-sd-group }
+ \index[general]{{-}{-}with-sd-group }
This option allows you to specify the GroupId used to run the Storage daemon.
The Storage daemon must be started as root, but doesn't need to run as root,
- and after doing preliminary initializations, it can ``drop'' to the GroupId
+ and after doing preliminary initializations, it can "drop" to the GroupId
specified on this option.
\item [ {-}{-}with-fd-user=\lt{}User\gt{} ]
- \index[fd]{{-}{-}with-fd-user }
+ \index[general]{{-}{-}with-fd-user }
This option allows you to specify the Userid used to run the File daemon. The
File daemon must be started as root, and in most cases, it needs to run as
root, so this option is used only in very special cases, after doing
- preliminary initializations, it can ``drop'' to the UserId specified on this
+ preliminary initializations, it can "drop" to the UserId specified on this
option.
\item [ {-}{-}with-fd-group=\lt{}Group\gt{} ]
- \index[fd]{{-}{-}with-fd-group }
+ \index[general]{{-}{-}with-fd-group }
This option allows you to specify the GroupId used to run the File daemon.
The File daemon must be started as root, and in most cases, it must be run as
- root, however, after doing preliminary initializations, it can ``drop'' to
+ root, however, after doing preliminary initializations, it can "drop" to
the GroupId specified on this option.
\end{description}
-Note, many other options are presented when you do a {\bf ./configure \verb{--{help},
+Note, many other options are presented when you do a {\bf ./configure \verb:--:help},
but they are not implemented.
\subsection*{Recommended Options for most Systems}
If you want to install Bacula in an installation directory rather than run it
out of the build directory (as developers will do most of the time), you
-should also include the \verb{--{sbindir and \verb{--{sysconfdir options with appropriate
-paths. Neither are necessary if you do not use ``make install'' as is the case
+should also include the \verb:--:sbindir and \verb:--:sysconfdir options with appropriate
+paths. Neither are necessary if you do not use "make install" as is the case
for most development work. The install process will create the sbindir and
sysconfdir if they do not exist, but it will not automatically create the
pid-dir, subsys-dir, or working-dir, so you must ensure that they exist before
probably do it with VC Studio only. If you wish to build the Win32 File daemon
from the source, you will need Microsoft C++ version 6.0 or greater. In Bacula
prior to version 1.33, CYGWIN was used. Details for building it are in the
-README file of the src/win32 directory.
+README.win32 file of the src/win32 directory.
Note, although most parts of Bacula build on Windows systems, the only part
that we have tested and used is the File daemon.
\index[general]{Kern's Configure Script }
\addcontentsline{toc}{subsection}{Kern's Configure Script}
-The script that I use for building on my ``production'' Linux machines is:
+The script that I use for building on my "production" Linux machines is:
\footnotesize
\begin{verbatim}
because they have been officially assigned to Bacula by IANA (Internet
Assigned Numbers Authority). We strongly recommend that you use only these
ports to prevent any conflicts with other programs. This is in fact the
-default if you do not specify a {\bf \verb{--{with-baseport} option.
+default if you do not specify a {\bf \verb:--:with-baseport} option.
You may also want to put the following entries in your {\bf /etc/services}
file as it will make viewing the connections made by Bacula easier to
\normalsize
If you have previously installed Bacula, the old binaries will be overwritten,
-but the old configuration files will remain unchanged, and the ``new''
+but the old configuration files will remain unchanged, and the "new"
configuration files will be appended with a {\bf .new}. Generally if you have
previously installed and run Bacula you will want to discard or ignore the
configuration files with the appended {\bf .new}.
./configure}.
Since the File daemon does not access the Catalog database, you can remove the
-{\bf \verb{--{with-mysql} or {\bf \verb{--{with-sqlite} options, then add {\bf
-\verb{--{enable-client-only}. This will compile only the necessary libraries and the
+{\bf \verb:--:with-mysql} or {\bf \verb:--:with-sqlite} options, then add {\bf
+\verb:--:enable-client-only}. This will compile only the necessary libraries and the
client programs and thus avoids the necessity of installing one or another of
those database programs to build the File daemon. With the above option, you
simply enter {\bf make} and just the client will be built.
-\label{autostart}
+\label{autostart}
\subsection*{Auto Starting the Daemons}
\index[general]{Daemons!Auto Starting the }
\index[general]{Auto Starting the Daemons }
\normalsize
Please note, that the auto-start feature is implemented only on systems that
-we officially support (currently, FreeBSD, RedHat Linux, and Solaris), and has
-only been fully tested on RedHat Linux.
+we officially support (currently, FreeBSD, RedHat/Fedora Linux, and Solaris), and has
+only been fully tested on Fedora Linux.
The {\bf make install-autostart} will cause the appropriate startup scripts to
-be installed with the necessary symbolic links. On RedHat Linux systems, these
+be installed with the necessary symbolic links. On RedHat/Fedora Linux systems, these
scripts reside in {\bf /etc/rc.d/init.d/bacula-dir} {\bf
/etc/rc.d/init.d/bacula-fd}, and {\bf /etc/rc.d/init.d/bacula-sd}. However the
exact location depends on what operating system you are using.
fd
gnome-console
gnome-console.conf
-lymake_bacula_tables
+make_bacula_tables
make_catalog_backup
make_mysql_tables
mtx-changer
\addcontentsline{toc}{subsection}{Installing Tray Monitor}
The Tray Monitor is already installed if you used the {\bf
-\verb{--{enable-tray-monitor} configure option and ran {\bf make install}.
+\verb:--:enable-tray-monitor} configure option and ran {\bf make install}.
As you don't run your graphical environment as root (if you do, you should
change that bad habit), don't forget to allow your user to read {\bf
\index[general]{Testing The Traceback }
\addcontentsline{toc}{subsection}{Testing The Traceback}
-To ``manually'' test the traceback feature, you simply start {\bf Bacula} then
+To "manually" test the traceback feature, you simply start {\bf Bacula} then
obtain the {\bf PID} of the main daemon thread (there are multiple threads).
Unfortunately, the output had to be split to fit on this page:
The licenses for most software are designed to take away your freedom to share
and change it. By contrast, the GNU General Public Licenses are intended to
-guarantee your freedom to share and change free software\verb{--{to make sure the
+guarantee your freedom to share and change free software\verb:--:to make sure the
software is free for all its users.
This license, the Lesser General Public License, applies to some specially
-designated software packages\verb{--{typically libraries\verb{--{of the Free Software
+designated software packages\verb:--:typically libraries\verb:--:of the Free Software
Foundation and other authors who decide to use it. You can use it too, but we
suggest you first think carefully about whether this license or the ordinary
General Public License is the better strategy to use in any particular case,
criteria of freedom. The Lesser General Public License permits more lax
criteria for linking other code with the library.
-We call this license the ``Lesser'' General Public License because it does
+We call this license the "Lesser" General Public License because it does
Less to protect the user's freedom than the ordinary General Public License.
It also provides other free software developers Less of an advantage over
competing non-free programs. These disadvantages are the reason we use the
modified version of the Library.
The precise terms and conditions for copying, distribution and modification
-follow. Pay close attention to the difference between a ``work based on the
-library'' and a ``work that uses the library''. The former contains code
+follow. Pay close attention to the difference between a "work based on the
+library" and a "work that uses the library". The former contains code
derived from the library, whereas the latter must be combined with the library
in order to run.
{\bf 0.} This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or other
authorized party saying it may be distributed under the terms of this Lesser
-General Public License (also called ``this License''). Each licensee is
-addressed as ``you''.
+General Public License (also called "this License"). Each licensee is
+addressed as "you".
-A ``library'' means a collection of software functions and/or data prepared so
+A "library" means a collection of software functions and/or data prepared so
as to be conveniently linked with application programs (which use some of
those functions and data) to form executables.
-The ``Library'', below, refers to any such software library or work which has
-been distributed under these terms. A ``work based on the Library'' means
+The "Library", below, refers to any such software library or work which has
+been distributed under these terms. A "work based on the Library" means
either the Library or any derivative work under copyright law: that is to say,
a work containing the Library or a portion of it, either verbatim or with
modifications and/or translated straightforwardly into another language.
(Hereinafter, translation is included without limitation in the term
-``modification''.)
+"modification".)
-``Source code'' for a work means the preferred form of the work for making
+"Source code" for a work means the preferred form of the work for making
modifications to it. For a library, complete source code means all the source
code for all modules it contains, plus any associated interface definition
files, plus the scripts used to control compilation and installation of the
{\bf 5.} A program that contains no derivative of any portion of the Library,
but is designed to work with the Library by being compiled or linked with it,
-is called a ``work that uses the Library''. Such a work, in isolation, is not
+is called a "work that uses the Library". Such a work, in isolation, is not
a derivative work of the Library, and therefore falls outside the scope of
this License.
-However, linking a ``work that uses the Library'' with the Library creates an
+However, linking a "work that uses the Library" with the Library creates an
executable that is a derivative of the Library (because it contains portions
-of the Library), rather than a ``work that uses the library''. The executable
+of the Library), rather than a "work that uses the library". The executable
is therefore covered by this License. Section 6 states terms for distribution
of such executables.
-When a ``work that uses the Library'' uses material from a header file that is
+When a "work that uses the Library" uses material from a header file that is
part of the Library, the object code for the work may be a derivative work of
the Library even though the source code is not. Whether this is true is
especially significant if the work can be linked without the Library, or if
directly with the Library itself.
{\bf 6.} As an exception to the Sections above, you may also combine or link a
-``work that uses the Library'' with the Library to produce a work containing
+"work that uses the Library" with the Library to produce a work containing
portions of the Library, and distribute that work under terms of your choice,
provided that the terms permit modification of the work for the customer's own
use and reverse engineering for debugging such modifications.
machine-readable source code for the Library including whatever changes were
used in the work (which must be distributed under Sections 1 and 2 above);
and, if the work is an executable linked with the Library, with the complete
-machine-readable ``work that uses the Library'', as object code and/or source
+machine-readable "work that uses the Library", as object code and/or source
code, so that the user can modify the Library and then relink to produce a
modified executable containing the modified Library. (It is understood that
the user who changes the contents of definitions files in the Library will
materials or that you have already sent this user a copy.
\end{itemize}
-For an executable, the required form of the ``work that uses the Library''
+For an executable, the required form of the "work that uses the Library"
must include any data and utility programs needed for reproducing the
executable from it. However, as a special exception, the materials to be
distributed need not include anything that is normally distributed (in either
address new problems or concerns.
Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and ``any later
-version'', you have the option of following the terms and conditions either of
+specifies a version number of this License which applies to it and "any later
+version", you have the option of following the terms and conditions either of
that version or of any later version published by the Free Software
Foundation. If the Library does not specify a license version number, you may
choose any version ever published by the Free Software Foundation.
{\bf 15.} BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE
-THE LIBRARY ``AS IS'' WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR
+THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR
IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO
THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
-``copyright'' line and a pointer to where the full notice is found.
+"copyright" line and a pointer to where the full notice is found.
\footnotesize
\begin{verbatim}
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a ``copyright disclaimer'' for the library, if
+school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
\footnotesize
\begin{verbatim}
Yoyodyne, Inc., hereby disclaims all copyright interest in
-the library `Frob' (a library for tweaking knobs) written
+the library "Frob" (a library for tweaking knobs) written
by James Random Hacker.
{\it signature of Ty Coon}, 1 April 1990
Ty Coon, President of Vice
directory.
Most of this code is copyrighted: Copyright \copyright 2000-2004 Kern Sibbald and
-John Walker. or Copyright \copyright 2000-2005 Kern Sibbald
+John Walker or Copyright \copyright 2000-2005 Kern Sibbald.
Portions may be copyrighted by other people (ATT, the Free Software
Foundation, ...). Generally these portions are released under a
\index[general]{Public Domain }
\addcontentsline{toc}{subsection}{Public Domain}
-Some of the Bacula code has been released to the public domain. E.g. md5.c,
-SQLite.
+Some of the Bacula code, or code that Bacula references, has been released
+to the public domain. E.g. md5.c, SQLite.
\subsection*{Trademark}
\index[general]{Trademark }
Bacula\raisebox{.6ex}{\textsuperscript{\textregistered}}is a registered
trademark of Kern Sibbald and John Walker.
-We have trademarked the Bacula name to ensure that any variant of Bacula will
-be exactly compatible with the program that we have released. The use of the
-name Bacula is restricted to software systems that agree exactly with the
-program presented here.
+We have trademarked the Bacula name to ensure that any program using the
+name Bacula will be exactly compatible with the program that we have
+released. The use of the name Bacula is restricted to software systems
+that agree exactly with the program presented here.
\subsection*{Disclaimer}
\index[general]{Disclaimer }
BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE
PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE
STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE
-PROGRAM ``AS IS'' WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
+PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE,
In the absence of this resource, Bacula will send all mail using the
following command:
-{\bf mail -s ``Bacula Message'' \lt{}recipients\gt{}}
+{\bf mail -s "Bacula Message" \lt{}recipients\gt{}}
In many cases, depending on your machine, this command may not work. Using
the {\bf MailCommand}, you can specify exactly how to send the mail. During
appear on a single line in the configuration file rather than split as is
done here for presentation:
-{\bf mailcommand = ``/home/kern/bacula/bin/bsmtp -h mail.whitehouse.com -f
-\textbackslash{}''\textbackslash{}(Bacula\textbackslash{})
-\%r\textbackslash{}`` -s \textbackslash{}''Bacula: \%t \%e of \%c
-\%l\textbackslash{}`` \%r'' }
+{\bf mailcommand = "/home/kern/bacula/bin/bsmtp -h mail.example.com -f
+\textbackslash{}"\textbackslash{}(Bacula\textbackslash{})
+\%r\textbackslash{}" -s \textbackslash{}"Bacula: \%t \%e of \%c
+\%l\textbackslash{}" \%r" }
Note, the {\bf bsmtp} program is provided as part of {\bf Bacula}. For
additional details, please see the
requested not to use this record since it will be deprecated.
\item [\lt{}destination\gt{} = \lt{}message-type1\gt{},
- \lt{}message-type2\>, ...]
+ \lt{}message-type2\gt{}, ...]
\index[fd]{\lt{}destination\gt{} }
Where {\bf destination} may be one of the following:
\end{description}
\item {\bf \lt{}destination\gt{} = \lt{}address\gt{} =
- \lt{}message-type1\gt{}, \lt{}message-type2\>, ...}
+ \lt{}message-type1\gt{}, \lt{}message-type2\gt{}, ...}
\index[console]{\lt{}destination\gt{} }
Where {\bf address} depends on the {\bf destination}, which may be one of the
\begin{verbatim}
Messages {
Name = Standard
- mailcommand = "bacula/bin/bsmtp -h mail.whitehouse.com \
+ mailcommand = "bacula/bin/bsmtp -h mail.example.com \
-f \"\(Bacula\) %r\" -s \"Bacula: %t %e of %c %l\" %r"
- operatorcommand = "bacula/bin/bsmtp -h mail.whitehouse.com \
+ operatorcommand = "bacula/bin/bsmtp -h mail.example.com \
-f \"\(Bacula\) %r\" -s \"Bacula: Intervention needed \
for %j\" %r"
- MailOnError = security@whitehouse.com = all, !skipped, \
+ MailOnError = security@example.com = all, !skipped, \
!terminate
append = "bacula/bin/log" = all, !skipped, !terminate
- operator = security@whitehouse.com = mount
+ operator = security@example.com = mount
console = all, !skipped, !saved
}
\end{verbatim}
%%
\section*{Monitor Configuration}
-\label{_ChapterStart35}
+\label{_MonitorChapter}
\index[general]{Monitor Configuration }
\index[general]{Configuration!Monitor }
\addcontentsline{toc}{section}{Monitor Configuration}
\index[fd]{DIRPort }
Specify the port to use to connect to the Director. This value will most
likely already be set to the value you specified on the {\bf
-\verb{--{with-base-port} option of the {\bf ./configure} command. This port must be
+\verb:--:with-base-port} option of the {\bf ./configure} command. This port must be
identical to the {\bf DIRport} specified in the {\bf Director} resource of
the
\ilink{Director's configuration}{_ChapterStart40} file. The
\index[general]{Phase I!Installing and Configuring MySQL -- }
\addcontentsline{toc}{subsection}{Installing and Configuring MySQL -- Phase I}
-If you use the ./configure \verb{--{with-mysql=mysql-directory statement for
-configuring {\bf Bacula}, you will need MySQL version 3.23.33 or later
-installed in the {\bf mysql-directory} (we are currently using 3.23.56). If
-MySQL is installed in the standard system location, you need only enter {\bf
-\verb{--{with-mysql} since the configure program will search all the standard
-locations. If you install MySQL in your home directory or some other
-non-standard directory, you will need to provide the full path to it.
+If you use the ./configure \verb:--:with-mysql=mysql-directory statement for
+configuring {\bf Bacula}, you will need MySQL version 3.23.53 or later
+installed in the {\bf mysql-directory}.
+Bacula has been tested on MySQL version 4.1.12 and works providing
+you are running it in the default installation that is compatible
+with MySQL 3.23.x. If you are using one of the new modes such
+as ANSI/ISO compatibility, you may experience problems.
+
+If MySQL is installed in the standard system location, you need only enter
+{\bf \verb:--:with-mysql} since the configure program will search all the
+standard locations. If you install MySQL in your home directory or some
+other non-standard directory, you will need to provide the full path to it.
Installing and Configuring MySQL is not difficult but can be confusing the
first time. As a consequence, below, we list the steps that we used to install
any user passwords. This may be an undesirable situation if you have other
users on your system.
-Please note that as of Bacula version 1.31, the thread safe version of the
+Beginning with Bacula version 1.31, the thread safe version of the
MySQL client library is used, and hence you must add the {\bf
-\verb{--{enable-thread-safe-client} option to the {\bf ./configure} as shown below:
+\verb:--:enable-thread-safe-client} option to the {\bf ./configure} as shown below:
\begin{enumerate}
\item Download MySQL source code from
\item cd {\bf mysql-source-directory}
where you replace {\bf mysql-source-directory} with the directory name where
-you put the MySQL source code.
+ you put the MySQL source code.
-\item ./configure \verb{--{enable-thread-safe-client \verb{--{prefix=mysql-directory
+\item ./configure \verb:--:enable-thread-safe-client \verb:--:prefix=mysql-directory
where you replace {\bf mysql-directory} with the directory name where you
-want to install mysql. Normally for system wide use this is /usr/local/mysql.
-In my case, I use \~{}kern/mysql.
+ want to install mysql. Normally for system wide use this is /usr/local/mysql.
+ In my case, I use \~{}kern/mysql.
\item make
\item make install
This will put all the necessary binaries, libraries and support files into
-the {\bf mysql-directory} that you specified above.
+ the {\bf mysql-directory} that you specified above.
\item ./scripts/mysql\_install\_db
complete the installation. Please note, the installation files used in the
second phase of the MySQL installation are created during the Bacula
Installation.
-\label{mysql_phase2}
+\label{mysql_phase2}
\subsection*{Installing and Configuring MySQL -- Phase II}
\index[general]{Installing and Configuring MySQL -- Phase II }
\index[general]{Phase II!Installing and Configuring MySQL -- }
Bacula}. If not, please complete these items before proceeding.
Please note that the {\bf ./configure} used to build {\bf Bacula} will need to
-include {\bf \verb{--{with-mysql=mysql-directory}, where {\bf mysql-directory} is the
+include {\bf \verb:--:with-mysql=mysql-directory}, where {\bf mysql-directory} is the
directory name that you specified on the ./configure command for configuring
MySQL. This is needed so that Bacula can find the necessary include headers
and library files for interfacing to MySQL.
\begin{enumerate}
\item Start {\bf mysql}. You might want to use the {\bf startmysql} script
provided in the Bacula release.
-\item cd \lt{}install-directory\gt{}
+\item cd \lt{}install-directory\gt{}
This directory contains the Bacula catalog interface routines.
\item ./grant\_mysql\_privileges
-
- This script creates unrestricted access rights for {\bf kern}, {\bf kelvin},
-and {\bf bacula}. You may want to modify it to suit your situation. Please
-note that none of these userids, including root, are password protected.
+ This script creates unrestricted access rights for the user {\bf bacula}.
+ You may want to modify it to suit your situation. Please
+ note that none of the userids, including root, are password protected.
+ If you need more security, please assign a password to the root user
+ and to bacula. The program {\bf mysqladmin} can be used for this.
\item ./create\_mysql\_database
-
- This script creates the MySQL {\bf bacula} database. The databases you create
-as well as the access databases will be located in \lt{}install-dir\gt{}/var/
-in a subdirectory with the name of the database, where \lt{}install-dir\gt{}
-is the directory name that you specified on the {\bf \verb{--{prefix} option. This
-can be important to know if you want to make a special backup of the Bacula
-database or to check its size.
+ This script creates the MySQL {\bf bacula} database. The databases you
+ create as well as the access databases will be located in
+ \lt{}install-dir\gt{}/var/ in a subdirectory with the name of the
+ database, where \lt{}install-dir\gt{} is the directory name that you
+ specified on the {\bf \verb:--:prefix} option. This can be important to
+ know if you want to make a special backup of the Bacula database or to
+ check its size.
\item ./make\_mysql\_tables
-
This script creates the MySQL tables used by {\bf Bacula}.
\end{enumerate}
After configuring Bacula with
-./configure \verb{--{enable-thread-safe-client \verb{--{prefix=\lt{}mysql-directory\gt{}
+./configure \verb:--:enable-thread-safe-client \verb:--:prefix=\lt{}mysql-directory\gt{}
where \lt{}mysql-directory\gt{} is in my case {\bf /home/kern/mysql}, you may
have to configure the loader so that it can find the MySQL shared libraries.
If you have previously followed this procedure and later add the {\bf
-\verb{--{enable-thread-safe-client} options, you will need to rerun the {\bf
+\verb:--:enable-thread-safe-client} options, you will need to rerun the {\bf
ldconfig} program shown below. If you put MySQL in a standard place such as
{\bf /usr/lib} or {\bf /usr/local/lib} this will not be necessary, but in my
case it is. The description that follows is Linux specific. For other
<your-options>
\end{verbatim}
\normalsize
+
+\subsection*{Upgrading MySQL}
+\index[general]{Upgrading MySQL }
+\index[general]{Upgrading!MySQL }
+\addcontentsline{toc}{subsection}{Upgrading MySQL}
+If you upgrade MySQL, you must reconfigure, rebuild, and re-install
+Bacula otherwise you are likely to get bizarre failures. If you
+install from rpms and you upgrade MySQL, you must also rebuild Bacula.
+You can do so by rebuilding from the source rpm. To do so, you may need
+to modify the bacula.spec file to account for the new MySQL version.
This will not be the case if you are invoking a script as in the second
example below. Also, you must take care to escape wild-cards and ensure that
any spaces in your command are escaped as well. If you use a single quotes
-(') within a double quote (``), Bacula will treat everything between the
+(') within a double quote ("), Bacula will treat everything between the
single quotes as one field so it will not be necessary to escape the spaces.
In general, getting all the quotes and escapes correct is a real pain as you
can see by the next example. As a consequence, it is often easier to put
will produce a list of all the local partitions on a RedHat Linux system.
Note, the above line was split, but should normally be written on one line.
Quoting is a real problem because you must quote for Bacula which consists of
-preceding every \textbackslash{} and every '' with a \textbackslash{}, and
+preceding every \textbackslash{} and every " with a \textbackslash{}, and
you must also quote for the shell command. In the end, it is probably easier
just to execute a small file with:
after one minute of waiting, it will go on to the next file. The data read
can be anything since Bacula treats it as a stream.
-This feature can be an excellent way to do a ``hot'' backup of a very large
+This feature can be an excellent way to do a "hot" backup of a very large
database. You can use the {\bf RunBeforeJob} to create the fifo and to start
a program that dynamically reads your database and writes it to the fifo.
Bacula will then write it to the Volume.
\item To exclude a directory, you must not have a trailing slash on the
directory name.
\item If you have spaces in your filename, you must enclose the entire name
-in double-quote characters (``). Trying to use a backslash before the space
+in double-quote characters ("). Trying to use a backslash before the space
will not work.
\item You must not precede the excluded file or directory with a drive letter
(such as {\bf c:}) otherwise it will not work.
specified in Unix convention (i.e. forward slash (/)). If you wish to include
a quote in a file name, precede the quote with a backslash
(\textbackslash{}\textbackslash{}). For example you might use the following
-for a Windows machine to backup the ''My Documents`` directory:
+for a Windows machine to backup the "My Documents" directory:
\footnotesize
\begin{verbatim}
%%
%%
-\section*{Using Pools to Manage Volumes}
+\section*{Automated Disk Backup}
\label{_ChapterStart11}
\index[general]{Volumes!Using Pools to Manage }
+\index[general]{Disk!Automated Backup}
\index[general]{Using Pools to Manage Volumes }
+\index[general]{Automated Disk Backup}
\addcontentsline{toc}{section}{Using Pools to Manage Volumes}
+\addcontentsline{toc}{section}{Automated Disk Backup}
If you manage 5 or 10 machines and have a nice tape backup, you don't need
Pools, and you may wonder what they are good for. In this chapter, you will
The rest of this chapter will give an example involving backup to disk
Volumes, but most of the information applies equally well to tape Volumes.
-\label{TheProblem}
+\label{TheProblem}
\subsection*{The Problem}
\index[general]{Problem }
\addcontentsline{toc}{subsection}{Problem}
}
\end{verbatim}
\normalsize
-
\addcontentsline{toc}{subsection}{Installing and Configuring PostgreSQL --
Phase I}
-If you use the {\bf ./configure \verb{--{with-postgresql=PostgreSQL-Directory}
+If you use the {\bf ./configure \verb:--:with-postgresql=PostgreSQL-Directory}
statement for configuring {\bf Bacula}, you will need PostgreSQL version 7.3
or later installed. NOTE! PostgreSQL versions earlier than 7.3 do not work
with Bacula. If PostgreSQL is installed in the standard system location, you
-need only enter {\bf \verb{--{with-postgresql} since the configure program will
+need only enter {\bf \verb:--:with-postgresql} since the configure program will
search all the standard locations. If you install PostgreSQL in your home
directory or some other non-standard directory, you will need to provide the
-full path with the {\bf \verb{--{with-postgresql} option.
+full path with the {\bf \verb:--:with-postgresql} option.
Installing and configuring PostgreSQL is not difficult but can be confusing
the first time. If you prefer, you may want to use a package provided by your
Bacula}. If not, please complete these items before proceeding.
Please note that the {\bf ./configure} used to build {\bf Bacula} will need to
-include {\bf \verb{--{with-postgresql=PostgreSQL-directory}, where {\bf
+include {\bf \verb:--:with-postgresql=PostgreSQL-directory}, where {\bf
PostgreSQL-directory} is the directory name that you specified on the
./configure command for configuring PostgreSQL (if you didn't specify a
directory or PostgreSQL is installed in a default location, you do not need to
\item At this point, start up Bacula, verify your volume library and perform
a test backup to make sure everything is working properly.
- \end{enumerate}
+\end{enumerate}
+
+\subsection*{Upgrading PostgreSQL}
+\index[general]{Upgrading PostgreSQL }
+\index[general]{Upgrading!PostgreSQL }
+\addcontentsline{toc}{subsection}{Upgrading PostgreSQL}
+If you upgrade PostgreSQL, you must reconfigure, rebuild, and re-install
+Bacula otherwise you are likely to get bizarre failures. If you
+to modify the bacula.spec file to account for the new PostgreSQL version.
+You can do so by rebuilding from the source rpm. To do so, you may need
+install from rpms and you upgrade PostgreSQL, you must also rebuild Bacula.
+
\subsection*{Credits}
\index[general]{Credits }
\addcontentsline{toc}{subsection}{Credits}
-
Many thanks to Dan Langille for writing the PostgreSQL driver. This will
surely become the most popular database that Bacula supports.
bacula-sd.conf} in the current directory, but you may specify a different
configuration file using the {\bf -c} option.
+
\subsection*{Specifying a Device Name For a Tape}
\index[general]{Tape!Specifying a Device Name For a }
\index[general]{Specifying a Device Name For a Tape }
work, it must find the identical name in the Device resource of the
configuration file. See below for specifying Volume names.
+Please note that if you have Bacula running and you ant to use
+one of these programs, you will either need to stop the Storage daemon, or
+{\bf unmount} any tape drive you want to use, otherwise the drive
+will {\bf busy} because Bacula is using it.
+
+
\subsection*{Specifying a Device Name For a File}
\index[general]{File!Specifying a Device Name For a }
\index[general]{Specifying a Device Name For a File }
\footnotesize
\begin{verbatim}
-Usage: bls [-d debug_level] <device-name>
+Usage: bls [options] <device-name>
-b <file> specify a bootstrap file
- -c <file> specify a configuration file
- -d <level> specify a debug level
+ -c <file> specify a config file
+ -d <level> specify debug level
-e <file> exclude list
-i <file> include list
-j list jobs
-k list blocks
- -L list tape label
- (none of above) list saved files
- -p proceed inspite of I/O errors
- -t use default tape device
+ (no j or k option) list saved files
+ -L dump label
+ -p proceed inspite of errors
-v be verbose
-V specify Volume names (separated by |)
-? print this message
\footnotesize
\begin{verbatim}
-./bls -j /tmp/test1
-Volume Record: SessId=2 SessTime=1033762386 JobId=0 DataLen=144
-Begin Session Record: SessId=2 SessTime=1033762386 JobId=1 Level=F Type=B
-End Session Record: SessId=2 SessTime=1033762386 JobId=1 Level=F Type=B
-Begin Session Record: SessId=3 SessTime=1033762386 JobId=2 Level=I Type=B
-End Session Record: SessId=3 SessTime=1033762386 JobId=2 Level=I Type=B
-Begin Session Record: SessId=4 SessTime=1033762386 JobId=3 Level=I Type=B
-End Session Record: SessId=4 SessTime=1033762386 JobId=3 Level=I Type=B
-bls: Got EOF on device /tmp
+./bls -j -V Test1 -c stored.conf DDS-4
+bls: butil.c:258 Using device: "DDS-4" for reading.
+11-Jul 11:54 bls: Ready to read from volume "Test1" on device "DDS-4" (/dev/nst0).
+Volume Record: File:blk=0:1 SessId=4 SessTime=1121074625 JobId=0 DataLen=165
+Begin Job Session Record: File:blk=0:2 SessId=4 SessTime=1121074625 JobId=1 Level=F Type=B
+Begin Job Session Record: File:blk=0:3 SessId=5 SessTime=1121074625 JobId=5 Level=F Type=B
+Begin Job Session Record: File:blk=0:6 SessId=3 SessTime=1121074625 JobId=2 Level=F Type=B
+Begin Job Session Record: File:blk=0:13 SessId=2 SessTime=1121074625 JobId=4 Level=F Type=B
+End Job Session Record: File:blk=0:99 SessId=3 SessTime=1121074625 JobId=2 Level=F Type=B
+ Files=168 Bytes=1,732,978 Errors=0 Status=T
+End Job Session Record: File:blk=0:101 SessId=2 SessTime=1121074625 JobId=4 Level=F Type=B
+ Files=168 Bytes=1,732,978 Errors=0 Status=T
+End Job Session Record: File:blk=0:108 SessId=5 SessTime=1121074625 JobId=5 Level=F Type=B
+ Files=168 Bytes=1,732,978 Errors=0 Status=T
+End Job Session Record: File:blk=0:109 SessId=4 SessTime=1121074625 JobId=1 Level=F Type=B
+ Files=168 Bytes=1,732,978 Errors=0 Status=T
+11-Jul 11:54 bls: End of Volume at file 1 on device "DDS-4" (/dev/nst0), Volume "Test1"
+11-Jul 11:54 bls: End of all volumes.
\end{verbatim}
\normalsize
\addcontentsline{toc}{subsubsection}{bls Listing Blocks}
Normally, except for debugging purposes, you will not need to list Bacula
-blocks (the ``primitive'' unit of Bacula data on the Volume). However, you can
+blocks (the "primitive" unit of Bacula data on the Volume). However, you can
do so with:
\footnotesize
that the records on the Volume are no longer in the catalog.
With some care, it can also be used to synchronize your existing catalog with
-a Volume. Since {\bf bscan} modifies your catalog, we strongly recommend that
+a Volume. Although we have never seen a case of bscan damaging a
+catalog, since bscan modifies your catalog, we recommend that
you do a simple ASCII backup of your database before running {\bf bscan} just
to be sure. See
\ilink{Compacting Your Database}{CompactingMySQL}.
database name ({\bf -b} option), the user name ({\bf -u} option), and/or the
password ({\bf -p}) options.
-As an example, let's suppose that you did a backup to Volume ``Vol001'' and
-that sometime later all records of that Volume were pruned or purged from the
-database. By using {\bf bscan} you can recreate the catalog entries for that
-Volume and then use the {\bf restore} command in the Console to restore
+As an example, let's suppose that you did a backup to Volumes "Vol001"
+and "Vol002", then sometime later all records of one or both those
+Volumes
+were pruned or purged from the
+database. By using {\bf bscan} you can recreate the catalog entries for
+those Volumes and then use the {\bf restore} command in the Console to restore
whatever you want. A command something like:
\footnotesize
\begin{verbatim}
-bscan -c bacula-sd.conf -v -V Vol001 /dev/nst0
+bscan -c bacula-sd.conf -v -V Vol001\|Vol002 /dev/nst0
\end{verbatim}
\normalsize
command must read the entire tape, so if it has a lot of data, it may take a
long time, and thus you might want to immediately use the command listed
below. Note, if you are writing to a disk file, replace the device name with
-the path to the directory that contains the Volume. This must correspond to
+the path to the directory that contains the Volumes. This must correspond to
the Archive Device in the conf file.
Then to actually write or store the records in the catalog, add the {\bf -s}
\footnotesize
\begin{verbatim}
- bscan -s -m -c bacula-sd.conf -v -V Vol001 /dev/nst0
+ bscan -s -m -c bacula-sd.conf -v -V Vol001\|Vol002 /dev/nst0
\end{verbatim}
\normalsize
When writing to the database, if bscan finds existing records, it will
generally either update them if something is wrong or leave them alone. Thus
-if the Volume you are scanning is all or partially in the catalog already, no
+if the Volumes you are scanning are all or partially in the catalog already, no
harm will be done to that existing data. Any missing data will simply be
added.
-If you have multiple tapes, you can scan them with:
+If you have multiple tapes, you should scan them with:
\footnotesize
\begin{verbatim}
\end{verbatim}
\normalsize
-You should, where ever possible try to specify the tapes in the order they are
-written. However, bscan can handle scanning tapes that are not sequential. Any
-incomplete records at the end of the tape will simply be ignored in that case.
+You should, always try to specify the tapes in the order they are written.
+However, bscan can handle scanning tapes that are not sequential. Any
+incomplete records at the end of the tape will simply be ignored in that
+case. If you are simply reparing an existing catalog, this may be OK, but
+if you are creating a new catalog from scratch, it will leave your database
+in an incorrect state. If you do not specify all necessary Volumes on a
+single bscan command, bscan will not be able to correctly restore the
+records that span two volumes. In other words, it is much better to
+specify two or three volumes on a single bscan command rather than run
+bscan two or three times, each with a single volume.
Note, the restoration process using bscan is not identical to the original
database, and optionally fix them. The {\bf dbcheck} program can be found in
the {\bf \lt{}bacula-source\gt{}/src/tools} directory of the source
distribution. Though it is built with the make process, it is not normally
-``installed''.
+"installed".
It is called:
However, you may find it useful to see what bacula would do with a given {\bf
Include} resource. The {\bf testfind} program can be found in the {\bf
\lt{}bacula-source\gt{}/src/tools} directory of the source distribution.
-Though it is built with the make process, it is not normally ``installed''.
+Though it is built with the make process, it is not normally "installed".
It is called:
internal file type, or the link (if any). Debug levels of 10 or greater cause
the filename and the path to be separated using the same algorithm that is
used when putting filenames into the Catalog database.
-
-\subsection*{bimagemgr}
-\label{bimagemgr}
-\index[general]{Bimagemgr }
-\addcontentsline{toc}{subsection}{bimagemgr}
-
-{\bf bimagemgr} is a utility for those who backup to disk volumes in order to
-commit them to CDR disk, rather than tapes. It is a web based interface
-written in perl, used to monitor when a volume file needs to be burned to
-disk. It requires:
-
-\begin{itemize}
-\item A web server running on the bacula server
-\item A CD recorder installed and configured on the bacula server
-\item The cdrtools package installed on the bacula server.
-\item perl, perl-DBI module, and either DBD-MySQL or DBD-PostgreSQL modules
- \end{itemize}
-
-SQLite databases and DVD burning are not supported by {\bf bimagemgr} at this
-time, but both are planned for future releases.
-
-\subsubsection*{bimagemgr installation}
-\index[general]{bimagemgr!Installation }
-\index[general]{bimagemgr Installation }
-\addcontentsline{toc}{subsubsection}{bimagemgr Installation}
-
-Please see the README file in the bimagemgr directory of the distribution for
-instructions.
-
-\subsubsection*{bimagemgr usage}
-\index[general]{bimagemgr!Usage }
-\index[general]{bimagemgr Usage }
-\addcontentsline{toc}{subsubsection}{bimagemgr Usage}
-
-Calling the program in your web browser, e.g. {\tt
-http://localhost/cgi-bin/bimagemgr.pl} will produce a display as shown below
-in Figure 1. The program will query the bacula database and display all volume
-files with the date last written and the date last burned to disk. If a volume
-needs to be burned (last written is newer than last burn date) a ``Burn''
-button will be displayed in the rightmost column.
-
-\addcontentsline{lof}{figure}{Bacula CD Image Manager}
-\includegraphics{./bimagemgr1.eps} \\Figure 1
-
-Place a blank CDR disk in your recorder and click the ``Burn'' button. This will
-cause a pop up window as shown in Figure 2 to display the burn progress.
-
-\addcontentsline{lof}{figure}{Bacula CD Image Burn Progress Window}
-\includegraphics{./bimagemgr2.eps} \\Figure 2
-
-When the burn finishes the pop up window will display the results of cdrecord
-as shown in Figure 3. Close the pop up window and refresh the main window. The
-last burn date will be updated and the ``Burn'' button for that volume will
-disappear. Should you have a failed burn you can reset the last burn date of
-that volume by clicking its ``Reset'' link.
-
-\addcontentsline{lof}{figure}{Bacula CD Image Burn Results}
-\includegraphics{./bimagemgr3.eps} \\Figure 3
-
-In the bottom row of the main display window are two more buttons labeled
-``Burn Catalog'' and ``Blank CDRW''. ``Burn Catalog'' will place a copy of
-your bacula catalog on a disk. If you use CDRW disks rather than CDR then
-``Blank CDRW'' allows you to erase the disk before re-burning it. Regularly
-committing your backup volume files and your catalog to disk with {\bf
-bimagemgr} ensures that you can rebuild easily in the event of some disaster
-on the bacula server itself.
\section*{Python Scripting}
\label{_ChapterStart60}
\index[general]{Python Scripting}
-\index[general]{Scripting!Pyton}
+\index[general]{Scripting!Python}
\addcontentsline{toc}{section}{Python Scripting}
You may be asking what Python is and why a scripting language is
\addcontentsline{toc}{subsection}{Python Configuration}
Python must be enabled during the configuration process by adding
-a \verb?--?enable-python, and possibly specifying an alternate
+a \verb:--:with-python, and possibly specifying an alternate
directory if your Python is not installed in a standard system
location. If you are using RPMs you will need the python-devel package
installed.
language, it is very efficient.
When the Director starts, it looks to see if you have a {\bf
-Scripts Directory} defined, if so, it looks in that directory for
-a file named {\bf DirStartUp}. If it is found, Bacula will pass this
-file to Python for execution.
+Scripts Directory} Directive defined, if so, it looks in that directory for
+a file named {\bf DirStartUp.py}. If it is found, Bacula will pass this
+file to Python for execution. The {\bf Scripts Directory} is a new
+directive that you add to the Director resource of your bacula-dir.conf
+file.
-\subsection*{Bacula Evetns}
+\subsection*{Bacula Events}
\index[general]{Bacula Events}
\index[general]{Events}
\addcontentsline{toc}{subsection}{Bacula Events}
\item [The Bacula Object]
The Bacula object is created by the Bacula daemon (the Director
in the present case) when the daemon starts. It is available to
- the Python startup script, {\bf DirStartup}, by importing the
+ the Python startup script, {\bf DirStartup.py}, by importing the
Bacula definitions with {\bf import bacula}. The methods
available with this object are described below.
import bacula
+The following are the read-only attributes provided by the bacula object.
+\begin{description}
+\item [Name]
+\item [ConfigFile]
+\item [WorkingDir]
+\item [Version] string consisting of "Version Build-date"
+\end{description}
+
+
A simple definition of the Bacula Events Class might be the following:
\footnotesize
\end{verbatim}
\normalsize
-The following are the methods (subroutines) provided within the
-directory by the {\bf job} object.
+When a job event is triggered, the appropriate event definition is
+called in the JobEvents class. This is the means by which your Python
+script or code gets control. Once it has control, it may read job
+attributes, or set them. See below for a list of read-only attributes,
+and those that are writable.
+
+In addition, the Bacula {\bf job} obbject in the Director has
+a number of methods (subroutines) that can be called. They
+are:
\begin{description}
\item [set\_events] The set\_events takes a single
-argument, which is the instantation of the Job Events class
-that contains the methods that you want called. The method
-names that will be called must correspond to the Bacula
-defined events. You may define additional methods but Bacula
-will not use them.
+ argument, which is the instantation of the Job Events class
+ that contains the methods that you want called. The method
+ names that will be called must correspond to the Bacula
+ defined events. You may define additional methods but Bacula
+ will not use them.
\item [run] The run method takes a single string
-argument, which is the run command (same as in the Console)
-that you want to submit to start a new Job. The value
-returned by the run method is the JobId of the job that
-started, or -1 if there was an error.
+ argument, which is the run command (same as in the Console)
+ that you want to submit to start a new Job. The value
+ returned by the run method is the JobId of the job that
+ started, or -1 if there was an error.
\item [write] The write method is used to be able to send
-print output to the Job Report. This will be described later.
+ print output to the Job Report. This will be described later.
+\item [DoesVolumeExist] The DoesVolumeExist takes a single
+ string argument, which is the Volume name, and returns
+ 1 if the volume exists in the Catalog and 0 if the volume
+ does not exist.
\end{description}
The following attributes are read/write within the Director
\begin{description}
\item [Priority] Read or set the Job priority.
-Note, that a Job Priority is effective only before
-the Job actually starts.
+Note, that setting a Job Priority is effective only before
+the Job actually starts. (not functional yet)
\end{description}
The following read-only attributes are available within the Director
for the {\bf job} object.
\begin{description}
-\item [DirName] The name of the Director daemon.
-\item [Level]
-\item [Type]
-\item [JobId]
-\item [Client]
-\item [NumVols]
-\item [Pool]
-\item [Storage]
-\item [Catalog]
-\item [MediaType]
-\item [JobName]
-\item [JobStatus]
+
+\item [Level] This attribute contains a string representing the Job
+ level, e.g. Full, Differential, Incremental, ...
+\item [Type] This attribute contains a string representing the Job
+ type, e.g. Backup, Restore, Verify, ...
+\item [JobId] This attribute contains an integer representing the
+ JobId.
+\item [Client] This attribute contains a string with the name of the
+ Client for this job.
+\item [NumVols] This attribute contains an integer with the number of
+ Volumes in the Pool being used by the Job.
+\item [Pool] This attribute contains a string with the name of the Pool
+ being used by the Job.
+\item [Storage] This attribute contains a string with the name of the
+ Storage resource being used by the Job.
+\item [Catalog] This attribute contains a string with the name of the
+ Catalog resource being used by the Job.
+\item [MediaType] This attribute contains a string with the name of the
+ Media Type associated with the Storage resource being used by the Job.
+\item [Job] This attribute contains a string containing the name of the
+ Job resource used by this job (not unique).
+\item [JobName] This attribute contains a string representing the full
+ unique Job name.
+\item [JobStatus] This attribute contains a single character string
+ representing the current Job status. The status may change
+ during execution of the job.
+\item [Priority] This attribute contains an integer with the priority
+ assigned to the job.
+\item [CatalogRes] tuple consisting of (DBName, Address, User,
+ Password, Socket, Port, Database Vendor) taken from the Catalog resource
+ for the Job with the exception of Database Vendor, which is
+ one of the following: MySQL, PostgreSQL, SQLite, Internal,
+ depending on what database you configured.
+\item [VolumeName]
+ After a Volume has been purged, this attribute will contain the
+ name of that Volume. At other times, this value may have no meaning.
\end{description}
The following write-only attributes are available within the
NewVolume event.
\end{description}
+\subsection*{Python Console Command}
+\index[general]{Python Console Command}
+\index[general]{Console Command!Python}
+\addcontentsline{toc}{subsection}{Python Console Command}
+
+There is a new Console command named {\bf python}. It takes
+a single argument {\bf restart}. Example:
+\begin{verbatim}
+ python restart
+\end{verbatim}
+
+This command restarts the Python interpreter in the Director.
+This can be useful when you are modifying the DirStartUp script,
+because normally Python will cache it, and thus the
+script will be read one time.
+
+
+\subsection*{Python Example}
+\index[general]{Python Example}
+\index[general]{Example!Python}
+\addcontentsline{toc}{subsection}{Python Example}
An example script for the Director startup file is provided in
{\bf examples/python/DirStartup.py} as follows:
noop = 1
def NewVolume(self, job):
+ # Called when Bacula wants a new Volume name. The Volume
+ # name returned, if any, must be stored in job.VolumeName
jobid = job.JobId
client = job.Client
numvol = job.NumVols
job.JobReport="Python before New Volume set for Job.\n"
job.VolumeName=volname
+ def VolumePurged(self, job):
+ # Called when a Volume is purged. The Volume name can be referenced
+ # with job.VolumeName
+ noop = 1
+
+
\end{verbatim}
\normalsize
\ilink{System Requirements}{SysReqs} then at the
\ilink{Compiling and Installing Bacula}{_ChapterStart17} chapter of
this manual.
-\label{PoolsVolsLabels}
-\subsection*{Understanding Pools, Volumes and Labels}
-\index[general]{Labels!Understanding Pools Volumes and }
-\index[general]{Understanding Pools, Volumes and Labels }
-\addcontentsline{toc}{subsection}{Understanding Pools, Volumes and Labels}
+\label{JobsandSchedules}
+\subsection*{Understanding Jobs and Schedules}
+\index[general]{Jobs!Understanding}
+\index[general]{Schedules!Understanding}
+\addcontentsline{toc}{subsection}{Understanding Jobs and Schedules}
+
+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 types 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).
+
+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 2 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 int 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.
+
+Finally, be aware that in addition to the backup jobs there are
+restore, verify, and admin jobs, which have different requirements.
+
+\ label{PoolsVolsLabels}
+\ subsection*{Understanding Pools, Volumes and Labels}
+\ index[general]{Labels!Understanding Pools Volumes and }
+\ index[general]{Understanding Pools, Volumes and Labels }
+\ addcontentsline{toc}{subsection}{Understanding Pools, Volumes and Labels}
If you have been using a program such as {\bf tar} to backup your system,
Pools, Volumes, and labeling may be a bit confusing at first. A Volume is a
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
+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
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 {\bf \verb{--{sbindir} option to the {\bf
+found in the directory you specified on the {\bf \verb:--:sbindir} option to the
+{\bf
./configure} command, and the configuration files are found in the directory
-you specified on the {\bf \verb{--{sysconfdir} option.
+you specified on the {\bf \verb:--:sysconfdir} option.
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
and to manually start/stop Jobs or to obtain Job status information.
The Console configuration file is found in the directory specified on the {\bf
-\verb{--{sysconfdir} option that you specified on the {\bf ./configure} command and
+\verb:--:sysconfdir} option that you specified on the {\bf ./configure} command
+and
by default is named {\bf console.conf}.
-If you choose to build the GNOME console with the {\bf \verb{--{enable-gnome} option,
+If you choose to build the GNOME console with the {\bf \verb:--:enable-gnome}
+option,
you also find a default configuration file for it, named {\bf
gnome-console.conf}.
The same applies to the wxWidgets console, which is build with the {\bf
-\verb{--{enable-wx-console} option, and the name of the default configuration file
+\verb:--:enable-wx-console} option, and the name of the default configuration
+file
is, in this case, {\bf wx-console.conf}.
Normally, for first time users, no change is needed to these files. Reasonable
defaults are set.
\subsubsection*{
-\ilink{Configuring the Monitor Program}{_ChapterStart35}}
+\ilink{Configuring the Monitor Program}{_MonitorChapter}}
\index[general]{Program!Configuring the Monitor }
\index[general]{Configuring the Monitor Program }
\addcontentsline{toc}{subsubsection}{Configuring the Monitor Program}
daemon (MainSD) that is currently selected.
The Monitor configuration file is found in the directory specified on the {\bf
-\verb{--{sysconfdir} option that you specified on the {\bf ./configure} command and
+\verb:--:sysconfdir} option that you specified on the {\bf ./configure} command
+and
by default is named {\bf tray-monitor.conf}. 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
data) to the Storage daemon.
The File daemon configuration file is found in the directory specified on the
-{\bf \verb{--{sysconfdir} option that you specified on the {\bf ./configure} command.
+{\bf \verb:--:sysconfdir} option that you specified on the {\bf ./configure}
+command.
By default, the File daemon's configuration file is named {\bf
bacula-fd.conf}. 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
schedules and monitors all jobs to be backed up.
The Director configuration file is found in the directory specified on the
-{\bf \verb{--{sysconfdir} option that you specified on the {\bf ./configure} command.
+{\bf \verb:--:sysconfdir} option that you specified on the {\bf ./configure}
+command.
Normally the Director's configuration file is named {\bf bacula-dir.conf}.
In general, the only change you must make is modify the FileSet resource so
restore request, to find the data and send it to the File daemon.
The Storage daemon's configuration file is found in the directory specified on
-the {\bf \verb{--{sysconfdir} option that you specified on the {\bf ./configure}
+the {\bf \verb:--:sysconfdir} option that you specified on the {\bf ./configure}
command. By default, the Storage daemon's file is named {\bf bacula-sd.conf}.
Edit this file to contain the correct Archive device names for any tape
devices that you have. If the configuration process properly detected your
The new pthreads library {\bf /lib/tls} installed by default on recent Red Hat
systems running 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. The
-feedback that we have concerning 2.6 kernels is the same. However, on 2.6
-systems, you may want to use the loader environment variable override rather
-than removing /lib/tls. Please see
-\ilink{ Supported Operating Systems}{SupportedOSes} for more
+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 \ilink{ Supported Operating
+Systems}{SupportedOSes} for more
information on this problem.
+
+This problem does not seem to occur on systems running 2.6.x kernels.
+
\label{Running1}
\subsection*{Running Bacula}
\index[general]{Rotation!Log }
\index[general]{Log Rotation }
\addcontentsline{toc}{subsection}{Log Rotation}
-
If you use the default {\bf bacula-dir.conf} 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 {\bf logrotate} from
the log file to be rotated once a month and kept for a maximum of 5 months.
You may want to edit this file to change the default log rotation preferences.
+\subsection*{Log Watch}
+\index[general]{Watch!Log}
+\index[general]{Log Watch}
+\addcontentsline{toc}{subsection}{Log Watch}
+Some systems such as RedHat 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 {\bf scripts/logwatch}
+directory. The {\bf README} file in that directory gives a brief
+explanation on how to install it and what kind of output to expect.
+
\subsection*{Disaster Recovery}
\index[general]{Recovery!Disaster }
\index[general]{Automatic Volume Recycling }
\addcontentsline{toc}{section}{Automatic Volume Recycling}
-Normally, Bacula will write on a volume, and once the tape is written, it can
-append to the volume, but it will never overwrite the data thus destroying it.
-When we speak of {\bf recycling} volumes, we mean that {\bf Bacula} can write
-over the previous contents of a volume. Thus all previous data will be lost.
-
-You may not want Bacula to automatically recycle (reuse) tapes. This would require
-a large number of tapes though, and in such a case, it is possible to manually
-recycle tapes. For more on manual recycling, see the section entitled
-\ilink{ Manually Recycling Volumes}{manualrecycling} below in
-this chapter.
+By default, once Bacula starts writing a Volume, it can
+append to the volume, but it will not overwrite the existing
+data thus destroying it.
+However when Bacula {\bf recycles} a Volume, the Volume becomes
+available for being reused, and Bacula can at some later time
+over write the previous contents of that Volume.
+Thus all previous data will be lost. If the Volume is a tape,
+the tape will be rewritten from the beginning. If the Volume is
+a disk file, the file will be truncated before being rewritten.
+
+You may not want Bacula to automatically recycle (reuse) tapes. This would
+require a large number of tapes though, and in such a case, it is possible
+to manually recycle tapes. For more on manual recycling, see the section
+entitled \ilink{ Manually Recycling Volumes}{manualrecycling} below in this
+chapter.
Most people prefer to have a Pool of tapes that are used for daily backups and
recycled once a week, another Pool of tapes that are used for Full backups
once a week and recycled monthly, and finally a Pool of tapes that are used
-once a month and recycled after a year or two. With a scheme like this, your
-pool of tapes remains constant.
+once a month and recycled after a year or two. With a scheme like this, the
+number of tapes in your pool or pools remains constant.
By properly defining your Volume Pools with appropriate Retention periods,
Bacula can manage the recycling (such as defined above) automatically.
Automatic recycling of Volumes is controlled by three records in the {\bf
Pool} resource definition in the Director's configuration file. These three
-records are: {\bf
+records are:
\begin{itemize}
\item AutoPrune = yes
will only recycle purged Volumes if there is no other appendable Volume
available, otherwise, it will always write to an appendable Volume before
recycling even if there are Volume marked as Purged. This preserves your data
-as long as possible. So, if you wish to ``force'' Bacula to use a purged
+as long as possible. So, if you wish to "force" Bacula to use a purged
Volume, you must first ensure that no other Volume in the Pool is marked {\bf
Append}. If necessary, you can manually set a volume to {\bf Full}. The reason
for this is that Bacula wants to preserve the data on your old tapes (even
though purged from the catalog) as long as absolutely possible before
overwriting it.
-\label{AutoPruning}
+\label{AutoPruning}
\subsection*{Automatic Pruning}
\index[general]{Automatic Pruning }
\index[general]{Pruning!Automatic }
cannot use the Console restore command to restore the files.
When a Job record is pruned, the Volume (Media record) for that Job can still
-remain in the database, and if you do a ``list volumes'', you will see the
+remain in the database, and if you do a "list volumes", you will see the
volume information, but the Job records (and its File records) will no longer
be available.
retention periods in function of how many files you are backing up and the
time periods you want to keep those records online, and the size of the
database. You can always re-insert the records (with 98\% of the original data)
-by using ``bscan'' to scan in a whole Volume or any part of the volume that
+by using "bscan" to scan in a whole Volume or any part of the volume that
you want.
By setting {\bf AutoPrune} to {\bf yes} you will permit {\bf Bacula} to
all previous data will be lost.
\end{description}
-Note, it is also possible to ``force'' pruning of all Volumes in the Pool
+Note, it is also possible to "force" pruning of all Volumes in the Pool
associated with a Job by adding {\bf Prune Files = yes} to the Job resource.
\label{Recycling}
\item Search the Pool for a Volume with VolStatus=Recycle (if there is more
than one, the Volume with the oldest date last written is chosen. If two have
the same date then the one with the lowest MediaId is chosen).
+\item Try recycling any purged Volumes.
\item Prune volumes applying Volume retention period (Volumes with VolStatus
Full, Used, or Append are pruned).
\item Search the Pool for a Volume with VolStatus=Purged
\item Attempt to create a new Volume if automatic labeling enabled
+\item If a Pool named "Scratch" exists, search for a Volume and if found
+ move it to the current Pool for the Job and use it.
\item Prune the oldest Volume if RecycleOldestVolume=yes (the Volume with the
oldest LastWritten date and VolStatus equal to Full, Recycle, Purged, Used,
or Append is chosen). This record ensures that all retention periods are
-properly respected.
+ properly respected.
\item Purge the oldest Volume if PurgeOldestVolume=yes (the Volume with the
oldest LastWritten date and VolStatus equal to Full, Recycle, Purged, Used,
or Append is chosen). We strongly recommend against the use of {\bf
-PurgeOldestVolume} as it can quite easily lead to loss of current backup
-data.
+ PurgeOldestVolume} as it can quite easily lead to loss of current backup
+ data.
\item Give up and ask operator.
\end{itemize}
also runs under GNOME 1.4 but this version is deprecated and thus no longer
maintained.
\item The wxWidgets Console program is developed and tested with the latest
- stable ANSI (not Unicode) version of
- \elink{wxWidgets}{http://www.wxwidgets.org/} (2.6.0). It works fine with the
-Windows and GTK+-2.x version of wxWidgets, and should also work on other
-platforms supported by wxWidgets.
+ stable ANSI or Unicode version of
+ \elink{wxWidgets}{http://www.wxwidgets.org/} (2.6.1). It works fine with the
+ Windows and GTK+-2.x version of wxWidgets, and should also work on other
+ platforms supported by wxWidgets.
\item The Tray Monitor program is developed for GTK+-2.x. It needs Gnome less
or equal to 2.2, KDE greater or equal to 3.1 or any window manager supporting
the
-\elink{ FreeDesktop system tray
-standard}{http://www.freedesktop.org/Standards/systemtray-spec}.
+ \elink{ FreeDesktop system tray
+ standard}{http://www.freedesktop.org/Standards/systemtray-spec}.
\item If you want to enable command line editing and history, you will need
to have /usr/include/termcap.h and either the termcap or the ncurses library
loaded (libtermcap-devel or ncurses-devel).
-\item If you want to use DVD as backup medium, you will need to download and
- install the
- \elink{dvd+rw-tools}{http://fy.chalmers.se/~appro/linux/DVD+RW/}.
+\item If you want to use DVD as backup medium, you will need to download the
+ \elink{dvd+rw-tools 5.21.4.10.8}{http://fy.chalmers.se/~appro/linux/DVD+RW/},
+ apply the \elink{patch}{http://cvs.sourceforge.net/viewcvs.py/*checkout*/bacula/bacula/patches/dvd+rw-tools-5.21.4.10.8.bacula.patch}
+ to make these tools compatible with Bacula, then compile and install them.
+ Do not use the dvd+rw-tools provided by your distribution, they will not work
+ with Bacula.
\end{itemize}
\index[general]{General }
\addcontentsline{toc}{subsection}{General}
-Below, we will discuss restoring files with the Console {\bf Restore} command,
+Below, we will discuss restoring files with the Console {\bf restore} command,
which is the recommended way of doing it. However, there is a standalone
program named {\bf bextract}, which also permits restoring files. For more
information on this program, please see the
a predefined {\bf restore} job in your {\bf bacula-dir.conf} (Director's
config) file. The exact parameters (Client, FileSet, ...) that you define are
not important as you can either modify them manually before running the job or
-if you use the {\bf restore} command, explained below, they will be
-automatically set for you.
+if you use the {\bf restore} command, explained below, Bacula will
+automatically set them for you. In fact, you can no longer simply run a restore
+job. You must use the restore command.
Since Bacula is a network backup program, you must be aware that when you
restore files, it is up to you to ensure that you or Bacula have selected the
the files to a different directory on client B. Normally, you will want to
avoid this, but assuming the operating systems are not too different in their
file structures, this should work perfectly well, if so desired.
-\label{Example1}
+By default, Bacula will restore data to the same Client that was backed
+up, and those data will be restored not to the original places but to
+{\bf /tmp/bacula-restores}. You may modify any of these defaults when the
+restore command prompts you to run the job by selecting the {\bf mod}
+option.
+\label{Example1}
\subsection*{The Restore Command}
\index[general]{Command!Restore }
\index[general]{Restore Command }
restored. This mode is somewhat similar to the standard Unix {\bf restore}
program's interactive file selection mode.
+If your Files have been pruned, the {\bf restore} command will be unable
+to find any files to restore. See below for more details on this.
+
Within the Console program, after entering the {\bf restore} command, you are
presented with the following selection prompt:
To select the JobIds, you have the following choices:
1: List last 20 Jobs run
2: List Jobs where a given File is saved
- 3: Enter list of JobIds to select
+ 3: Enter list of comma separated JobIds to select
4: Enter SQL list command
5: Select the most recent backup for a client
6: Select backup for a client before a specified time
7: Enter a list of files to restore
8: Enter a list of files to restore before a specified time
- 9: Cancel
-Select item: (1-9):
-
+ 9: Find the JobIds of the most recent backup for a client
+ 10: Find the JobIds for a backup for a client before a specified time
+ 11: Enter a list of directories to restore for found JobIds
+ 12: Cancel
+Select item: (1-12):
\end{verbatim}
\normalsize
\begin{itemize}
-\item Item 1 will list the last 20 jobs run. If you find the Job you want,
- you can then select item 3 and enter its JobId(s).
+\item Item 1 will list the last 20 jobs run. If you find the Job you want,
+ you can then select item 3 and enter its JobId(s).
+
\item Item 2 will list all the Jobs where a specified file is saved. If you
- find the Job you want, you can then select item 3 and enter the JobId.
+ find the Job you want, you can then select item 3 and enter the JobId.
+
\item Item 3 allows you the enter a list of comma separated JobIds whose
- files will be put into the directory tree.
+ files will be put into the directory tree. You may then select which
+ files from those JobIds to restore.
+
\item Item 4 allows you to enter any arbitrary SQL command. This is probably
the most primitive way of finding the desired JobIds, but at the same time,
the most flexible. Once you have found the JobId(s), you can select item 3
-and enter them.
+ and enter them.
+
\item Item 5 will automatically select the most recent Full backup and all
- subsequent incremental and differential backups for a specified Client. These
- are the Jobs and Files which, if reloaded, will restore your system to the most
-current saved state. It automatically enters the JobIds found into the
-directory tree. This is probably the most convenient of all the above options
-to use if you wish to restore a selected Client to its most recent state.
+ subsequent incremental and differential backups for a specified Client.
+ These are the Jobs and Files which, if reloaded, will restore your
+ system to the most current saved state. It automatically enters the
+ JobIds found into the directory tree. This is probably the most
+ convenient of all the above options to use if you wish to restore a
+ selected Client to its most recent state.
+
+ There are two important things to note. First, this automatic selection
+ will never select a job that failed (terminated with an error status).
+ If you have such a job and want to recover one or more files from it,
+ you will need to explicitly enter the JobId in item 3, then choose the
+ files to restore.
+
+ If some of the Jobs that are needed to do the restore have had their
+ File records pruned, the restore will be incomplete. Bacula currently
+ does not correctly detect this condition. You can however, check for
+ this by looking carefully at the list of Jobs that Bacula selects and
+ prints. If you find Jobs with the JobFiles column set to zero, when
+ files should have been backed up, then you should expect problems.
+
+ If all the File records have been pruned, Bacula will realize that there
+ are no file records in any of the JobIds chosen and will inform you. It
+ will then propose doing a full restore (non-selective) of those JobIds.
+ This is possible because Bacula still knows where the beginning of the
+ Job data is on the Volumes, even if it does not know where particular
+ files are located.
+
\item Item 6 allows you to specify a date and time, after which Bacula will
automatically select the most recent Full backup and all subsequent
incremental and differential backups that started before the specified date
-and time.
+ and time.
+
\item Item 7 allows you to specify one or more filenames (complete path
required) to be restored. Each filename is entered one at a time or if you
prefix a filename with the less-than symbol (\lt{}) Bacula will read that
-file and assume it is a list of filenames to be restored. The filename entry
-mode is terminated by entering a blank line.
+ file and assume it is a list of filenames to be restored. The filename entry
+ mode is terminated by entering a blank line.
+
\item Item 8 allows you to specify a date and time before entering the
- filenames. See Item 7 above for more details.
-\item Item 9 allows you to cancel the restore command.
- \end{itemize}
+ filenames. See Item 7 above for more details.
+
+\item Item 9 allows you find the JobIds of the most recent backup for
+ a client. This is much like option 5 (it uses the same code), but
+ those JobIds are retained internally as if you had entered them
+ manually. You may then select item 11 (see below) to restore one
+ or more directories.
+
+\item Item 10 is the same as item 9, except that it allows you to enter
+ a before date (as with item 6). These JobIds will then be retained
+ internally.
+
+\index[general]{Restore Directories}
+\item Item 11 allows you to enter a list of JobIds from which you can
+ select directories to be restored. The list of JobIds can have been
+ previously created by using either item 9 or 10 on the menu. You
+ may then enter a full path to a directory name or a filename preceded
+ by a less than sign (\lt{}). The filename should contain a list
+ of directories to be restored. All files in those directories will
+ be restored, but if the directory contains subdirectories, nothing
+ will be restored in the subdirectory unless you explicitly enter its
+ name.
+
+\item Item 12 allows you to cancel the restore command.
+\end{itemize}
As an example, suppose that we select item 5 (restore to most recent state).
It will then ask for the desired Client, which on my system, will print all
\footnotesize
\begin{verbatim}
-+-------+------+----------+-------------+-------------+------+-------+------------+
-| JobId | Levl | JobFiles | StartTime | VolumeName | File | SesId | VolSesTime |
-+-------+------+----------+-------------+-------------+------+-------+------------+
-| 1,792 | F | 128,374 | 08-03 01:58 | DLT-19Jul02 | 67 | 18 | 1028042998 |
-| 1,792 | F | 128,374 | 08-03 01:58 | DLT-04Aug02 | 0 | 18 | 1028042998 |
-| 1,797 | I | 254 | 08-04 13:53 | DLT-04Aug02 | 5 | 23 | 1028042998 |
-| 1,798 | I | 15 | 08-05 01:05 | DLT-04Aug02 | 6 | 24 | 1028042998 |
-+-------+------+----------+-------------+-------------+------+-------+------------+
++-------+------+----------+-------------+-------------+------+-------+----------
+--+
+| JobId | Levl | JobFiles | StartTime | VolumeName | File | SesId |
+VolSesTime |
++-------+------+----------+-------------+-------------+------+-------+----------
+--+
+| 1,792 | F | 128,374 | 08-03 01:58 | DLT-19Jul02 | 67 | 18 |
+1028042998 |
+| 1,792 | F | 128,374 | 08-03 01:58 | DLT-04Aug02 | 0 | 18 |
+1028042998 |
+| 1,797 | I | 254 | 08-04 13:53 | DLT-04Aug02 | 5 | 23 |
+1028042998 |
+| 1,798 | I | 15 | 08-05 01:05 | DLT-04Aug02 | 6 | 24 |
+1028042998 |
++-------+------+----------+-------------+-------------+------+-------+----------
+--+
You have selected the following JobId: 1792,1792,1797
Building directory tree for JobId 1792 ...
Building directory tree for JobId 1797 ...
\normalsize
Depending on the number of {\bf JobFiles} for each JobId, the {\bf Building
-directory tree ...``} can take a bit of time.
+directory tree ..."} can take a bit of time. If you notice ath all the
+JobFiles are zero, your Files have probably been pruned and you will not be
+able to select any individual files -- it will be restore everything or
+nothing.
In our example, Bacula found four Jobs that comprise the most recent backup of
the specified Client and FileSet. Two of the Jobs have the same JobId because
tells you that the current working directory ({\bf cwd}) is /. Finally, Bacula
prompts with the dollar sign (\$) to indicate that you may enter commands to
move around the directory tree and to select files.
+
+If you want all the files to automatically be marked when the directory
+tree is built, enter the command {\bf restore all}.
Instead of choosing item 5 on the first menu (Select the most recent backup
for a client), if we had chosen item 3 (Enter list of JobIds to select) and we
had entered the JobIds {\bf 1792,1797,1798} we would have arrived at the same
-point.
+point.
One point to note, if you are manually entering JobIds, is that you must enter
them in the order they were run (generally in increasing JobId order). If you
Jobs, you may end up with an old version of that file (i.e. not the most
recent).
+Directly entering the JobIds can also permit you to recover data from
+a Job that wrote files to tape but that terminated with an error status.
+
While in file selection mode, you can enter {\bf help} or a question mark (?)
to produce a summary of the available commands:
\footnotesize
\begin{verbatim}
- Command Description
+ Command Description
======= ===========
cd change current directory
count count marked files in and below the cd
- dir list current directory
+ dir long list current directory, wildcards allowed
done leave file selection mode
estimate estimate restore size
- exit exit = done
- find find files -- wildcards allowed
+ exit same as done command
+ find find files, wildcards allowed
help print help
- ls list current directory -- wildcards allowed
+ ls list current directory, wildcards allowed
lsmark list the marked files in and below the cd
- mark mark file to be restored
- markdir mark directory entry to be restored -- nonrecursive
+ mark mark dir/file to be restored recursively in dirs
+ markdir mark directory name to be restored (no files)
pwd print current working directory
- unmark unmark file to be restored
- unmarkdir unmark directory -- no recursion
- quit quit
+ unmark unmark dir/file to be restored recursively in dir
+ unmarkdir unmark directory name only no recursion
+ quit quit and do not do restore
? print help
-
\end{verbatim}
\normalsize
-As a default no files have been selected for restore. If you want to restore
+As a default no files have been selected for restore (unless you
+added {\bf all} to the command line. If you want to restore
everything, at this point, you should enter {\bf mark *}, and then {\bf done}
and {\bf Bacula} will write the bootstrap records to a file and request your
approval to start a restore job.
\normalsize
Please examine each of the items very carefully to make sure that they are
-correct. In particular, look at {\bf Where}, which tells you where in the
-directory structure the files will be restored, and {\bf Client}, which tells
-you which client will receive the files. These items will not always be
-completed with the correct values depending on which of the restore options
-you chose.
+correct. In particular, look at {\bf Where}, which tells you where in the
+directory structure the files will be restored, and {\bf Client}, which
+tells you which client will receive the files. Note that by default the
+Client which will receive the files is the Client that was backed up.
+These items will not always be completed with the correct values depending
+on which of the restore options you chose. You can change any of these
+default items by entering {\bf mod} and responding to the prompts.
The above assumes that you have defined a {\bf Restore} Job resource in your
Director's configuration file. Normally, you will only need one Restore Job
To select the JobIds, you have the following choices:
1: List last 20 Jobs run
2: List Jobs where a given File is saved
- 3: Enter list of JobIds to select
+ 3: Enter list of comma separated JobIds to select
4: Enter SQL list command
5: Select the most recent backup for a client
6: Select backup for a client before a specified time
7: Enter a list of files to restore
8: Enter a list of files to restore before a specified time
- 9: Cancel
-Select item: (1-9): 7
+ 9: Find the JobIds of the most recent backup for a client
+ 10: Find the JobIds for a backup for a client before a specified time
+ 11: Enter a list of directories to restore for found JobIds
+ 12: Cancel
+Select item: (1-12):
\end{verbatim}
\normalsize
\normalsize
If in modifying the parameters for the Run Restore job, you find that Bacula
-asks you to enter a Job number, this is because you have no yet specified
+asks you to enter a Job number, this is because you have not yet specified
either a Job number or a Bootstrap file. Simply entering zero will allow you
to continue and to select another option to be modified.
\label{CommandArguments}
Incremental saves run before the date you specify. Note, this command is not
too user friendly in that you must specify the date/time exactly as shown.
\item {\bf file=filename} -- specify a filename to be restored. You must
- specify the full path and filename. Prefixing the entry with a less-than sign
+ specify the full path and filename. Prefixing the entry with a less-than
+sign
(\lt{}) will cause Bacula to assume that the filename is on your system and
contains a list of files to be restored. Bacula will thus read the list from
that file. Multiple file=xxx specifications may be specified on the command
\item You are restoring into a directory that is already created and has file
creation restrictions. Bacula tries to reset everything but without walking
up the full chain of directories and modifying them all during the restore,
-which Bacula does and will not do, getting permissions back correctly in this
-situation depends to a large extent on your OS.
+ which Bacula does and will not do, getting permissions back correctly in
+this
+ situation depends to a large extent on your OS.
\item You selected one or more files in a directory, but did not select the
- directory entry to be restored. In that case, if the directory is not on disk
+ directory entry to be restored. In that case, if the directory is not on
+disk
Bacula simply creates the directory with some default attributes which may
-not be the same as the original. If you do not select a directory and all its
-contents to be restored, you can still select items within the directory to
-be restored by individually marking those files, but in that case, you should
-individually use the ''markdir`` command to select all higher level
-directory entries (one at a time) to be restored if you want the directory
-entries properly restored.
+ not be the same as the original. If you do not select a directory and all
+its
+ contents to be restored, you can still select items within the directory to
+ be restored by individually marking those files, but in that case, you
+should
+ individually use the "markdir" command to select all higher level
+ directory entries (one at a time) to be restored if you want the directory
+ entries properly restored.
\end{itemize}
\label{Windows}
with SYSTEM ownership and permissions. In this case, you may have problems
accessing the newly restored files.
-To avoid this problem, you should create any alternate directory before doing the
+To avoid this problem, you should create any alternate directory before doing
+the
restore. Bacula will not change the ownership and permissions of the directory
if it is already created as long as it is not one of the directories being
restored (i.e. written to tape).
\index[general]{Restoring Files Can Be Slow }
\addcontentsline{toc}{subsection}{Restoring Files Can Be Slow}
-Restoring files is generally {\bf much} slower than backing it up for several
+Restoring files is generally {\bf much} slower than backing them up for several
reasons. The first is that during a backup the tape is normally already
positioned and Bacula only needs to write. On the other hand, because restoring
-files is done so rarely, Bacula keeps only the he start file and block on the
+files is done so rarely, Bacula keeps only the start file and block on the
tape for the whole job rather than on a file by file basis which would use
quite a lot of space in the catalog.
-Bacula versions 1.31a and older would seek to the first file on the first
-tape, then sequentially search the tape for the specified files. If you were
-doing a full restore, this is OK, but if you want to restore one or two files,
-the process could be quite long.
-
-This deficiency has been corrected in version 1.32. The consequence is that
Bacula will forward space to the correct file mark on the tape for the Job,
then forward space to the correct block, and finally sequentially read each
record until it gets to the correct one(s) for the file or files you want to
restore. Once the desired files are restored, Bacula will stop reading the
-tape. For restoring a small number of files, version 1.32 and greater are
-hundreds of times faster than previous versions.
+tape.
Finally, instead of just reading a file for backup, during the restore, Bacula
must create the file, and the operating system must allocate disk space for
the file as Bacula is restoring it.
For all the above reasons the restore process is generally much slower than
-backing up.
+backing up (sometimes it takes three times as long).
\subsection*{Problems Restoring Files}
\index[general]{Files!Problems Restoring }
what it is now after each individual test:
\begin{enumerate}
-\item Set ''Block Positioning = no`` in your Device resource and try the
+\item Set "Block Positioning = no" in your Device resource and try the
restore. This is a new directive and untested.
-\item Set ''Minimum Block Size = 512`` and ''Maximum Block Size = 512`` and
- try the restore. Again send me the full job report output. If you are able to
+\item Set "Minimum Block Size = 512" and "Maximum Block Size = 512" and
+ try the restore. Again send me the full job report output. If you are able
+ to
determine the block size your drive was previously using, you should try
-that size if 512 does not work.
+ that size if 512 does not work.
\item Try editing the restore.bsr file at the Run xxx yes/mod/no prompt
- before starting the restore job and remove all the VolBlock statements. These
+ before starting the restore job and remove all the VolBlock statements.
+ These
are what causes Bacula to reposition the tape, and where problems occur if
-you have a fixed block size set for your drive. The VolFile commands also
-cause repositioning, but this will work regardless of the block size.
+ you have a fixed block size set for your drive. The VolFile commands also
+ cause repositioning, but this will work regardless of the block size.
\item Use bextract to extract the files you want -- it reads the Volume
sequentially if you use the include list feature, or if you use a .bsr file,
- but remove all the VolBlock statements after the .bsr file is created (at the
-Run yes/mod/no) prompt but before you start the restore.
+ but remove all the VolBlock statements after the .bsr file is created (at
+ the
+ Run yes/mod/no) prompt but before you start the restore.
\end{enumerate}
\subsection*{Example Restore Job Resource}
\begin{description}
\item [cd]
- The {\bf cd} command changes the current directory to the argument specified.
+ The {\bf cd} command changes the current directory to the argument
+ specified.
It operates much like the Unix {\bf cd} command. Wildcard specifications are
-not permitted.
+ not permitted.
-Note, on Windows systems, the various drives (c:, d:, ...) are treated like a
-directory within the file tree while in the file selection mode. As a
-consequence, you must do a {\bf cd c:} or possibly in some cases a {\bf cd
-C:} (note upper case) to get down to the first directory.
+ Note, on Windows systems, the various drives (c:, d:, ...) are treated like
+ a
+ directory within the file tree while in the file selection mode. As a
+ consequence, you must do a {\bf cd c:} or possibly in some cases a {\bf cd
+ C:} (note upper case) to get down to the first directory.
\item [dir]
\index[dir]{dir }
The {\bf dir} command is similar to the {\bf ls} command, except that it
-prints it in long format (all details). This command can be a bit slower than
-the {\bf ls} command because it must access the catalog database for the
-detailed information for each file.
+ prints it in long format (all details). This command can be a bit slower
+ than
+ the {\bf ls} command because it must access the catalog database for the
+ detailed information for each file.
\item [estimate]
\index[dir]{estimate }
The {\bf estimate} command prints a summary of the total files in the tree,
-how many are marked to be restored, and an estimate of the number of bytes to
-be restored. This can be useful if you are short on disk space on the machine
-where the files will be restored.
+ how many are marked to be restored, and an estimate of the number of bytes
+ to
+ be restored. This can be useful if you are short on disk space on the
+ machine
+ where the files will be restored.
\item [find]
\index[dir]{find }
The {\bf find} command accepts one or more arguments and displays all files
-in the tree that match that argument. The argument may have wildcards. It is
-somewhat similar to the Unix command {\bf find / -name arg}.
+ in the tree that match that argument. The argument may have wildcards. It is
+ somewhat similar to the Unix command {\bf find / -name arg}.
\item [ls]
The {\bf ls} command produces a listing of all the files contained in the
current directory much like the Unix {\bf ls} command. You may specify an
-argument containing wildcards, in which case only those files will be listed.
-Any file that is marked to be restored will have its name preceded by an
-asterisk ({\bf *}). Directory names will be terminated with a forward slash
-({\bf /}) to distinguish them from filenames.
+ argument containing wildcards, in which case only those files will be
+listed.
+ Any file that is marked to be restored will have its name preceded by an
+ asterisk ({\bf *}). Directory names will be terminated with a forward slash
+ ({\bf /}) to distinguish them from filenames.
\item [lsmark]
\index[fd]{lsmark }
The {\bf lsmark} command is the same as the {\bf ls} except that it will
-print only those files marked for extraction. The other distinction is that
-it will recursively descend into any directory selected.
+ print only those files marked for extraction. The other distinction is that
+ it will recursively descend into any directory selected.
\item [mark]
\index[dir]{mark }
- The {\bf mark} command allows you to mark files to be restored. It takes a
-single argument which is the filename or directory name in the current
-directory to be marked for extraction. The argument may be a wildcard
-specification, in which case all files that match in the current directory
-are marked to be restored. If the argument matches a directory rather than a
-file, then the directory and all the files contained in that directory
-(recursively) are marked to be restored. Any marked file will have its name
-preceded with an asterisk ({\bf *}) in the output produced by the {\bf ls} or
-{\bf dir} commands. Note, supplying a full path on the mark command does not
-work as expected to select a file or directory in the current directory.
-Also, the {\bf mark} command works on the current and lower directories but
-does not touch higher level directories.
-
-After executing the {\bf mark} command, it will print a brief summary:
+ The {\bf mark} command allows you to mark files to be restored. It takes a
+ single argument which is the filename or directory name in the current
+ directory to be marked for extraction. The argument may be a wildcard
+ specification, in which case all files that match in the current directory
+ are marked to be restored. If the argument matches a directory rather than a
+ file, then the directory and all the files contained in that directory
+ (recursively) are marked to be restored. Any marked file will have its name
+ preceded with an asterisk ({\bf *}) in the output produced by the {\bf ls}
+or
+ {\bf dir} commands. Note, supplying a full path on the mark command does not
+ work as expected to select a file or directory in the current directory.
+ Also, the {\bf mark} command works on the current and lower directories but
+ does not touch higher level directories.
+
+ After executing the {\bf mark} command, it will print a brief summary:
\footnotesize
\begin{verbatim}
\end{verbatim}
\normalsize
-If no files were marked, or:
+ If no files were marked, or:
\footnotesize
\begin{verbatim}
\end{verbatim}
\normalsize
-if some files are marked.
+ if some files are marked.
\item [unmark]
\index[dir]{unmark }
The {\bf unmark} is identical to the {\bf mark} command, except that it
-unmarks the specified file or files so that they will not be restored. Note:
-the {\bf unmark} command works from the current directory, so it does not
-unmark any files at a higher level. First do a {\bf cd /} before the {\bf
-unmark *} command if you want to unmark everything.
+ unmarks the specified file or files so that they will not be restored. Note:
+ the {\bf unmark} command works from the current directory, so it does not
+ unmark any files at a higher level. First do a {\bf cd /} before the {\bf
+ unmark *} command if you want to unmark everything.
\item [pwd]
\index[dir]{pwd }
The {\bf pwd} command prints the current working directory. It accepts no
-arguments.
+ arguments.
\item [count]
\index[dir]{count }
The {\bf count} command prints the total files in the directory tree and the
-number of files marked to be restored.
+ number of files marked to be restored.
\item [done]
\index[dir]{done }
\item [quit]
\index[fd]{quit }
- This command terminates the file selection and does not run the restore job.
+ This command terminates the file selection and does not run the restore
+job.
\item [help]
\item [?]
This command is the same as the {\bf help} command.
- \end{description}
+\end{description}
+
+\subsection*{Restoring When Things Go Wrong}
+\index[general]{Restoring When Things Go Wrong }
+\addcontentsline{toc}{subsection}{Restoring When Things Go Wrong}
+
+This and the following sections will try to present a few of the kinds of
+problems that can come up making restoring more difficult. I'll try to
+provide a few ideas how to get out of these problem situations.
+
+\begin{description}
+\item [Problem]
+ Your catalog has been damaged and Bacula either doesn't work or prints
+ errors.
+\item[Solution]
+ For SQLite, use the vacuum command to try to fix the database. For either
+ MySQL or PostgreSQL, see the vendor's documentation. They have specific tools
+ that check and repair databases.
+
+ Assuming the above does not resolve the problem, you will need to restore
+ or rebuild your catalog.
+\item[Problem]
+ How do I restore my catalog?
+\item[Solution]
+ If you have backed up your database nightly (as you should) and you
+ have made a bootstrap file, you can immediately load back your
+ database (or the ASCII SQL output). Make a copy of your current
+ database, then re-initialize it, by running the following scripts:
+\begin{verbatim}
+ ./drop_bacula_tables
+ ./make_bacula_tables
+\end{verbatim}
+ After re-initializing the database, you should be able to run
+ Bacula. If you now try to use the restore command, it will not
+ work because the database will be empty. However, you can manually
+ run a restore job and specify your bootstrap file. You do so
+ by entering the {bf run} command in the console and selecting the
+ restore job. If you are using the default bacula-dir.conf, this
+ Job will be named {\bf RestoreFiles}. Most likely it will prompt
+ you with something such as:
+\footnotesize
+\begin{verbatim}
+Run Restore job
+JobName: RestoreFiles
+Bootstrap: /home/kern/bacula/working/restore.bsr
+Where: /tmp/bacula-restores
+Replace: always
+FileSet: Full Set
+Client: rufus-fd
+Storage: File
+When: 2005-07-10 17:33:40
+Catalog: MyCatalog
+Priority: 10
+OK to run? (yes/mod/no):
+\end{verbatim}
+\normalsize
+ A number of the items will be different in your case. What you want
+ to do is: to use the mod option to change the Bootstrap to point to
+ your saved bootstrap file; and to make sure all the other items
+ such as Client, Storage, Catalog, and Where are correct. The
+ FileSet is not used when you specify a bootstrap file.
+ Once you have set all the correct values, run the Job and
+ it will restore the backup of your database. You will then
+ need to follow the instructions for your database type to
+ recreate the database from the ASCII backup file.
+
+
+\item[Solution]
+ If you did save your database but did not make a bootstrap file, then
+ recovering the database
+ is more difficult. You will probably need to use bextract to extract the
+ backup copy.
+ First you should locate the listing of the job report from the last catalog
+ backup. It has important information that will allow you to quickly find
+ your database file. For example, in the job report for the CatalogBackup
+ shown below, the critical items are the Volume name(s), the Volume Session Id
+ and the Volume Session Time. If you know those, you can easily restore your
+ Catalog.
+\footnotesize
+\begin{verbatim}
+
+22-Apr 10:22 HeadMan: Start Backup JobId 7510,
+Job=CatalogBackup.2005-04-22_01.10.0
+22-Apr 10:23 HeadMan: Bacula 1.37.14 (21Apr05): 22-Apr-2005 10:23:06
+ JobId: 7510
+ Job: CatalogBackup.2005-04-22_01.10.00
+ Backup Level: Full
+ Client: Polymatou
+ FileSet: "CatalogFile" 2003-04-10 01:24:01
+ Pool: "Default"
+ Storage: "DLTDrive"
+ Start time: 22-Apr-2005 10:21:00
+ End time: 22-Apr-2005 10:23:06
+ FD Files Written: 1
+ SD Files Written: 1
+ FD Bytes Written: 210,739,395
+ SD Bytes Written: 210,739,521
+ Rate: 1672.5 KB/s
+ Software Compression: None
+ Volume name(s): DLT-22Apr05
+ Volume Session Id: 11
+ Volume Session Time: 1114075126
+ Last Volume Bytes: 1,428,240,465
+ Non-fatal FD errors: 0
+ SD Errors: 0
+ FD termination status: OK
+ SD termination status: OK
+ Termination: Backup OK
+
+\end{verbatim}
+\normalsize
+ From the above information, you can manually create a bootstrap file,
+ and then follow the instructions given above for restoring your database.
+ A reconstructed bootstrap file for the above backup Job would look
+ like the following:
+\footnotesize
+\begin{verbatim}
+Volume="DLT-22Apr05"
+VolSessionId=11
+VolSessionTime=1114075126
+FileIndex=1-1
+\end{verbatim}
+\normalsize
+ Where we have inserted the Volume name, Volume Session Id, and Volume Session
+Time that
+ correspond to the values in the job report. We've also used a FileIndex of
+one,
+ which will always be the case providing that there was only one file
+ backed up in the job.
+
+ The disadvantage of this bootstrap file compared to what is created when you
+ ask for one to be written, is that there is no File and Block specified, so
+ the restore code must search all data in the Volume to find the requested
+ file. A fully specified bootstrap file would have the File and Blocks
+specified
+ as follows:
+\footnotesize
+\begin{verbatim}
+Volume="DLT-22Apr05"
+VolSessionId=11
+VolSessionTime=1114075126
+VolFile=118-118
+VolBlock=0-4053
+FileIndex=1-1
+\end{verbatim}
+\normalsize
+\item [Problem]
+ You don't have a bootstrap file, and you don't have the Job report for
+ the backup of your database, but you did backup the database, and you
+ know the Volume to which it was backed up.
+
+\item [Solution]
+ Use {\bf bls} to indicate where it is on the tape. For example:
+
+\footnotesize
+\begin{verbatim}
+./bls -j -V DLT-22Apr05 /dev/nst0
+\end{verbatim}
+\normalsize
+ Might produce the following output:
+\footnotesize
+\begin{verbatim}
+bls: butil.c:258 Using device: "/dev/nst0" for reading.
+21-Jul 18:34 bls: Ready to read from volume "DLT-22Apr05" on device "DLTDrive"
+(/dev/nst0).
+Volume Record: File:blk=0:0 SessId=11 SessTime=1114075126 JobId=0 DataLen=164
+...
+Begin Job Session Record: File:blk=118:0 SessId=11 SessTime=1114075126
+JobId=7510
+ Job=CatalogBackup.2005-04-22_01.10.0 Date=22-Apr-2005 10:21:00 Level=F Type=B
+End Job Session Record: File:blk=118:4053 SessId=11 SessTime=1114075126
+JobId=7510
+ Date=22-Apr-2005 10:23:06 Level=F Type=B Files=1 Bytes=210,739,395 Errors=0
+Status=T
+...
+21-Jul 18:34 bls: End of Volume at file 201 on device "DLTDrive" (/dev/nst0),
+Volume "DLT-22Apr05"
+21-Jul 18:34 bls: End of all volumes.
+\end{verbatim}
+\normalsize
+ Of course, there will be many more records printed, but we have indicated
+ the essential lines of output. From the information on the Begin Job and End
+ Job Session Records, you can reconstruct a bootstrap file such as the one
+ shown above.
+
+\item[Problem]
+ How can I find where a file is stored.
+\item[Solution]
+ Normally, it is not necessary, you just use the {\bf restore} command to
+restore the
+ most recently saved version (menu option 5), or a version saved before a given
+date (menu
+ option 8). If you know the JobId of the job in which it was saved, you can
+use menu
+ option 3 to enter that JobId.
+
+ If you would like to know the JobId where a file was saved, select restore
+menu option
+ 2.
+
+ You can also use the {\bf query} command to find information such as:
+\footnotesize
+\begin{verbatim}
+*query
+Available queries:
+ 1: List Job totals:
+ 2: List up to 20 places where a File is saved regardless of the directory:
+ 3: List where the most recent copies of a file are saved:
+ 4: List last 20 Full Backups for a Client:
+ 5: List all backups for a Client after a specified time
+ 6: List all backups for a Client
+ 7: List Volume Attributes for a selected Volume:
+ 8: List Volumes used by selected JobId:
+ 9: List Volumes to Restore All Files:
+ 10: List Pool Attributes for a selected Pool:
+ 11: List total files/bytes by Job:
+ 12: List total files/bytes by Volume:
+ 13: List Files for a selected JobId:
+ 14: List Jobs stored in a selected MediaId:
+ 15: List Jobs stored for a given Volume name:
+Choose a query (1-15):
+\end{verbatim}
+\normalsize
+
+\end{description}
the file. These defines basically just control the dependency information that
gets coded into the finished rpm package.
The platform define may be edited in the spec file directly (by default all
-defines are set to 0 or ``not set''). For example, to build the RedHat 7.x
+defines are set to 0 or "not set"). For example, to build the RedHat 7.x
package find the line in the spec file which reads
\footnotesize
in addition to checking shared libraries. To avoid this do not package the
examples directory.
\end{enumerate}
+
+\item {\bf Support for RHEL4, CentOS 4 and x86_64}
+The examples below
+explicit build support for RHEL4 (I think) and CentOS 4. Build support
+for x86_64 has also been added. Test builds have been done on CentOS but
+not RHEL4.
+
+\footnotesize
+\begin{verbatim}
+Build with one of these 3 commands:
+
+rpmbuild --rebuild \
+ --define "build_rhel4 1" \
+ --define "build_sqlite 1" \
+ bacula-1.36.2-4.src.rpm
+
+rpmbuild --rebuild \
+ --define "build_rhel4 1" \
+ --define "build_postgresql 1" \
+ bacula-1.36.2-4.src.rpm
+
+rpmbuild --rebuild \
+ --define "build_rhel4 1" \
+ --define "build_mysql 1" \
+ --define "build_mysql4 1" \
+ bacula-1.36.2-4.src.rpm
+
+For CentOS substitute '--define "build_centos4 1"' in place of rhel4.
+
+For 64 bit support add '--define "build_x86_64 1"'
+\end{verbatim}
+\normalsize
Bacula}
TCP Wrappers are implemented if you turn them on when configuring ({\bf
-./configure \verb{--{with-libwrap}). With this code enabled, you may control who may
+./configure \verb:--:with-libwrap}). With this code enabled, you may control who may
access your daemons. This control is done by modifying the file: {\bf
/etc/hosts.allow}. The program name that {\bf Bacula} uses when applying these
access restrictions is the name you specify in the daemon configuration file.
\normalsize
where director.example.org is the host which will be contacting the client
-(ie. the box on which the Bacula Director daemon runs). The use of ``ALL :
-deny'' ensures that the twist option (if present) is not invoked. To properly
+(ie. the box on which the Bacula Director daemon runs). The use of "ALL :
+deny" ensures that the twist option (if present) is not invoked. To properly
test your configuration, start the daemon(s), then attempt to connect from an
IP address which should be able to connect. You should see something like
this:
\item It can take a long time for data to come in from the File daemon during
an Incremental backup. If it is directly written to tape, the tape will start
and stop or shoe-shine as it is often called causing tape wear. By first
-writing the data to disk, then writing it to tape, the tape can be kept in
-continual motion.
+ writing the data to disk, then writing it to tape, the tape can be kept in
+ continual motion.
\item While the spooled data is being written to the tape, the despooling
process has exclusive use of the tape. This means that you can spool multiple
simultaneous jobs to disk, then have them very efficiently despooled one at a
-time without having the data blocks from several jobs intermingled, thus
-substantially improving the time needed to restore files.
+ time without having the data blocks from several jobs intermingled, thus
+ substantially improving the time needed to restore files.
\item Writing to a tape can be slow. By first spooling your data to disk, you
can often reduce the time the File daemon is running on a system, thus
reducing downtime, and/or interference with users.
\end{itemize}
-Data spooling is exactly that ``spooling''. It is not a way to first write a
-``backup'' to a disk file and then to a tape. When the backup has only been spooled to disk,
+Data spooling is exactly that "spooling". It is not a way to first write a
+"backup" to a disk file and then to a tape. When the backup has only been spooled to disk,
it is not complete yet and cannot be restored until it is written to tape. In a
future version, Bacula will support writing a backup to disk then later {\bf
Migrating} or {\bf Copying} it to a tape.
the Director's conf file (default {\bf no}).
{\bf SpoolData = yes|no}
+
\item To override the Job specification in a Schedule Run directive in the
Director's conf file.
{\bf SpoolData = yes|no}
+
\item To limit the maximum total size of the spooled data for a particular
device. Specified in the Device resource of the Storage daemon's conf file
(default unlimited).
{\bf Maximum Spool Size = size}
+ Where size is a the maximum spool size for all jobs specified in bytes.
-Where size is a the maximum spool size for all jobs specified in bytes.
\item To limit the maximum total size of the spooled data for a particular
device for a single job. Specified in the Device Resource of the Storage
daemon's conf file (default unlimited).
{\bf Maximum Job Spool Size = size}
+ Where size is the maximum spool file size for a single job specified in
+ bytes.
-Where size is the maximum spool file size for a single job specified in
-bytes.
\item To specify the spool directory for a particular device. Specified in
the Device Resource of the Storage daemon's conf file (default, the working
directory).
doesn't completely fill up. In principle, data spooling will properly detect a
full disk, and despool data allowing the job to continue. However, attribute
spooling is not so kind to the user. If the disk on which attributes are being
-spooled fills, the job will be canceled.
-\label{points}
+spooled fills, the job will be canceled. In addition, if your working
+directory is on the same partition as the spool directory, then Bacula jobs
+will fail possibly in bizarre ways when the spool fills.
+\label{points}
\subsection*{Other Points}
\index[general]{Points!Other }
\index[general]{Other Points }
\item When data spooling is enabled, Bacula automatically turns on attribute
spooling. In other words, it also spools the catalog entries to disk. This is
done so that in case the job fails, there will be no catalog entries
-pointing to non-existent tape backups.
+ pointing to non-existent tape backups.
\item Attribute despooling is done at the end of the job, as a consequence,
after Bacula stops writing the data to the tape, there may be a pause while
the attributes are sent to the Directory and entered into the catalog before
-the job terminates.
+ the job terminates.
\item Attribute spool files are always placed in the working directory.
\item When Bacula begins despooling data spooled to disk, it takes exclusive
use of the tape. This has the major advantage that in running multiple
simultaneous jobs at the same time, the blocks of several jobs will not be
-intermingled.
+ intermingled.
\item It probably does not make a lot of sense to enable data spooling if you
are writing to disk files.
\item It is probably best to provide as large a spool file as possible to
avoid repeatedly spooling/despooling. Also, while a job is despooling to
tape, the File daemon must wait (i.e. spooling stops for the job while it is
-despooling).
+ despooling).
\item If you are running multiple simultaneous jobs, Bacula will continue
spooling other jobs while one is despooling to tape, provided there is
sufficient spool file space.
\addcontentsline{toc}{subsection}{Installing and Configuring SQLite -- Phase
I}
-If you use the {\bf ./configure \verb{--{with-sqlite} statement for configuring {\bf
-Bacula}, you will need SQLite version 2.2.3 or later installed. Our standard
+If you use the {\bf ./configure \verb:--:with-sqlite} statement for configuring {\bf
+Bacula}, you will need SQLite version 2.8.16 or later installed. Our standard
location (for the moment) for SQLite is in the dependency package {\bf
-depkgs/sqlite-2.2.3}. Please note that the version will be updated as new
+depkgs/sqlite-2.8.16}. Please note that the version will be updated as new
versions are available and tested.
+You may install and use SQLite version 3.x with Bacula by using:
+{\bf ./configure \verb:--:with-sqlite3}. You should ensure that
+when the database is created that you have used
+\begin{verbatim}
+PRAGMA synchronous = NORMAL;
+\end{verbatim}
+otherwiset SQLite version 3.x is 4 to 10 times slower than version 2.8.16.
+
Installing and Configuring is quite easy.
\begin{enumerate}
Bacula}.
Please note that the {\bf ./configure} used to build {\bf Bacula} will need to
-include {\bf \verb{--{with-sqlite}.
+include {\bf \verb:--:with-sqlite}.
\subsection*{Installing and Configuring SQLite -- Phase II}
\label{phase2}
\index[general]{Testing SQLite }
\addcontentsline{toc}{subsection}{Testing SQLite}
-As of this date (20 March 2002), we have much less ``production'' experience
-using SQLite than using MySQL. That said, we should note that SQLite has
-performed flawlessly for us in all our testing.
+We have much less "production" experience
+using SQLite than using MySQL. SQLite has
+performed flawlessly for us in all our testing. However,
+several users have reported corrupted databases while using
+SQLite. For that reason, we do not recommend it for production
+use.
\subsection*{Re-initializing the Catalog Database}
\index[general]{Database!Re-initializing the Catalog }
\item Access control lists for Consoles that permit restricting user access
to only their data.
\item Data spooling to disk during backup with subsequent write to tape from
- the spooled disk files. This prevents tape ``shoe shine'' during
+ the spooled disk files. This prevents tape "shoe shine" during
Incremental/Differential backups.
\item Support for save/restore of files larger than 2GB.
\item Support for 64 bit machines, e.g. amd64.
\item Ability to encrypt communications between daemons using stunnel.
\item Support ANSI and IBM tape labels.
-\item Support for Unicode filenames (e.g. Chinese) on Win32 machines.
+\item Support for Unicode filenames (e.g. Chinese) on Win32 machines on
+ version 1.37.28 and greater.
\end{itemize}
and WinXP when they are in use by another program. Anyone knowing the magic
incantations, please step forward. The files that are skipped seem to be in
exclusive use by some other process, and don't appear to be too important.
+
+ Volume Shadow Copy (VSS) is now (July 2005) implemented in the Bacula Win32 File
+ daemon. The code is there, and it is being tested, but it is not yet
+ released.
+\item Path and filenames longer than 260 characters on Win32 systems are
+ not supported. They will be backed up, but they cannot be restored. By
+ using the {\bf Portable=yes} directive in your FileSet, files with
+ long names can be restored to Unix and Linux systems.
+
+ Long filenames for Win32 will be implemented in a later version.
\item If you have over 4 billion file entries stored in your database, the
database FileId is likely to overflow. This is a monster database, but still
possible. At some point, Bacula's FileId fields will be upgraded from 32 bits
to 64 bits and this problem will go away. In the mean time, a good workaround
is to use multiple databases.
\item Files deleted after a Full save will be included in a restoration.
-\item Event handlers are not yet implemented (e.g. when Job terminates do
- this, ...)
\item File System Modules (configurable routines for saving/restoring special
- files).
+ files) are not yet implemented.
\item Data encryption of the Volume contents.
\item Bacula cannot automatically restore files for a single Job
from two or more different storage devices or different media types.
That is, if you use more than one storage device or media type to
backup a single job, the restore process will require some manual
intervention.
-\item There is no concept of a Pool of backup devices (i.e. if device
- /dev/nst0 is busy, use /dev/nst1, ...).
- \end{itemize}
+\end{itemize}
\subsection*{Design Limitations or Restrictions}
\index[general]{Restrictions!Design Limitations or }
\section*{Storage Daemon Configuration}
\label{_ChapterStart31}
-\index[general]{Storage Daemon Configuration }
-\index[general]{Configuration!Storage Daemon }
+\index[general]{Storage Daemon Configuration}
+\index[general]{Configuration!Storage Daemon}
\addcontentsline{toc}{section}{Storage Daemon Configuration}
\subsection*{General}
-\index[general]{General }
+\index[general]{General}
\addcontentsline{toc}{subsection}{General}
The Storage Daemon configuration file has relatively few resource definitions.
\subsection*{Storage Resource}
\label{StorageResource}
-\index[general]{Resource!Storage }
-\index[general]{Storage Resource }
+\index[general]{Resource!Storage}
+\index[general]{Storage Resource}
\addcontentsline{toc}{subsection}{Storage Resource}
In general, the properties specified under the Storage resource define global
\begin{description}
\item [Name = \lt{}Storage-Daemon-Name\gt{}]
- \index[sd]{Name }
+ \index[sd]{Name }
Specifies the Name of the Storage daemon. This directive is required.
\item [Working Directory = \lt{}Directory\gt{}]
- \index[sd]{Working Directory }
+ \index[sd]{Working Directory }
This directive is mandatory and specifies a directory in which the Storage
daemon may put its status files. This directory should be used only by {\bf
- Bacula}, but may be shared by other Bacula daemons. This directive is
+ Bacula}, but may be shared by other Bacula daemons provided the names
+ given to each daemon are unique. This directive is
required
\item [Pid Directory = \lt{}Directory\gt{}]
- \index[sd]{Pid Directory }
+ \index[sd]{Pid Directory }
This directive is mandatory and specifies a directory in which the Director
may put its process Id file files. The process Id file is used to shutdown
Bacula and to prevent multiple copies of Bacula from running simultaneously.
Directory} as defined above.
\item [Heartbeat Interval = \lt{}time-interval\gt{}]
- \index[sd]{Heartbeat Interval }
+ \index[sd]{Heartbeat Interval }
+ \index[general]{Heartbeat Interval}
+ \index[general]{Broken pipe}
This directive defines an interval of time. When the Storage daemon is
waiting for the operator to mount a tape, each time interval, it will
send a heartbeat signal to the File daemon. The default interval is
zero which disables the heartbeat. This feature is particularly useful
if you have a router such as 3Com that does not follow Internet
- standards and times out an inactive connection after a short duration.
+ standards and times out an valid connection after a short duration
+ despite the fact that keepalive is set. This usually results
+ in a broken pipe error message.
\item [Maximum Concurrent Jobs = \lt{}number\gt{}]
- \index[sd]{Maximum Concurrent Jobs }
+ \index[sd]{Maximum Concurrent Jobs}
where \lt{}number\gt{} is the maximum number of Jobs that should run
concurrently. The default is set to 10, but you may set it to a larger
number. Each contact from the Director (e.g. status request, job start
those in the Job and Client resources.
\item [SDAddresses = \lt{}IP-address-specification\gt{}]
- \index[sd]{SDAddresses }
+ \index[sd]{SDAddresses}
Specify the ports and addresses on which the Storage daemon will listen
for Director connections. Normally, the default is sufficient and you
do not need to specify this directive. Probably the simplest way to
ip = {
addr = bluedot.thun.net
}
- }
+}
\end{verbatim}
\normalsize
directives shown below.
\item [SDPort = \lt{}port-number\gt{}]
- \index[sd]{SDPort }
+ \index[sd]{SDPort }
Specifies port number on which the Storage daemon listens for Director
connections. The default is 9103.
\item [SDAddress = \lt{}IP-Address\gt{}]
- \index[sd]{SDAddress }
+ \index[sd]{SDAddress }
This directive is optional, and if it is specified, it will cause the Storage
daemon server (for Director and File daemon connections) to bind to the
specified {\bf IP-Address}, which is either a domain name or an IP address
\subsection*{Director Resource}
\label{DirectorResource1}
-\index[general]{Director Resource }
-\index[general]{Resource!Director }
+\index[general]{Director Resource}
+\index[general]{Resource!Director}
\addcontentsline{toc}{subsection}{Director Resource}
The Director resource specifies the Name of the Director which is permitted
\begin{description}
\item [Name = \lt{}Director-Name\gt{}]
- \index[sd]{Name }
+ \index[sd]{Name }
Specifies the Name of the Director allowed to connect to the Storage daemon.
This directive is required.
\item [Password = \lt{}Director-password\gt{}]
- \index[sd]{Password }
+ \index[sd]{Password }
Specifies the password that must be supplied by the above named Director.
This directive is required.
\item [Monitor = \lt{}yes|no\gt{}]
- \index[sd]{Monitor }
+ \index[sd]{Monitor }
If Monitor is set to {\bf no} (default), this director will have full
access to this Storage daemon. If Monitor is set to {\bf yes}, this
director will only be able to fetch the current status of this Storage
\label{DeviceResource}
\subsection*{Device Resource}
-\index[general]{Resource!Device }
-\index[general]{Device Resource }
+\index[general]{Resource!Device}
+\index[general]{Device Resource}
\addcontentsline{toc}{subsection}{Device Resource}
The Device Resource specifies the details of each device (normally a tape
\begin{description}
\item [Name = {\it Device-Name}]
- \index[sd]{Name }
+ \index[sd]{Name }
Specifies the Name that the Director will use when asking to backup or
restore to or from to this device. This is the logical Device name, and may
be any string up to 127 characters in length. It is generally a good idea to
resource.
\item [Archive Device = {\it name-string}]
- \index[sd]{Archive Device }
+ \index[sd]{Archive Device }
The specified {\bf name-string} gives the system file name of the storage
device managed by this storage daemon. This will usually be the device file
- name of a removable storage device (tape drive), for example ``{\bf
- /dev/nst0}'' or ``{\bf /dev/rmt/0mbn}''. For a DVD-writer, it will be for
+ name of a removable storage device (tape drive), for example "{\bf
+ /dev/nst0}" or "{\bf /dev/rmt/0mbn}". For a DVD-writer, it will be for
example {\bf /dev/hdc}. It may also be a directory name if you are archiving
to disk storage. In this case, you must supply the full absolute path to the
directory. When specifying a tape device, it is preferable that the
- ``non-rewind'' variant of the device file name be given. In addition, on
+ "non-rewind" variant of the device file name be given. In addition, on
systems such as Sun, which have multiple tape access methods, you must be
sure to specify to use Berkeley I/O conventions with the device. The {\bf b}
in the Solaris (Sun) archive specification {\bf /dev/rmt/0mbn} is what is
The Archive Device directive is required.
\item [Media Type = {\it name-string}]
- \index[sd]{Media Type }
+ \index[sd]{Media Type }
The specified {\bf name-string} names the type of media supported by this
- device, for example, ``DLT7000''. Media type names are arbitrary in that you
+ device, for example, "DLT7000". Media type names are arbitrary in that you
set it to anything you want, but must be known to the volume database to keep
track of which storage daemons can read which volumes. The same {\bf
name-string} must appear in the appropriate Storage resource definition in
have a single Storage daemon, but it is with multiple Storage daemons,
especially if they have incompatible media.
- For example, if you specify a Media Type of ``DDS-4'' then during the
+ For example, if you specify a Media Type of "DDS-4" then during the
restore, Bacula will be able to choose any Storage Daemon that handles
- ``DDS-4''. If you have an autochanger, you might want to name the Media Type
+ "DDS-4". If you have an autochanger, you might want to name the Media Type
in a way that is unique to the autochanger, unless you wish to possibly use
the Volumes in other drives. You should also ensure to have unique Media
Type names if the Media is not compatible between drives. This specification
\label{Autochanger}
\item [Autochanger = {\it Yes|No}]
- \index[sd]{Autochanger }
- If {\bf Yes}, this device is an automatic tape changer, and you should also
+ \index[sd]{Autochanger}
+ If {\bf Yes}, this device belongs to an automatic tape changer, and you should also
specify a {\bf Changer Device} as well as a {\bf Changer Command}. If {\bf
- No} (default), the volume must be manually changed. You might also want to
- add an identical directive to the
- \ilink{ Storage resource}{Autochanger1} in the Director's
+ No} (default), the volume must be manually changed. You should also
+ have an identical directive to the
+ \ilink{Storage resource}{Autochanger1} in the Director's
configuration file so that when labeling tapes you are prompted for the slot.
-
\item [Changer Device = {\it name-string}]
- \index[sd]{Changer Device }
- The specified {\bf name-string} gives the system file name of the autochanger
- device name that corresponds to the {\bf Archive Device} specified. This
- device name is specified if you have an autochanger or if you want to use the
- {\bf Alert Command} (see below). Normally you will specify the {\bf generic
- SCSI} device name in this directive. For example, on Linux systems, for
- archive device {\bf /dev/nst0}, This directive is optional. See the
- \ilink{ Using Autochangers}{_ChapterStart18} chapter of this
- manual for more details of using this and the following autochanger
- directives.
+ \index[sd]{Changer Device }
+ The specified {\bf name-string} must be the {\bf generic SCSI} device
+ name of the autochanger that corresponds to the normal read/write
+ {\bf Archive Device} specified in the Device resource. This
+ gemeric SCSI device name should be specified if you have an autochanger
+ or if you have a standard tape drive and want to use the
+ {\bf Alert Command} (see below). For example, on Linux systems, for
+ an Archive Device name of {\bf /dev/nst0}, you would specify {\bf
+ /dev/sg0} for the Changer Device name. Depending on your exact
+ configuration, and the number of autochangers or the type of
+ autochanger, what you specify here can vary. This directive is
+ optional. See the \ilink{ Using Autochangers}{_ChapterStart18} chapter
+ of this manual for more details of using this and the following
+ autochanger directives.
\item [Changer Command = {\it name-string}]
- \index[sd]{Changer Command }
+ \index[sd]{Changer Command }
The {\bf name-string} specifies an external program to be called that will
automatically change volumes as required by {\bf Bacula}. Most frequently,
you will specify the Bacula supplied {\bf mtx-changer} script as follows:
scripts in {\bf examples/autochangers}.
\item [Alert Command = {\it name-string}]
- \index[sd]{Alert Command }
+ \index[sd]{Alert Command }
The {\bf name-string} specifies an external program to be called at the
completion of each Job after the device is released. The purpose of this
command is to check for Tape Alerts, which are present when something is
\normalsize
\item [Drive Index = {\it number}]
- \index[sd]{Drive Index }
+ \index[sd]{Drive Index}
The {\bf Drive Index} that you specify is passed to the {\bf mtx-changer}
script and is thus passed to the {\bf mtx} program. By default, the Drive
Index is zero, so if you have only one drive in your autochanger, everything
Volume on both drives at the same time. You may also need to modify the
mtx-changer script to do locking so that two jobs don't attempt to use the
autochanger at the same time. An example script can be found in {\bf
- examples/autochangers/locking-mtx-changer}.
+ examples/autochangers/locking-mtx-changer}.
+
+\item [Autoselect = {\it Yes|No}]
+ \index[sd]{Autoselect}
+ If this directive is set to {\bf yes} (default), and the Device
+ belongs to an autochanger, then when the Autochanger is referenced
+ by the Director, this device can automatically be selected. If this
+ directive is set to {\bf no}, then the Device can only be referenced
+ by directly using the Device name in the Director. This is useful
+ for reserving a drive for something special such as a high priority
+ backup or restore operations.
\item [Maximum Changer Wait = {\it time}]
- \index[sd]{Maximum Changer Wait }
+ \index[sd]{Maximum Changer Wait }
This directive specifies the maximum time for Bacula to wait for an
autochanger to change the volume. If this time is exceeded, Bacula will
invalidate the Volume slot number stored in the catalog and try again. If no
The default time out is 5 minutes.
\item [Always Open = {\it Yes|No}]
- \index[sd]{Always Open }
+ \index[sd]{Always Open }
If {\bf Yes} (default), Bacula will always keep the device open unless
specifically {\bf unmounted} by the Console program. This permits Bacula to
ensure that the tape drive is always available. If you set {\bf AlwaysOpen}
operation.
\item [Volume Poll Interval = {\it time}]
- \index[sd]{Volume Poll Interval }
+ \index[sd]{Volume Poll Interval }
If the time specified on this directive is non-zero, after asking the
operator to mount a new volume Bacula will periodically poll (or read) the
drive at the specified interval to see if a new volume has been mounted. If
directives.
\item [Close on Poll= {\it Yes|No}]
- \index[sd]{Close on Poll }
+ \index[sd]{Close on Poll}
If {\bf Yes}, Bacula close the device (equivalent to an unmount except no
mount is required) and reopen it at each poll. Normally this is not too
useful unless you have the {\bf Offline on Unmount} directive set, in which
the drive on the next poll and automatically continue with the backup.
\item [Maximum Open Wait = {\it time}]
- \index[sd]{Maximum Open Wait }
+ \index[sd]{Maximum Open Wait }
This directive specifies the maximum amount of time that Bacula will wait for
a device that is busy. The default is 5 minutes. If the device cannot be
obtained, the current Job will be terminated in error. Bacula will re-attempt
to open the drive the next time a Job starts that needs the the drive.
\item [Removable media = {\it Yes|No}]
- \index[sd]{Removable media }
+ \index[sd]{Removable media }
If {\bf Yes}, this device supports removable media (for example, tapes or
CDs). If {\bf No}, media cannot be removed (for example, an intermediate
backup area on a hard disk).
\item [Random access = {\it Yes|No}]
- \index[sd]{Random access }
+ \index[sd]{Random access }
If {\bf Yes}, the archive device is assumed to be a random access medium
which supports the {\bf lseek} (or {\bf lseek64} if Largefile is enabled
during configuration) facility.
\item [Minimum block size = {\it size-in-bytes}]
- \index[sd]{Minimum block size }
+ \index[sd]{Minimum block size }
On most modern tape drives, you will not need or wamt to specify this directive, and
if you do so, it will be to make Bacula use fixed block sizes. This
statement applies only to non-random access devices (e.g. tape drives).
\normalsize
\item [Maximum block size = {\it size-in-bytes}]
- \index[sd]{Maximum block size }
+ \index[sd]{Maximum block size }
On most modern tape drives, you will not need to specify this directive. If
you do so, it will most likely be to use fixed block sizes (see Minimum block
size above). The Storage daemon will aways attempt to write blocks of the
default block size of 64,512 bytes (126 * 512).
\item [Hardware End of Medium = {\it Yes|No}]
- \index[sd]{Hardware End of Medium }
+ \index[sd]{Hardware End of Medium }
If {\bf No}, the archive device is not required to support end of medium
ioctl request, and the storage daemon will use the forward space file
function to find the end of the recorded data. If {\bf Yes}, the archive
Default setting for Hardware End of Medium is {\bf Yes}. This function is
used before appending to a tape to ensure that no previously written data is
- lost. We recommend if you have a non standard or unusual tape drive that you
+ lost. We recommend if you have a non-standard or unusual tape drive that you
use the {\bf btape} program to test your drive to see whether or not it
supports this function. All modern (after 1998) tape drives support this
feature.
- If you set Hardware End of Medium = no, you should also set {\bf Fast Forward
- Space File = no}. If you do not, Bacula will most likely be unable to
- correctly find the end of data on the tape.
-
\item [Fast Forward Space File = {\it Yes|No}]
- \index[sd]{Fast Forward Space File }
+ \index[sd]{Fast Forward Space File }
If {\bf No}, the archive device is not required to support keeping track of
the file number ({\bf MTIOCGET} ioctl) during forward space file. If {\bf
Yes}, the archive device must support the {\tt ioctl} {\tt MTFSF} call, which
but they do not keep track of the file number or more seriously, they do not
report end of meduim.
- Default setting for Fast Forward Space File is {\bf Yes}. If you disable
- Hardware End of Medium, most likely you should also disable Fast Forward
- Space file. The {\bf test} command in the program {\bf btape} will test this
- feature and advise you if it should be turned off.
+ Default setting for Fast Forward Space File is {\bf Yes}.
\item [Use MTIOCGET = {\it Yes|No}]
- \index[sd]{Fast Forward Space File }
+ \index[sd]{Fast Forward Space File }
If {\bf No}, the operating system is not required to support keeping track of
the file number and reporting it in the ({\bf MTIOCGET} ioctl). The default
is {\bf Yes}. If you must set this to No, Bacula will do the proper file
position determination, but it is very unfortunate because it means that
tape movement is very inefficient.
- Fortunately, this operation system deficiency seems to be the case only on
- a few *BSD systems. Operating systems known to work correctly are Solaris, Linux
- and FreeBSD.
+ Fortunately, this operation system deficiency seems to be the case only
+ on a few *BSD systems. Operating systems known to work correctly are
+ Solaris, Linux and FreeBSD.
\item [BSF at EOM = {\it Yes|No}]
- \index[sd]{BSF at EOM }
+ \index[sd]{BSF at EOM }
If {\bf No}, the default, no special action is taken by Bacula with the End
of Medium (end of tape) is reached because the tape will be positioned after
the last EOF tape mark, and Bacula can append to the tape as desired.
is done using the {\bf test} command in the {\bf btape} program.
\item [TWO EOF = {\it Yes|No}]
- \index[sd]{TWO EOF }
+ \index[sd]{TWO EOF }
If {\bf Yes}, Bacula will write two end of file marks when terminating a tape
-- i.e. after the last job or at the end of the medium. If {\bf No}, the
default, Bacula will only write one end of file to terminate the tape.
precautionary rather than required.
\item [Backward Space File = {\it Yes|No}]
- \index[sd]{Backward Space File }
+ \index[sd]{Backward Space File }
If {\it Yes}, the archive device supports the {\bf MTBSF} and {\bf MTBSF
ioctl}s to backspace over an end of file mark and to the start of a file. If
{\it No}, these calls are not used and the device must be rewound and
random-access devices.
\item [Forward Space Record = {\it Yes|No}]
- \index[sd]{Forward Space Record }
+ \index[sd]{Forward Space Record }
If {\it Yes}, the archive device must support the {\bf MTFSR ioctl} to
forward space over records. If {\bf No}, data must be read in order to
advance the position on the device. Default is {\bf Yes} for non
random-access devices.
\item [Forward Space File = {\it Yes|No}]
- \index[sd]{Forward Space File }
+ \index[sd]{Forward Space File }
If {\bf Yes}, the archive device must support the {\tt MTFSF ioctl} to
forward space by file marks. If {\it No}, data must be read to advance the
position on the device. Default is {\bf Yes} for non random-access devices.
\item [Offline On Unmount = {\it Yes|No}]
- \index[sd]{Offline On Unmount }
+ \index[sd]{Offline On Unmount }
The default for this directive is {\bf No}. If {\bf Yes} the archive device
must support the {\tt MTOFFL ioctl} to rewind and take the volume offline. In
this case, Bacula will issue the offline (eject) request before closing the
confused.
\item [Maximum Volume Size = {\it size}]
- \index[sd]{Maximum Volume Size }
+ \index[sd]{Maximum Volume Size }
No more than {\bf size} bytes will be written onto a given volume on the
archive device. This directive is used mainly in testing Bacula to simulate a
small Volume. It can also be useful if you wish to limit the size of a File
configuration file.
\item [Maximum File Size = {\it size}]
- \index[sd]{Maximum File Size }
+ \index[sd]{Maximum File Size }
No more than {\bf size} bytes will be written into a given logical file on
the volume. Once this size is reached, an end of file mark is written on the
volume and subsequent data are written into the next file. Breaking long
the volume. The default is one Gigabyte.
\item [Block Positioning = {\it yes|no}]
- \index[sd]{Block Positioning }
+ \index[sd]{Block Positioning }
This directive is not normally used (and has not yet been tested). It will
tell Bacula not to use block positioning when it is reading tapes. This can
cause Bacula to be {\bf extremely} slow when restoring files. You might use
hope, Bacula will be able to re-read your tapes.
\item [Maximum Network Buffer Size = {\it bytes}]
- \index[sd]{Maximum Network Buffer Size }
+ \index[sd]{Maximum Network Buffer Size }
where {\it bytes} specifies the initial network buffer size to use with the
File daemon. This size will be adjusted down if it is too large until it is
accepted by the OS. Please use care in setting this value since if it is too
require a large number of system calls. The default value is 32,768 bytes.
\item [Maximum Spool Size = {\it bytes}]
- \index[sd]{Maximum Spool Size }
+ \index[sd]{Maximum Spool Size }
where the bytes specify the maximum spool size for all jobs that are running.
The default is no limit.
\item [Maximum Job Spool Size = {\it bytes}]
- \index[sd]{Maximum Job Spool Size }
+ \index[sd]{Maximum Job Spool Size }
where the bytes specify the maximum spool size for any one job that is
running. The default is no limit.
This directive is implemented only in version 1.37 and later.
\item [Spool Directory = {\it directory}]
- \index[sd]{Spool Directory }
+ \index[sd]{Spool Directory }
specifies the name of the directory to be used to store the spool files for
-this device. This directory is also used to store temporary part files when
-writing to a device that requires mount (DVD). The default is to use the
-working directory.
+ this device. This directory is also used to store temporary part files when
+ writing to a device that requires mount (DVD). The default is to use the
+ working directory.
\item [Maximum Part Size = {\it bytes}]
- \index[sd]{Maximum Part Size }
+ \index[sd]{Maximum Part Size }
This is the maximum size of a volume part file. The default is no limit.
This directive is implemented only in version 1.37 and later.
\end{description}
\subsection*{Devices that require a mount (DVD)}
-\index[general]{Devices that require a mount (DVD) }
-\index[general]{DVD!Devices that require a mount }
+\index[general]{Devices that require a mount (DVD)}
+\index[general]{DVD!Devices that require a mount}
\addcontentsline{toc}{subsection}{Devices that require a mount (DVD)}
All the directives in this section are implemented only in
\begin{description}
\item [Requires Mount = {\it Yes|No}]
- \index[sd]{Requires Mount }
+ \index[sd]{Requires Mount }
You must set this directive to {\bf yes} for DVD-writers, and to {\bf no} for
all other devices (tapes/files). This directive indicates if the device
requires to be mounted to be read, and if it must be written in a special way.
{\bf Write Part Command} directives must also be defined.
\item [Mount Point = {\it directory}]
- \index[sd]{Mount Point }
- Directory where the device must be mounted.
+ \index[sd]{Mount Point }
+ Directory where the device can be mounted.
\item [Mount Command = {\it name-string}]
- \index[sd]{Mount Command }
+ \index[sd]{Mount Command }
Command that must be executed to mount the device. Before the command is
executed, \%a is replaced with the Archive Device, and \%m with the Mount
Point.
\footnotesize
\begin{verbatim}
-Mount Command = "/bin/mount -t iso9660 -o ro %a %m"
-
+ Mount Command = "/bin/mount -t iso9660 -o ro %a %m"
\end{verbatim}
\normalsize
\item [Unmount Command = {\it name-string}]
- \index[sd]{Unmount Command }
+ \index[sd]{Unmount Command }
Command that must be executed to unmount the device. Before the command is
executed, \%a is replaced with the Archive Device, and \%m with the Mount
Point.
\footnotesize
\begin{verbatim}
-Unmount Command = "/bin/umount %m"
-
+ Unmount Command = "/bin/umount %m"
\end{verbatim}
\normalsize
\item [Write Part Command = {\it name-string}]
- \index[sd]{Write Part Command }
+ \index[sd]{Write Part Command }
Command that must be executed to write a part to the device. Before the
command is executed, \%a is replaced with the Archive Device, \%m with the
- Mount Point, \%n with the current part number (0-based), and \%v with the
- current part filename.
+ Mount Point, \%e is replaced with 1 if we are writing the first part,
+ and with 0 otherwise, and \%v with the current part filename.
For a DVD, you will most frequently specify the Bacula supplied {\bf
dvd-writepart} script as follows:
\footnotesize
\begin{verbatim}
-Write Part Command = "/path/dvd-writepart %n %a %v"
-
+ Write Part Command = "/path/dvd-writepart %e %a %v"
\end{verbatim}
\normalsize
+ Where {\bf /path} is the path to your scripts install directory, and
+ dvd-writepart is the Bacula supplied script file.
+ This command will already be present, but commented out,
+ in the default bacula-sd.conf file. To use it, simply remove
+ the comment (\#) symbol.
+
+
\item [Free Space Command = {\it name-string}]
- \index[sd]{Free Space Command }
+ \index[sd]{Free Space Command }
Command that must be executed to check how much free space is left on the
- device. Before the command is executed, \%a is replaced with the Archive
- Device, \%m with the Mount Point, \%n with the current part number (0-based),
- and \%v with the current part filename.
+ device. Before the command is executed,\%a is replaced with the Archive
+ Device, \%m with the Mount Point, \%e is replaced with 1 if we are writing
+ the first part, and with 0 otherwise, and \%v with the current part filename.
For a DVD, you will most frequently specify the Bacula supplied {\bf
dvd-freespace} script as follows:
\footnotesize
\begin{verbatim}
-Free Space Command = "/path/dvd-freespace %n %a"
-
+ Free Space Command = "/path/dvd-freespace %a"
\end{verbatim}
\normalsize
-If you want to specify your own command, please look at the code of
-dvd-freespace to see what output Bacula expects from this command.
+ Where {\bf /path} is the path to your scripts install directory, and
+ dvd-freespace is the Bacula supplied script file.
+ If you want to specify your own command, please look at the code of
+ dvd-freespace to see what output Bacula expects from this command.
+ This command will already be present, but commented out,
+ in the default bacula-sd.conf file. To use it, simply remove
+ the comment (\#) symbol.
-If you do not set it, Bacula will expect there is always free space on the
-device.
+ If you do not set it, Bacula will expect there is always free space on the
+ device.
\end{description}
\input{autochangerres}
\subsection*{Capabilities}
-\index[general]{Capabilities }
+\index[general]{Capabilities}
\addcontentsline{toc}{subsection}{Capabilities}
\begin{description}
\item [Label media = {\it Yes|No}]
- \index[sd]{Label media }
+ \index[sd]{Label media }
If {\bf Yes}, permits this device to automatically label blank media without
an explicit operator command. It does so by using an internal algorithm as
defined on the
- \ilink{Label Format }{Label} record in each Pool resource. If
+ \ilink{Label Format}{Label} record in each Pool resource. If
this is {\bf No} as by default, Bacula will label tapes only by specific
operator command ({\bf label} in the Console) or when the tape has been
recycled. The automatic labeling feature is most useful when writing to disk
rather than tape volumes.
\item [Automatic mount = {\it Yes|No}]
- \index[sd]{Automatic mount }
- If {\bf Yes} (the default), permits the daemon to examine the device to
- determine if it contains a Bacula labeled volume. This is done initially when
- the daemon is started, and then at the beginning of each job. This directive
- is particularly important if you have set {\bf Always Open = no} because it
- permits Bacula to attempt to read the device before asking the system
- operator to mount a tape.
+ \index[sd]{Automatic mount }
+ If {\bf Yes} (the default), permits the daemon to examine the device to
+ determine if it contains a Bacula labeled volume. This is done
+ initially when the daemon is started, and then at the beginning of each
+ job. If the This directive is particularly important if you have set
+ {\bf Always Open = no} because it permits Bacula to attempt to read the
+ device before asking the system operator to mount a tape. However,
+ please note that the tape must be mounted before the job begins.
\end{description}
\subsection*{Messages Resource}
\label{MessagesResource1}
-\index[general]{Resource!Messages }
-\index[general]{Messages Resource }
+\index[general]{Resource!Messages}
+\index[general]{Messages Resource}
\addcontentsline{toc}{subsection}{Messages Resource}
For a description of the Messages Resource, please see the
\subsection*{Sample Storage Daemon Configuration File}
\label{SampleConfiguration}
-\index[general]{File!Sample Storage Daemon Configuration }
-\index[general]{Sample Storage Daemon Configuration File }
+\index[general]{File!Sample Storage Daemon Configuration}
+\index[general]{Sample Storage Daemon Configuration File}
\addcontentsline{toc}{subsection}{Sample Storage Daemon Configuration File}
A example Storage Daemon configuration file might be the following:
#
# Default Bacula Storage Daemon Configuration file
#
-# For Bacula release 1.35.2 (16 August 2004) -- gentoo 1.4.16
+# For Bacula release 1.37.2 (07 July 2005) -- gentoo 1.4.16
#
# You may need to change the name of your tape drive
# on the "Archive Device" directive in the Device
# To connect, the Director's bacula-dir.conf must have the
# same Name and MediaType.
#
+Autochanger {
+ Name = Autochanger
+ Device = Drive-1
+ Device = Drive-2
+ Changer Command = "/home/kern/bacula/bin/mtx-changer %c %o %S %a %d"
+ Changer Device = /dev/sg0
+}
+
+Device {
+ Name = Drive-1 #
+ Drive Index = 0
+ Media Type = DLT-8000
+ Archive Device = /dev/nst0
+ AutomaticMount = yes; # when device opened, read it
+ AlwaysOpen = yes;
+ RemovableMedia = yes;
+ RandomAccess = no;
+ AutoChanger = yes
+ Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'"
+}
+
+Device {
+ Name = Drive-2 #
+ Drive Index = 1
+ Media Type = DLT-8000
+ Archive Device = /dev/nst1
+ AutomaticMount = yes; # when device opened, read it
+ AlwaysOpen = yes;
+ RemovableMedia = yes;
+ RandomAccess = no;
+ AutoChanger = yes
+ Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'"
+}
+
Device {
Name = "HP DLT 80"
Media Type = DLT8000
# MountCommand = "/bin/mount -t iso9660 -o ro %a %m";
# UnmountCommand = "/bin/umount %m";
# SpoolDirectory = /tmp/backup;
-# WritePartCommand = "/etc/bacula/dvd-writepart %n %a %v"
-# FreeSpaceCommand = "/etc/bacula/dvd-freespace %a %n"
+# WritePartCommand = "/etc/bacula/dvd-writepart %e %a %v"
+# FreeSpaceCommand = "/etc/bacula/dvd-freespace %a"
#}
#
# A very old Exabyte with no end of media detection
\index[general]{Practical Details }
\addcontentsline{toc}{subsubsection}{Practical Details}
-The simplest way to ``force'' Bacula to use a different tape each day is to
+The simplest way to "force" Bacula to use a different tape each day is to
define a different Pool for each day of the the week a backup is done. In
addition, you will need to specify appropriate Job and File retention periods
so that Bacula will relabel and overwrite the tape each week rather than
#
OPENSSL=openssl
umask 77
- PEM1=`/bin/mktemp openssl.XXXXXX`
- PEM2=`/bin/mktemp openssl.XXXXXX`
+ PEM1="/bin/mktemp openssl.XXXXXX"
+ PEM2="/bin/mktemp openssl.XXXXXX"
${OPENSSL} req -newkey rsa:1024 -keyout $PEM1 -nodes \
-x509 -days 365 -out $PEM2
cat $PEM1 > stunnel.pem
\index[general]{Autochangers!Supported}
\addcontentsline{toc}{subsection}{Supported Autochanger Models}
-I hesitate to call these ``supported'' autochangers because the only
-autochanger that I have in my possession and am able to test is the HP
-SureStore DAT40X6. All the other autochangers have been reported to work by
-Bacula users. Note, in the Capacity/Slot column below, I quote the Compressed
-capacity per tape (or Slot).
+I hesitate to call these "supported" autochangers because the only
+autochangers that I have in my possession and am able to test are the HP
+SureStore DAT40X6 and the Overland PowerLoader LTO-2. All the other
+autochangers have been reported to work by Bacula users. Note, in the
+Capacity/Slot column below, I quote the Compressed capacity per tape (or
+Slot).
\addcontentsline{lot}{table}{Autochangers Known to Work with Bacula}
\multicolumn{1}{|c| }{\bf OS } & \multicolumn{1}{c| }{\bf Man. } &
\multicolumn{1}{c| }{\bf Media } & \multicolumn{1}{c| }{\bf Model } &
\multicolumn{1}{c| }{\bf Slots } & \multicolumn{1}{c| }{\bf Cap/Slot } \\
+ \hline {Linux } & {Adic } & {DDS-3} & {Adic 1200G } & {12} & {-} \\
+ \hline {Linux } & {Adic } & {DLT} & {FastStore 4000 } & {7} & {20GB} \\
\hline {Linux } & {Adic } & {LTO-1/2, SDLT 320 } & {Adic Scalar 24 } & {24} & {100GB } \\
\hline {Linux } & {Adic } & {LTO-2 } & {Adic FastStor 2, Sun Storedge L8 } & {8} & {200GB } \\
\hline {- } & {CA-VM } & {?? } & {Tape } & {??} & {?? } \\
- \hline {- } & {Dell } & {LTO-2 } & {PowerVault 132T/136T } & {-} & {100GB } \\
+ \hline {Linux Gentoo} & {Dell} & {DLT VI,LTO-2} & {PowerVault 122T/132T/136T } & {-} & {100GB } \\
\hline {- } & {DFSMS } & {?? } & {VM RMM} & {-} & {?? } \\
\hline {z/VM } & {IBM } & {?? } & {IBM Tape Manager } & {-} & {?? } \\
\hline {z/VM } & {IBM } & {?? } & {native tape } & {-} & {?? } \\
\hline {Linux } & {Exabyte } & {VXA2 } & {VXA PacketLoader 1x10 2U } & {10} & {80/160GB } \\
+ \hline {- } & {Exabyte } & {LTO } & {Magnum 1x7 LTO Tape Auotloader } & {7} & {200/400GB } \\
\hline {Linux Gentoo 1.4 } & {Exabyte } & {AIT-2 } & {215A } & {15 (2 drives)} & {50GB } \\
\hline {Linux } & {HP } & {DDS-4 } & {SureStore DAT-40X6 } & {6 } & {40GB } \\
\hline {Linux } & {HP } & {Ultrium-2/LTO } & {MSL 6000/ 60030/ 5052 } & {28 } & {200/400GB } \\
\hline {- } & {HP } & {DLT } & {A4853 DLT } & {30} & {40/70GB } \\
\hline {Linux } & {HP (Compaq) } & {DLT VI } & {Compaq TL-895 } & {96+4 import export} & {35/70GB } \\
\hline {SuSE 9.0 } & {IBM } & {LTO } & {IBM 3581 Ultrium Tape Loader } & {7} & {200/400GB } \\
- \hline {- } & {Overland } & {LTO } & {Overland LoaderXpress LTO } & {10-19} & {100GB } \\
+ \hline {FreeBSD 5.4} & {IBM } & {DLT} & {IBM 3502-R14 -- rebranded ATL L-500} & {14} & {35/70GB } \\
+ \hline {Debian} & {Overland } & {LTO } & {Overland LoaderXpress LTO/DLT8000 } & {10-19} & {40-100GB } \\
+ \hline {Fedora} & {Overland } & {LTO } & {Overland PowerLoader LTO-2 } & {10-19} & {200/400GB } \\
\hline {FreeBSD 5.4-Stable} & {Overland} & {LTO-2} & {Overland Powerloader tape} & {17} & {100GB } \\
- \hline {- } & {Overland } & {LTO } & {Overland Neo2000 LTO } & {26-30} & {100GB } \\
+ \hline {- } & {Overland} & {LTO } & {Overland Neo2000 LTO } & {26-30} & {100GB } \\
\hline {- } & {Quantum } & {?? } & {Super Loader } & {??} & {?? } \\
\hline {FreeBSD 4.9 } & {QUALSTAR TLS-4210 (Qualstar) } & {AIT1: 36GB, AIT2: 50GB all
uncomp } & {QUALSTAR TLS-4210 } & {12} & {AIT1: 36GB, AIT2: 50GB all uncomp }\\
\hline {Linux } & {Skydata } & {DLT } & {ATL-L200 } & {8} & {40/80 } \\
\hline {- } & {Sony } & {DDS-4 } & {TSL-11000 } & {8} & {40GB } \\
- \hline {Linux } & {Sony } & {AIT-2 } & {LIB-304(SDX-500C) } & {?} & {200GB } \\
+ \hline {Linux } & {Sony } & {AIT-2} & {LIB-304(SDX-500C) } & {?} & {200GB } \\
+ \hline {Linux } & {Sony } & {AIT-3} & {LIB-D81) } & {?} & {200GB } \\
\hline {FreeBSD 4.9-STABLE } & {Sony } & {AIT-1 } & {TSL-SA300C } & {4} & {45/70GB }\\
\hline {- } & {Storagetek } & {DLT } & {Timberwolf DLT } & {6} & {40/70 } \\
\hline {- } & {Storagetek } & {?? } & {ACSLS } & {??} & {?? } \\
\multicolumn{1}{c| }{\bf Capacity } \\
\hline {- } & {ADIC } & {DLT } & {Adic Scalar 100 DLT } & {100GB } \\
\hline {- } & {ADIC } & {DLT } & {Adic Fastor 22 DLT } & {- } \\
+ \hline {FreeBSD 5.4-RELEASE-p1 amd64 } & {Certance} & {LTO } & {AdicCertance CL400 LTO Ultrium 2 } & {200GB } \\
\hline {- } & {- } & {DDS } & {Compaq DDS 2,3,4 } & {- } \\
+ \hline {SuSE 8.1 Pro} & {Compaq} & {AIT } & {Compaq AIT 35 LVD } & {35/70GB } \\
\hline {- } & {Exabyte } & {- } & {Exabyte drives less than 10 years old } & {- } \\
\hline {- } & {Exabyte } & {- } & {Exabyte VXA drives } & {- } \\
\hline {- } & {HP } & {Travan 4 } & {Colorado T4000S } & {- } \\
\hline {- } & {Overland } & {LTO } & {LoaderXpress LTO } & {- } \\
\hline {- } & {Overland } & {- } & {Neo2000 } & {- } \\
\hline {- } & {OnStream } & {- } & {OnStream drives (see below) } & {- } \\
+ \hline {FreeBSD 4.11-Release} & {Quantum } & {SDLT } & {SDLT320 } & {160/320GB } \\
\hline {- } & {Quantum } & {DLT } & {DLT-8000 } & {40/80GB } \\
\hline {Linux } & {Seagate } & {DDS-4 } & {Scorpio 40 } & {20/40GB } \\
\hline {FreeBSD 4.9 STABLE } & {Seagate } & {DDS-4 } & {STA2401LW } & {20/40GB } \\
\index[general]{Aware!FreeBSD Users Be }
\addcontentsline{toc}{subsection}{FreeBSD Users Be Aware!!!}
-Unless you have patched the pthreads library on most FreeBSD systems, you will
+Unless you have patched the pthreads library on FreeBSD 4.11 systems, you will
lose data when Bacula spans tapes. This is because the unpatched pthreads
library fails to return a warning status to Bacula that the end of the tape is
-near. Please see the
+near. This problem is fixed in FreeBSD systems released after 4.11. Please see the
\ilink{Tape Testing Chapter}{FreeBSDTapes} of this manual for
{\bf important} information on how to configure your tape drive for
compatibility with Bacula.
For information on supported autochangers, please see the
\ilink{Autochangers Known to Work with Bacula}{Models}
section of the Supported Autochangers chapter of this manual.
+
+\subsection*{Tape Specifications}
+\index[general]{Specifications!Tape}
+\index[general]{Tape Specifications}
+\addcontentsline{toc}{subsection}{Tape Specifications}
+If you want to know what tape drive to buy that will work with Bacula,
+we really cannot tell you. However, we can say that if you are going
+to buy a drive, you should try to avoid DDS drives. The technology is
+rather old and DDS tape drives need frequent cleaning. DLT drives are
+generally much better (newer technology) and do not need frequent
+cleaning.
+
+Below, you will find a table of DLT and LTO tape specifications that will
+give you some idea of the capacity and speed of modern tapes. The
+capacities that are listed are the native tape capacity without compression.
+All modern drives have hardware compression, and manufacturers often list
+compressed capacity using a compression ration of 2:1. The actual compression
+ratio will depend mostly on the data you have to backup, but I find that
+1.5:1 is a much more reasonable number (i.e. multiply the value shown in
+the table by 1.5 to get a rough average of what you will probably see).
+The transfer rates are rounded to the nearest GB/hr. All values are provided
+by various manufacturers.
+
+The Media Type is what is designated by the manufacturers and you are not
+required to use (but you may) the same name in your Bacula conf resources.
+
+
+\begin{tabular}{|c|c|c|c}
+Media Type & Drive Type & Media Capacity & Transfer Rate \\ \hline
+DDS-1 & DAT & 2 GB & ?? GB/hr \\ \hline
+DDS-2 & DAT & 4 GB & ?? GB/hr \\ \hline
+DDS-3 & DAT & 12 GB & 5.4 GB/hr \\ \hline
+Travan 40 & Travan & 20 GB & ?? GB/hr \\ \hline
+DDS-4 & DAT & 20 GB & 11 GB/hr \\ \hline
+VXA-1 & Exabyte & 33 GB & 11 GB/hr \\ \hline
+DAT-72 & DAT & 36 GB & 13 GB/hr \\ \hline
+DLT IV & DLT8000 & 40 GB & 22 GB/hr \\ \hline
+VXA-2 & Exabyte & 80 GB & 22 GB/hr \\ \hline
+Half-high Ultrum 1 & LTO 1 & 100 GB & 27 GB/hr \\ \hline
+Ultrium 1 & LTO 1 & 100 GB & 54 GB/hr \\ \hline
+Super DLT 1 & SDLT 220 & 110 GB & 40 GB/hr \\ \hline
+VXA-3 & Exabyte & 160 GB & 43 GB/hr \\ \hline
+Super DLT I & SDLT 320 & 160 GB & 58 GB/hr \\ \hline
+Ultrium 2 & LTO 2 & 200 GB & 108 GB/hr \\ \hline
+Super DLT II & SDLT 600 & 300 GB & 127 GB/hr \\ \hline
+VXA-4 & Exabyte & 320 GB & 86 GB/hr \\ \hline
+Ultrium 3 & LTO 3 & 400 GB & 216 GB/hr \\ \hline
+\end{tabular}
can simply change the name to {\bf /lib/tls-broken}) then you must reboot
your machine (one of the few times Linux must be rebooted). If you are not
able to remove/rename /lib/tls, an alternative is to set the environment
-variable ``LD\_ASSUME\_KERNEL=2.4.19'' prior to executing Bacula. For this
+variable "LD\_ASSUME\_KERNEL=2.4.19" prior to executing Bacula. For this
option, you do not need to reboot, and all programs other than Bacula will
continue to use /lib/tls.
\section*{Testing Your Tape Drive With Bacula}
\label{_ChapterStart27}
-\index[general]{Testing Your Tape Drive With Bacula }
+\index[general]{Testing Your Tape Drive With Bacula}
\addcontentsline{toc}{section}{Testing Your Tape Drive With Bacula}
This chapter is concerned with testing and configuring your tape drive to make
\label{summary}
\subsection*{Summary of Steps to Take to Get Your Tape Drive Working}
-\index[general]{Working!Summary of Steps to Take to Get Your Tape Drive }
-\index[general]{Summary of Steps to Take to Get Your Tape Drive Working }
+\index[general]{Working!Summary of Steps to Take to Get Your Tape Drive}
+\index[general]{Summary of Steps to Take to Get Your Tape Drive Working}
\addcontentsline{toc}{subsection}{Summary of Steps to Take to Get Your Tape
Drive Working}
\normalsize
It isn't necessary to run the autochanger part of the test at this time, but
-do not go past this point until the basic test succeeds.
+do not go past this point until the basic test succeeds. If you do have
+an autochanger, please be sure to read the
+\ilink{Autochanger chapter}{_ChapterStart18} of this manual.
+
\item Run the btape {\bf fill} command, preferably with two volumes. This
can take a long time. If you have an autochanger and it is configured, Bacula
will automatically use it. If you do not have it configured, you can manually
-issue the appopriate {\bf mtx} command, or press the autochanger buttons to
-change the tape when requested to do so.
+ issue the appopriate {\bf mtx} command, or press the autochanger buttons to
+ change the tape when requested to do so.
\item FreeBSD users, run the {\bf tapetest} program, and make sure your
system is patched if necessary. See below for more details.
\item Run Bacula, and backup a reasonably small directory, say 60 Megabytes.
\ilink{ Tips for Resolving Problems}{problems1} section below.
\subsubsection*{Specifying the Configuration File}
-\index[general]{File!Specifying the Configuration }
-\index[general]{Specifying the Configuration File }
+\index[general]{File!Specifying the Configuration}
+\index[general]{Specifying the Configuration File}
\addcontentsline{toc}{subsubsection}{Specifying the Configuration File}
Starting with version 1.27, each of the tape utility programs including the
using the {\bf -c} option.
\subsubsection*{Specifying a Device Name For a Tape}
-\index[general]{Tape!Specifying a Device Name For a }
-\index[general]{Specifying a Device Name For a Tape }
+\index[general]{Tape!Specifying a Device Name For a}
+\index[general]{Specifying a Device Name For a Tape}
\addcontentsline{toc}{subsubsection}{Specifying a Device Name For a Tape}
{\bf btape} {\bf device-name} where the Volume can be found. In the case of a
specifying Volume names.
\subsubsection*{Specifying a Device Name For a File}
-\index[general]{File!Specifying a Device Name For a }
-\index[general]{Specifying a Device Name For a File }
+\index[general]{File!Specifying a Device Name For a}
+\index[general]{Specifying a Device Name For a File}
\addcontentsline{toc}{subsubsection}{Specifying a Device Name For a File}
If you are attempting to read or write an archive file rather than a tape, the
\subsection*{btape}
\label{btape1}
-\index[general]{Btape }
+\index[general]{Btape}
\addcontentsline{toc}{subsection}{btape}
This program permits a number of elementary tape operations via a tty command
-b <file> specify bootstrap file
-c <file> set configuration file to file
-d <nn> set debug level to nn
+ -p proceed inspite of I/O errors
-s turn off signals
-v be verbose
-? print this message.
\normalsize
\subsubsection*{Using btape to Verify your Tape Drive}
-\index[general]{Using btape to Verify your Tape Drive }
-\index[general]{Drive!Using btape to Verify your Tape }
+\index[general]{Using btape to Verify your Tape Drive}
+\index[general]{Drive!Using btape to Verify your Tape}
\addcontentsline{toc}{subsubsection}{Using btape to Verify your Tape Drive}
An important reason for this program is to ensure that a Storage daemon
your tape drive.
\subsubsection*{Linux SCSI Tricks}
-\index[general]{Tricks!Linux SCSI }
-\index[general]{Linux SCSI Tricks }
+\index[general]{Tricks!Linux SCSI}
+\index[general]{Linux SCSI Tricks}
\addcontentsline{toc}{subsubsection}{Linux SCSI Tricks}
You can find out what SCSI devices you have by doing:
\end{verbatim}
\normalsize
+The above represents first an autochanger and second a simple
+tape drive. The HP changer (the first entry) uses the same SCSI channel
+for data and for control, so in Bacula, you would use:
+\footnotesize
+\begin{verbatim}
+Archive Device = /dev/nst0
+Changer Device = /dev/sg0
+\end{verbatim}
+\normalsize
+
If you want to remove the SDT-10000 device, you can do so as root with:
\footnotesize
where the 2 0 4 0 are the Host, Channel, Id, and Lun as seen on the output
from {\bf cat /proc/scsi/scsi}. Note, the Channel must be specified as
numeric.
-\label{problems1}
+Below is a slightly more complicated output, which is a single autochanger
+with two drives, and which operates the changer on a different channel
+from from the drives:
+
+\footnotesize
+\begin{verbatim}
+Attached devices:
+Host: scsi0 Channel: 00 Id: 00 Lun: 00
+ Vendor: ATA Model: WDC WD1600JD-75H Rev: 08.0
+ Type: Direct-Access ANSI SCSI revision: 05
+Host: scsi2 Channel: 00 Id: 04 Lun: 00
+ Vendor: HP Model: Ultrium 2-SCSI Rev: F6CH
+ Type: Sequential-Access ANSI SCSI revision: 03
+Host: scsi2 Channel: 00 Id: 05 Lun: 00
+ Vendor: HP Model: Ultrium 2-SCSI Rev: F6CH
+ Type: Sequential-Access ANSI SCSI revision: 03
+Host: scsi2 Channel: 00 Id: 06 Lun: 00
+ Vendor: OVERLAND Model: LXB Rev: 0106
+ Type: Medium Changer ANSI SCSI revision: 02
+\end{verbatim}
+\normalsize
+
+The above tape drives are accessed on /dev/nst0 and /dev/nst1, while
+the control channel for those two drives is /dev/sg3.
+
+
+
+\label{problems1}
\subsection*{Tips for Resolving Problems}
-\index[general]{Problems!Tips for Resolving }
-\index[general]{Tips for Resolving Problems }
+\index[general]{Problems!Tips for Resolving}
+\index[general]{Tips for Resolving Problems}
\addcontentsline{toc}{subsection}{Tips for Resolving Problems}
\label{CannotRestore}
-
\subsubsection*{Bacula Saves But Cannot Restore Files}
-\index[general]{Files!Bacula Saves But Cannot Restore }
-\index[general]{Bacula Saves But Cannot Restore Files }
+\index[general]{Files!Bacula Saves But Cannot Restore}
+\index[general]{Bacula Saves But Cannot Restore Files}
\addcontentsline{toc}{subsubsection}{Bacula Saves But Cannot Restore Files}
If you are getting error messages such as:
tested).
\end{enumerate}
-\label{opendevice}
+If you are getting error messages such as:
+\footnotesize
+\begin{verbatim}
+Volume data error at 0:0!
+Block checksum mismatch in block=0 len=32625 calc=345678 blk=123456
+\end{verbatim}
+\normalsize
+
+You are getting tape read errors, and this is most likely due to
+one of the following things:
+\begin{enumerate}
+\item An old or bad tape.
+\item A dirty drive that needs cleaning (particularly for DDS drives).
+\item A loose SCSI cable.
+\item Old firmware in your drive. Make sure you have the latest firmware
+ loaded.
+\item Computer memory errors.
+\item Over-clocking your CPU.
+\item A bad SCSI card.
+\end{enumerate}
+
+\label{opendevice}
\subsubsection*{Bacula Cannot Open the Device}
-\index[general]{Device!Bacula Cannot Open the }
-\index[general]{Bacula Cannot Open the Device }
+\index[general]{Device!Bacula Cannot Open the}
+\index[general]{Bacula Cannot Open the Device}
\addcontentsline{toc}{subsubsection}{Bacula Cannot Open the Device}
If you get an error message such as:
\label{IncorrectFiles}
\subsubsection*{Incorrect File Number}
-\index[general]{Number!Incorrect File }
-\index[general]{Incorrect File Number }
+\index[general]{Number!Incorrect File}
+\index[general]{Incorrect File Number}
\addcontentsline{toc}{subsubsection}{Incorrect File Number}
When Bacula moves to the end of the medium, it normally uses the {\bf
retrieve the current file position from the {\bf mt\_fileno} field. Some SCSI
tape drivers will use a fast means of seeking to the end of the medium and in
doing so, they will not know the current file position and hence return a {\bf
--1}. As a consequence, if you get {\bf ``This is NOT correct!''} in the
+-1}. As a consequence, if you get {\bf "This is NOT correct!"} in the
positioning tests, this may be the cause. You must correct this condition in
order for Bacula to work.
\subsubsection*{Incorrect Number of Blocks or Positioning Errors during btape
Testing}
\index[general]{Testing!Incorrect Number of Blocks or Positioning Errors
-during btape }
+during btape}
\index[general]{Incorrect Number of Blocks or Positioning Errors during btape
-Testing }
+Testing}
\addcontentsline{toc}{subsubsection}{Incorrect Number of Blocks or Positioning
Errors during btape Testing}
below for the details on checking and setting the default drive block size.
To recover files from tapes written in fixed block mode, see below.
-\label{TapeModes}
+\label{TapeModes}
\subsubsection*{Ensuring that the Tape Modes Are Properly Set -- {\bf Linux
Only}}
-\index[general]{Ensuring that the Tape Modes Are Properly Set -- Linux Only }
-\index[general]{Only!Ensuring that the Tape Modes Are Properly Set -- Linux }
+\index[general]{Ensuring that the Tape Modes Are Properly Set -- Linux Only}
+\index[general]{Only!Ensuring that the Tape Modes Are Properly Set -- Linux}
\addcontentsline{toc}{subsubsection}{Ensuring that the Tape Modes Are Properly
Set -- Linux Only}
in variable block mode, it will attempt to set your drive appropriately. All
OSes permit setting variable block mode, but some OSes do not permit setting
the other modes that Bacula needs to function properly.
-\label{compression}
+\label{compression}
\subsubsection*{Checking and Setting Tape Hardware Compression and Blocking
Size}
\index[general]{Checking and Setting Tape Hardware Compression and Blocking
-Size }
+Size}
\index[general]{Size!Checking and Setting Tape Hardware Compression and
-Blocking }
+Blocking}
\addcontentsline{toc}{subsubsection}{Checking and Setting Tape Hardware
Compression and Blocking Size}
On FreeBSD, this would be something like: {\bf mt \ -f \ /dev/nsa0 \ blocksize
\ 0}.
+On some operating systems with some tape drives, the amount of data that
+can be written to the tape and whether or not compression is enabled is
+determined by the density usually the {\bf mt \ -f \ /dev/nst0 setdensity xxx} command.
+Often {\bf mt \ -f \ /dev/nst0 \ status} will print out the current
+density code that is used with the drive. Most systems, but unfortunately
+not all, set the density to the maximum by default. On some systems, you
+can also get a list of all available density codes with:
+{\bf mt \ -f \ /dev/nst0 \ densities} or a similar {\bf mt} command.
+Note, for DLT and SDLT devices, no-compression versus compression is very
+often controlled by the density code. On FreeBSD systems, the compression
+mode is set using {\bf mt \ -f \ /dev/nsa0 \ comp xxx} where xxx is the
+mode you want. In general, see {\bf man mt} for the options available on
+your system.
+
+
If your tape drive requires fixed block sizes (very unusual), you can use the
following records:
\label{FreeBSDTapes}
\subsubsection*{Tape Modes on FreeBSD}
-\index[general]{FreeBSD!Tape Modes on }
-\index[general]{Tape Modes on FreeBSD }
+\index[general]{FreeBSD!Tape Modes on}
+\index[general]{Tape Modes on FreeBSD}
\addcontentsline{toc}{subsubsection}{Tape Modes on FreeBSD}
On most FreeBSD systems such as 4.9 and most tape drives, Bacula should run
configuration is shown below, but does not work with all tape drives. Please
test carefully before putting either into production.
-Note, for FreeBSD 4.10-RELEASE, using a Sony TSL11000 L100 DDS4 w/Autochanger
-set to variable block size and DCLZ compression, Brian McDonald reports that
-to get Bacula to append correctly between Bacula executions, the correct
-values to use are:
+Note, for FreeBSD 4.10-RELEASE, using a Sony TSL11000 L100 DDS4 with an
+autochanger set to variable block size and DCLZ compression, Brian McDonald
+reports that to get Bacula to append correctly between Bacula executions,
+the correct values to use are:
\footnotesize
\begin{verbatim}
Changer Device = /dev/pass2
AutoChanger = yes
Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'"
+
# FreeBSD Specific Settings
Offline On Unmount = no
Hardware End of Medium = no
\subsubsection*{Determining What Tape Drives and Autochangers You Have on
FreeBSD}
\index[general]{FreeBSD!Determining What Tape Drives and Autochangers You Have
-on }
+}
\index[general]{Determining What Tape Drives and Autochangers You Have on
-FreeBSD }
+FreeBSD}
\addcontentsline{toc}{subsubsection}{Determining What Tape Drives and
Autochangers You Have on FreeBSD}
\label{onstream}
\subsubsection*{Using the OnStream driver on Linux Systems}
-\index[general]{Using the OnStream driver on Linux Systems }
-\index[general]{Systems!Using the OnStream driver on Linux }
+\index[general]{Using the OnStream driver on Linux Systems}
+\index[general]{Systems!Using the OnStream driver on Linux}
\addcontentsline{toc}{subsubsection}{Using the OnStream driver on Linux
Systems}
Bacula version 1.33 (not 1.32x) is now working and ready for testing with the
OnStream kernel osst driver version 0.9.14 or above. Osst is available from:
-\elink{http://sourceforge.net/projects/osst/}{http://sourceforge.net/projects/%
-osst/}.
+\elink{http://sourceforge.net/projects/osst/}
+{http://sourceforge.net/projects/osst/}.
To make Bacula work you must first load the new driver then, as root, do:
\end{verbatim}
\normalsize
+\subsection*{Hardware Compresson on EXB-8900}
+\index[general]{Hardware Compression on EXB-8900}
+\index[general]{EXB-8900!Hardware Compression}
+\addcontentsline{to}{subsection}{Hardware Compression on EXB-8900}
+To active, check, or disable the hardware compression feature
+on an EXB-8900, use the exabyte MammothTool. You can get it here:
+\elink{http://www.exabyte.com/support/online/downloads/index.cfm}
+{http://www.exabyte.com/support/online/downloads/index.cfm}.
+There is a solaris version of this tool. With option -C 0 or 1 you
+can disable or activate compression. Start this tool without any
+options for a small reference.
+
\label{fill}
\subsubsection*{Using btape to Simulate Filling a Tape}
-\index[general]{Using btape to Simulate Filling a Tape }
-\index[general]{Tape!Using btape to Simulate Filling a }
+\index[general]{Using btape to Simulate Filling a Tape}
+\index[general]{Tape!Using btape to Simulate Filling a}
\addcontentsline{toc}{subsubsection}{Using btape to Simulate Filling a
Tape}
\label{RecoveringFiles}
\subsection*{Recovering Files Written to Tape With Fixed Block Sizes}
-\index[general]{Recovering Files Written to Tape With Fixed Block Sizes }
-\index[general]{Sizes!Recovering Files Written to Tape With Fixed Block }
+\index[general]{Recovering Files Written to Tape With Fixed Block Sizes}
+\index[general]{Sizes!Recovering Files Written to Tape With Fixed Block}
\addcontentsline{toc}{subsection}{Recovering Files Written to Tape With Fixed
Block Sizes}
VolBlock} lines in the file. When the file is re-written, answer the question,
and Bacula will run without using block positioning, and it should recover
your files.
-\label{BlockModes}
+\label{BlockModes}
\subsection*{Tape Blocking Modes}
-\index[general]{Modes!Tape Blocking }
-\index[general]{Tape Blocking Modes }
+\index[general]{Modes!Tape Blocking}
+\index[general]{Tape Blocking Modes}
\addcontentsline{toc}{subsection}{Tape Blocking Modes}
SCSI tapes may either be written in {\bf variable} or {\bf fixed} block sizes.
assumes that each write causes a single record to be written, and that it can
sequentially recover each of the blocks it has written by using the same
number of sequential reads as it had written.
+
+\subsection*{Details of Tape Modes}
+\index[general]{Modes!Details}
+\index[general]{Details of Tape Modes}
+\addcontentsline{toc}{subsection}{Details of Tape Modes}
+Rudolf Cejkar has provided the following information concerning
+certain tape modes and MTEOM.
+
+\begin{description}
+\item[Tape level]
+ It is always possible to position filemarks or blocks, whereas
+ positioning to the end-of-data is only optional feature, however it is
+ implemented very often. SCSI specification also talks about optional
+ sequential filemarks, setmarks and sequential setmarks, but these are not
+ implemented so often. Modern tape drives keep track of file positions in
+ built-in chip (AIT, LTO) or at the beginning of the tape (SDLT), so there
+ is not any speed difference, if end-of-data or filemarks is used (I have
+ heard, that LTO-1 from all 3 manufacturers do not use its chip for file
+ locations, but a tape as in SDLT case, and I'm not sure about LTO-2 and
+ LTO-3 case). However there is a big difference, that end-of-data ignores
+ file position, whereas filemarks returns the real number of skipped
+ files, so OS can track current file number just in filemarks case.
+
+\item[OS level]
+ Solaris does use just SCSI SPACE Filemarks, it does not support SCSI
+ SPACE End-of-data. When MTEOM is called, Solaris does use SCSI SPACE
+ Filemarks with count = 1048576 for fast mode, and combination of SCSI
+ SPACE Filemarks with count = 1 with SCSI SPACE Blocks with count = 1 for
+ slow mode, so EOD mark on the tape on some older tape drives is not
+ skipped. File number is always tracked for MTEOM.
+
+ Linux does support both SCSI SPACE Filemarks and End-of-data: When MTEOM
+ is called in MT_ST_FAST_MTEOM mode, SCSI SPACE Filemarks with count =
+ 8388607 is used. In the other case, SCSI SPACE End-of-data is used.
+ There is no real slow mode like in Solaris - I just expect, that for
+ older tape drives Filemarks may be slower than End-of-data, but not so
+ much as in Solaris slow mode. File number is tracked for MTEOM just
+ without MT_ST_FAST_MTEOM - when MT_ST_FAST_MTEOM is used, it is not.
+
+ FreeBSD does support both SCSI SPACE Filemarks and End-of-data, but when
+ MTEOD (MTEOM) is called, SCSI SPACE End-of-data is always used. FreeBSD
+ never use SCSI SPACE Filemarks for MTEOD. File number is never tracked
+ for MTOED.
+
+\item[Bacula level]
+ When {\bf Hardware End of Medium = Yes} is used, MTEOM is called, but it
+ does not mean, that hardware End-of-data must be used. When Hardware End
+ of Medium = No, if Fast Forward Space File = Yes, MTFSF with count =
+ 32767 is used, else Block Read with count = 1 with Forward Space File
+ with count = 1 is used, which is really very slow.
+
+\item [Hardware End of Medium = Yes|No]
+ The name of this option is misleading and is the source of confusion,
+ because it is not the hardware EOM, what is really switched here.
+
+ If I use Yes, OS must not use SCSI SPACE End-of-data, because Bacula
+ expects, that there is tracked file number, which is not supported by
+ SCSI specification. Instead, the OS have to use SCSI SPACE Filemarks.
+
+ If I use No, an action depends on Fast Forward Space File.
+
+ Considering {\bf Hardware End of Medium = no}
+ and {\bf Fast Forward Space File = no}
+ When I set the two to no, file positioning was very slow
+ on my LTO-3:
+\begin{verbatim}
+ HEOM = no, FFSF = no: ~ 10 - 100 minutes
+\end{verbatime}
+
+while even with {\bf Hardware End of Medium = no} but
+{\bf Fast Forward Space File = yes}, the time is 10 to
+100 times faster.
+\begin{verbatim}
+ HEOM = no, FFSF = yes: ~ 1 minute
+\end{verbatim}
+
+\end{description}
+
+\subsection*{Autochanger Errors}
+\index[general]{Errors!Autochanger}
+\index[general]{Autochanger Errors}
+\addcontentsline{toc}{subsection}{Autochanger Errors}
+
+If you are getting errors such as:
+
+\footnotesize
+\begin{verbatim}
+3992 Bad autochanger "load slot 1, drive 1": ERR=Child exited with code 1.
+\end{verbatim}
+\normalsize
+
+and you are running your Storage daemon as non-root, then most likely
+you are having permissions problems with the control channel. Running
+as root, set permissions on /dev/sgX so that the userid and group of
+your Storage daemon can access the device. You need to ensure that you
+all access to the proper control device, and if you don't have any
+SCSI disk drives (including SATA drives), you might want to change
+the permissions on /dev/sg*.
\end{verbatim}
\normalsize
-which runs my ``watchdog'' script. As an example, I have added the Job codes
+which runs my "watchdog" script. As an example, I have added the Job codes
\%c and \%d which will cause the Client name and the Director's name to be
passed to the script. For example, if the Client's name is {\bf Watchdog} and
the Director's name is {\bf main-dir} then referencing \$1 in the script would
You should protect your Catalog database. If you are using SQLite, make sure
that the working directory is readable only by root (or your Bacula userid),
-and ensure that {\bf bacula.db} has permissions {\bf -rw-r\verb{--{r\verb{--{} (i.e. 640) or
+and ensure that {\bf bacula.db} has permissions {\bf -rw-r\verb:--:r\verb:--:} (i.e. 640) or
more strict. If you are using MySQL or PostgreSQL, please note that the Bacula
setup procedure leaves the database open to anyone. At a minimum, you should
assign the user {\bf bacula} a userid and add it to your Director's
\index[general]{Autochanger!Automatic Labeling Using Your }
\addcontentsline{toc}{subsection}{Automatic Labeling Using Your Autochanger}
-If you have an autochanger but it does not support barcodes, using a ``trick''
+If you have an autochanger but it does not support barcodes, using a "trick"
you can make Bacula automatically label all the volumes in your autochanger's
magazine.
This tip also comes from Marc Brueckner. (Note, this tip is probably outdated
by the addition of {\bf ClientRunBeforJob} and {\bf ClientRunAfterJob} Job
-records, but the technique still could be useful.) First I thought the ``Run
-Before Job'' statement in the Job-resource is for executing a script on the
+records, but the technique still could be useful.) First I thought the "Run
+Before Job" statement in the Job-resource is for executing a script on the
remote machine(the machine to be backed up). It could be usefull to execute
scripts on the remote machine e.g. for stopping databases or other services
while doing the backup. (Of course I have to start the services again when the
\end{verbatim}
\normalsize
-This should execute the ``ls -la'' command on the remote machine.
+This should execute the "ls -la" command on the remote machine.
Now you could add lines like the following to your Director's conf file:
So you can schedule and run backups without ever having to log on or see the
console.
To make the whole thing work you need to create a Device resource which looks
-something like this (``Archive Device'', ``Maximum Changer Wait'', ``Media
-Type'' and ``Label media'' may have different values):
+something like this ("Archive Device", "Maximum Changer Wait", "Media
+Type" and "Label media" may have different values):
\footnotesize
\begin{verbatim}
\normalsize
As the script has to emulate the complete wisdom of a mtx-changer it has an
-internal ``database'' containing where which tape is stored, you can see this on
+internal "database" containing where which tape is stored, you can see this on
the following line:
\footnotesize
\normalsize
The above should be all on one line, and it effectivly tells Bacula that
-volume ``VOL-0001'' is located in slot 1 (which is our lowest slot), that
-volume ``VOL-0002'' is located in slot 2 and so on..
+volume "VOL-0001" is located in slot 1 (which is our lowest slot), that
+volume "VOL-0002" is located in slot 2 and so on..
The script also maintains a logfile (/var/log/mtx.log) where you can monitor
its operation.
\item Forward Secrecy Support via Diffie-Hellman Ephemeral Keying
\end{itemize}
-This document will refer to both ``server'' and ``client'' contexts. These
+This document will refer to both "server" and "client" contexts. These
terms refer to the accepting and initiating peer, respectively.
Diffie-Hellman anonymous ciphers are not supported by this code. The
use of DH anonymous ciphers increases the code complexity and places
-explicit trust upon the two-way Cram-MD5 implementation. Cram-MD5 is
+explicit trust upon the two-way CRAM-MD5 implementation. CRAM-MD5 is
subject to known plaintext attacks, and it should be considered
considerably less secure than PKI certificate-based authentication.
Appropriate autoconf macros have been added to detect and use OpenSSL
if enabled on the {\bf ./configure} line with {\bf \verb?--?enable-openssl}
-
\subsection*{TLS Configuration Directives}
\addcontentsline{toc}{section}{TLS Configuration Directives}
Additional configuration directives have been added to all the daemons
\item [TLS Certificate = \lt{}Directory\gt{}]
Path to a PEM encoded TLS certificate. It can be used as either a client
-or server certificate.
+or server certificate. PEM stands for Privacy Enhanced Mail, but in
+this context refers to how the certificates are encoded. It is used
+because PEM files are base64 encoded and hence ASCII text based
+rather than binary. They may also contain encrypted information.
\item [TLS Key = \lt{}Directory\gt{}]
Path to a PEM encoded TLS private key. It must correspond to the TLS
\item [TLS Verify Peer = \lt{}yes|no\gt{}]
Verify peer certificate. Instructs server to request and verify the
client's x509 certificate. Any client certificate signed by a known-CA
-will be accepted unless the TLS Allowed CN configuration directive is used.
-Not valid in a client context.
+will be accepted unless the TLS Allowed CN configuration directive is used,
+in which case the client certificate must correspond to the Allowed
+Common Name specified. This directive is valid only for a server
+and not in a client context.
\item [TLS Allowed CN = \lt{}string list\gt{}]
Common name attribute of allowed peer certificates. If this directive is
This directive may be specified more than once. It is not valid in a client
context.
-\item [TLS CA Certificate File = \lt{}Directory\gt{}]
-Path to PEM encoded TLS CA certificate(s). Multiple certificates are
+\item [TLS CA Certificate File = \lt{}Filename\gt{}]
+The full path and filename specifying a
+PEM encoded TLS CA certificate(s). Multiple certificates are
permitted in the file. One of \emph{TLS CA Certificate File} or \emph{TLS
CA Certificate Dir} are required in a server context if \emph{TLS
Verify Peer} (see above) is also specified, and are always required in a client
context.
\item [TLS CA Certificate Dir = \lt{}Directory\gt{}]
-Path to TLS CA certificate directory. In the current implementation,
-certificates must be stored PEM encoded with OpenSSL-compatible hashes.
+Full path to TLS CA certificate directory. In the current implementation,
+certificates must be stored PEM encoded with OpenSSL-compatible hashes,
+which is the subject name's hash and an extension of {bf .0}.
One of \emph{TLS CA Certificate File} or \emph{TLS CA Certificate Dir} are
required in a server context if \emph{TLS Verify Peer} is also specified,
and are always required in a client context.
\item [TLS DH File = \lt{}Directory\gt{}]
Path to PEM encoded Diffie-Hellman parameter file. If this directive is
-specified, DH ephemeral keying will be enabled, allowing for forward
-secrecy of communications. This directive is only valid within a server
-context. To generate the parameter file, you may use openssl:
+specified, DH key exchange will be used for the ephemeral keying, allowing
+for forward secrecy of communications. DH key exchange adds an additional
+level of security because the key used for encryption/decryption by the
+server and the client is computed on each end and thus is never passed over
+the network if Diffie-Hellman key exchange is used. Even if DH key
+exchange is not used, the encryption/decryption key is always passed
+encrypted. This directive is only valid within a server context.
+
+To generate the parameter file, you
+may use openssl:
\begin{verbatim}
openssl dhparam -out dh1024.pem -5 1024
running this in production, you will probably want to find some way to
automatically start MySQL or PostgreSQL after each system reboot.
-If you are using SQLite (i.e. you specified the {\bf \verb{--{with-sqlite=xxx} option
+If you are using SQLite (i.e. you specified the {\bf \verb:--:with-sqlite=xxx} option
on the {\bf ./configure} command, you need do nothing. SQLite is automatically
started by {\bf Bacula}.
Note, on 1.32 versions and lower, the command name is {\bf console} rather
than bconsole. Alternatively to running the command line console, if you have
-GNOME installed and used the {\bf \verb{--{enable-gnome} on the configure command,
+GNOME installed and used the {\bf \verb:--:enable-gnome} on the configure command,
you may use the GNOME Console program:
./gnome-console
\normalsize
Details of the console program's commands are explained in the
-\ilink{Console Chapter}{_ChapterStart23} of this manual.
+\ilink{Console Chapter}{_ConsoleChapter} of this manual.
\subsection*{Running a Job}
\label{Running}
At this point, we assume you have done the following:
\begin{itemize}
-\item Configured Bacula with {\bf ./configure \verb{--{your-options}
+\item Configured Bacula with {\bf ./configure \verb:--:your-options}
\item Built Bacula using {\bf make}
\item Installed Bacula using {\bf make install}
\item Have created your database with, for example, {\bf
\normalsize
Then make sure that the Address parameter in the Storage resource is set to
-the fully qualified domain name and not to something like ``localhost''. The
+the fully qualified domain name and not to something like "localhost". The
address specified is sent to the File daemon (client) and it must be a fully
-qualified domain name. If you pass something like ``localhost'' it will not
+qualified domain name. If you pass something like "localhost" it will not
resolve correctly and will result in a time out when the File daemon fails to
connect to the Storage daemon.
the new Volume.
If you have a Pool of volumes and Bacula is cycling through them, instead of
-the above message ``Cannot find any appendable volumes.'', Bacula may ask you
+the above message "Cannot find any appendable volumes.", Bacula may ask you
to mount a specific volume. In that case, you should attempt to do just that.
If you do not have the volume any more (for any of a number of reasons), you
can simply mount another volume from the same Pool, providing it is
this manual.
If you run a Bacula job, and you have no labeled tapes in the Pool, Bacula
-will inform you, and you can create them ``on-the-fly'' so to speak. In my
+will inform you, and you can create them "on-the-fly" so to speak. In my
case, I label my tapes with the date, for example: {\bf DLT-18April02}. See
below for the details of using the {\bf label} command.
It is also possible to add media to the pool without physically labeling the
Volumes. This can be done with the {\bf add} command. For more information,
please see the
-\ilink{Console Chapter}{_ChapterStart23} of this manual.
+\ilink{Console Chapter}{_ConsoleChapter} of this manual.
end conditions, and recursive expansion.
When using variable expansion characters in a Volume Label Format record, the
-format should always be enclosed in double quotes ({\bf ``}).
+format should always be enclosed in double quotes ({\bf "}).
For example, {\bf \$\{HOME\}} will be replaced by your home directory as
defined in the environment. If you have defined the variable {\bf xxx} to be
array, where the elements of the array are referenced by subscripting the
variable name (e.g. {\bf \$\{Months[3]\}}). Environment variable arrays are
defined by separating the elements with a vertical bar ({\bf |}), thus {\bf
-set Months=''Jan|Feb|Mar|Apr|...``} defines an environment variable named
+set Months="Jan|Feb|Mar|Apr|..."} defines an environment variable named
{\bf Month} that will be treated as an array, and the reference {\bf
\$\{Months[3]\}} will yield {\bf Mar}. The elements of the array can have
differing lengths.
catalog and to report any differences. See the example below for the format of
the output.
-You decide what files you want to form your ``snapshot'' by specifying them in
+You decide what files you want to form your "snapshot" by specifying them in
a {\bf FileSet} resource, and normally, they will be system files that do not
change, or that only certain features change.
}
\end{verbatim}
\normalsize
-
The Windows version of the Bacula File daemon has been tested on Win98, WinMe,
WinNT, and Win2000 systems. We have coded to support Win95, but no longer have
a system for testing. The Windows version of Bacula is a native Win32 port,
-but there are very few source code changes, which means that the Windows
+but there are very few source code changes to the Unix code, which means that the Windows
version is for the most part running code that has long proved stable on Unix
systems. When running, it is perfectly integrated with Windows and displays
its icon in the system icon tray, and provides a system tray menu to obtain
software, it should be very familiar to you.
If you have a previous version Cygwin of Bacula (1.32 or lower) installed, you
-should stop the service, uninstall it, and remove the directory possibly
+should stop the service, uninstall it, and remove the Bacula installation directory possibly
saving your bacula-fd.conf file for use with the new version you will install.
The new native version of Bacula has far fewer files than the old Cygwin
-version.
+version, so it is better to start with a clean directory.
Finally, proceed with the installation.
\begin{itemize}
+\item You must be logged in as Administrator to do a correct installation,
+ if not, please do so before continuing.
+
\item Simply double click on the {\bf winbacula-1.xx.0.exe} NSIS install
icon. The actual name of the icon will vary from one release version to
another.
\item If you proceed, you will be asked to select the components to be
installed. You may install the Bacula program (Bacula File Service) and or
the documentation. Both will be installed in sub-directories of the install
-location that you choose later. The components dialog looks like the
-following:
+ location that you choose later. The components dialog looks like the
+ following:
\addcontentsline{lof}{figure}{Win32 Component Selection Dialog}
\includegraphics{./win32-pkg.eps}
\item If you are installing for the first time, you will be asked if you want
to edit the bacula-fd.conf file, and if you respond with yes, it will be
opened in notepad.
-\
+
\item Then the installer will ask if you wish to install Bacula as a service. You
should always choose to do so:
\addcontentsline{lof}{figure}{Win32 Client Service Selection}
\includegraphics{./win32-service.eps}
-\
+
\item If everything goes well, you will receive the following confirmation:
\addcontentsline{lof}{figure}{Win32 Client Service Confirmation}
-\includegraphics{./win32-service-ok.eps}
+ \includegraphics{./win32-service-ok.eps}
-\
+
\item Then you will be asked if you wish to start the service. If you respond
with yes, any running Bacula will be shutdown and the new one started. You
may see a DOS box momentarily appear on the screen as the service is started.
-It should disappear in a second or two:
+ It should disappear in a second or two:
\addcontentsline{lof}{figure}{Win32 Client Start}
\includegraphics{./win32-start.eps}
-\
-\item Finally, the finish dialog will appear:
+\item Finally, the finish dialog will appear:
\addcontentsline{lof}{figure}{Win32 Client Setup Completed}
-\includegraphics{./win32-finish.eps}
+ \includegraphics{./win32-finish.eps}
\
\end{itemize}
That should complete the installation process. When the Bacula File Server is
ready to serve files, an icon \includegraphics{./idle.eps} representing a
cassette (or tape) will appear in the system tray
-\includegraphics{./tray-icon.eps}; right click on it and a menu will appear.
-\
-\ \ \ \ \includegraphics{./menu.eps}
+\includegraphics{./tray-icon.eps}; right click on it and a menu will appear.\\
+\includegraphics{./menu.eps}\\
The {\bf Events} item is currently unimplemented, by selecting the {\bf
Status} item, you can verify whether any jobs are running or not.
c:\textbackslash{}bacula\textbackslash{}bin\textbackslash{}bacula-fd.conf} to
ensure that it corresponds to your configuration.
+Finally, but pulling up the Task Manager (ctl-alt-del), verify that Bacula
+is running as a process (not an Application) with User Name SYSTEM. If this is
+not the case, you probably have not installed Bacula while running as
+Administrator, and hence it will be unlikely that Bacula can access
+all the system files.
+
\subsection*{Uninstalling Bacula on Win32}
\index[general]{Win32!Uninstalling Bacula }
\index[general]{Uninstalling Bacula on Win32 }
The most likely source of problems is authentication when the Director
attempts to connect to the File daemon that you installed. This can occur if
the names and the passwords defined in the File daemon's configuration file
-{\bf
+{\bf
c:\textbackslash{}bacula\textbackslash{}bin\textbackslash{}bacula-fd.conf} on
the Windows machine do not match with the names and the passwords in the
Director's configuration file {\bf bacula-dir.conf} located on your Unix/Linux
is executing.
\label{Compatibility}
-
\subsection*{Windows Compatibility Considerations}
\index[general]{Windows Compatibility Considerations }
\index[general]{Considerations!Windows Compatibility }
If any applications are running during the backup and they have files
opened exclusively, Bacula will not be able to backup those files, so be
sure you close your applications (or tell your users to close their
-applications) before the backup. Most Microsoft applications do not open
+applications) before the backup. Fortunately,
+most Microsoft applications do not open
files exclusively so that they can be backed up. However, you will need to
experiment. In any case, if Bacula cannot open the file, it will print an
error message, so you will always know which files were not backed up.
+For version 1.37.25 and greater, see the section below on
+Volume Shadow Copy Service.
During backup, Bacula doesn't know about the system registry, so you will
either need to write it out to an ASCII file using {\bf regedit~~/e} or use a
\hline {WinMe } & {Linux } & {Works (SYSTEM permissions) } \\
\hline {\ } & {\ } & {\ } \\
\hline {WinXP } & {WinXP } & {Works } \\
- \hline {WinXP } & {WinNT } & {Works (all files OK, but got ``The data is invalid''
+ \hline {WinXP } & {WinNT } & {Works (all files OK, but got "The data is invalid"
message) } \\
\hline {WinXP } & {WinMe } & {Error: Win32 data stream not supported. } \\
\hline {WinXP } & {WinMe } & {Works if {\bf Portable=yes} specified during backup.} \\
\end{longtable}
+\label{VSS}
+\subsection*{Volume Shadow Copy Service}
+\index[general]{Volume Shadow Copy Service}
+\index[general]{VSS}
+\addcontentsline{toc}{subsection}{Volume Shadow Copy Service}
+In version 1.37.30 and greater, you can turn on Microsoft's Volume
+Shadow Copy Service (VSS).
+
+Microsoft added VSS to Windows XP and Windows 2003. From the perspective of
+a backup-solution for Windows, this is an extremely important step. VSS
+allows Bacula to backup open files and even to interact with applications like
+RDBMS to produce consistent file copies. VSS aware applications are called
+VSS Writers, they register with the OS so that when Bacula wants to do a
+Snapshot, the OS will notify the register Writer programs, which may then
+create a consistent state in their application, which will be backed up.
+Examples for these writers are "MSDE" (Microsoft database
+engine), "Event Log Writer", "Registry Writer" plus 3rd
+party-writers. If you have a non-vss aware application (e.g.
+SQL Anywhere or probably MySQL), a shadow copy is still generated
+and the open files can be backed up, but there is no guarantee
+that the file is consistent.
+
+Bacula produces a message from each of the registered writer programs
+when it is doing a VSS backup so you know which ones are correctly backed
+up.
+
+Bacula supports VSS on both Windows 2003 and Windows XP.
+Technically Bacula creates a shadow copy as soon as the backup process
+starts. It does then backup all files from the shadow copy and destroys the
+shadow copy after the backup process. Please have in mind, that VSS
+creates a snapshot and thus backs up the system at the state it had
+when starting the backup. It will disregard file changes which occur during
+the backup process.
+
+VSS can be turned on by placing an
+
+\index[dir]{Enable VSS}
+\index[general]{Enable VSS}
+\begin{verbatim}
+Enable VSS = yes
+\end{verbatim}
+
+in your FileSet resource.
+
+Important Note!! Under the current implementation, you may only
+run a single job at a time in any Win32 File daemon that has VSS
+active. Running multiple simultanous jobs in the File daemon
+will most likely cause jobs to fail. This restriction does not apply
+to the Director, Storage daemons, or any File daemons not running
+VSS.
+
+The VSS aware File daemon has the letters VSS on the signon line that
+it produces when contacted by the console. For example:
+\begin{verbatim}
+Tibs-fd Version: 1.37.32 (22 July 2005) VSS Windows XP MVS NT 5.1.2600
+\end{verbatim}
+the VSS is shown in the line above. This only means that the File daemon
+is capable of doing VSS not that VSS is turned on for a particular backup.
+There are two ways of telling if VSS is actually turned on during a backup.
+The first is to look at the status output for a job, e.g.:
+\footnotesize
+\begin{verbatim}
+Running Jobs:
+JobId 1 Job NightlySave.2005-07-23_13.25.45 is running.
+ VSS Backup Job started: 23-Jul-05 13:25
+ Files=70,113 Bytes=3,987,180,650 Bytes/sec=3,244,247
+ Files Examined=75,021
+ Processing file: c:/Documents and Settings/kern/My Documents/My Pictures/Misc1/Sans titre - 39.pdd
+ SDReadSeqNo=5 fd=352
+\end{verbatim}
+\normalsize
+Here, you see under Running Jobs that JobId 1 is "VSS Backup Job started ..."
+This means that VSS is enabled for that job. If VSS is not enabled, it will
+simply show "Backup Job started ..." without the letters VSS.
+
+The second way to know that the job was backed up with VSS is to look at the
+Job Report, which will look something like the following:
+\footnotesize
+\begin{verbatim}
+23-Jul 13:25 rufus-dir: Start Backup JobId 1, Job=NightlySave.2005-07-23_13.25.45
+23-Jul 13:26 rufus-sd: Wrote label to prelabeled Volume "TestVolume001" on device "DDS-4" (/dev/nst0)
+23-Jul 13:26 rufus-sd: Spooling data ...
+23-Jul 13:26 Tibs: Generate VSS snapshots. Driver="VSS WinXP", Drive(s)="C"
+23-Jul 13:26 Tibs: VSS Writer: "MSDEWriter", State: 1 (VSS_WS_STABLE)
+23-Jul 13:26 Tibs: VSS Writer: "Microsoft Writer (Bootable State)", State: 1 (VSS_WS_STABLE)
+23-Jul 13:26 Tibs: VSS Writer: "WMI Writer", State: 1 (VSS_WS_STABLE)
+23-Jul 13:26 Tibs: VSS Writer: "Microsoft Writer (Service State)", State: 1 (VSS_WS_STABLE)
+\end{verbatim}
+\normalsize
+In the above Job Report listing, you see that the VSS snapshot was generated for drive C (if
+other drives are backed up, they will be listed on the {\bf Drive(s)="C"} You also see the
+reports from each of the writer program. Here they all report VSS_WS_STABLE, which means
+that you will get a consistent snapshot of the data handled by that writer.
+
\subsection*{Windows Firewalls}
\index[general]{Firewalls!Windows }
\index[general]{Windows Firewalls }
is the program {\bf SetACL}, which can be found at
\elink{http://setacl.sourceforge.net/ }{http://setacl.sourceforge.net/}.
+If you have not installed Bacula while running as Administrator
+and if Bacula is not running as a Process with the userid (User Name) SYSTEM,
+then it is very unlikely that it will have sufficient permission to
+access all your files.
+
Some users have experienced problems restoring files that participate in
the Active Directory. They also report that changing the userid under which
Bacula (bacula-fd.exe) runs, from SYSTEM to a Domain Admin userid, resolves
the dot org domain\gt{}. The steps are performed using Windows 2000 Server but
they should apply to most Win32 platforms. The procedure outlines how to deal
with a problem which arises when a restore creates a top-level new directory.
-In this example, ``top-level'' means something like {\bf
+In this example, "top-level" means something like {\bf
c:\textbackslash{}src}, not {\bf c:\textbackslash{}tmp\textbackslash{}src}
where {\bf c:\textbackslash{}tmp} already exists. If a restore job specifies /
as the {\bf Where:} value, this problem will arise.
{\bf SYSTEM} in this example as shown below).
\includegraphics{./properties-security-advanced-owner.eps}
-\item ensure the ``Replace owner on subcontainers and objects'' box is
+\item ensure the "Replace owner on subcontainers and objects" box is
checked
\item click on OK
-\item When the message ``You do not have permission to read the contents of
- directory ''c:\textbackslash{}src\textbackslash{}basis. Do you wish to replace
- the directory permissions with permissions granting you Full Control?``, click
+\item When the message "You do not have permission to read the contents of
+ directory c:\textbackslash{}src\textbackslash{}basis. Do you wish to replace
+ the directory permissions with permissions granting you Full Control?", click
on Yes.
\includegraphics{./confirm.eps}
With the above procedure, you should now have full control over your restored
directory.
+In addition to the above methods of changing permissions, there is a Microsoft
+program named {\bf cacls} that can perform similar functions.
+
\subsection*{Backing Up the WinNT/XP/2K System State}
\index[general]{State!Backing Up the WinNT/XP/2K System }
\index[general]{Backing Up the WinNT/XP/2K System State }
for important considerations on how to specify Windows paths in Bacula FileSet
Include and Exclude directives.
+\index[general]{Unicode}
+Bacula versions prior to 1.37.28 do not support Windows Unicode filenames.
+As of that version, both {\bf bconsole} and {\bf wx-console} support Windows
+Unicode filenames. There may still be some problems with multiple byte
+characters (e.g. Chinese, ...) where it is a two byte character but the
+displayed character is not two characters wide.
+
+\index[general]{Win32 path length restriction}
+Path/filenames longer than 260 characters are not supported. This may be
+possible in a future version.
+
\subsection*{Command Line Options Specific to the Bacula Windows File
Daemon (Client)}
\index[general]{Client!Command Line Options Specific to the Bacula Windows
Bacula} to run on Windows and the standard Bacula options, all Windows
specific options are signaled with a forward slash character (/), while as
usual, the standard Bacula options are signaled with a minus (-), or a minus
-minus (\verb{--{). All the standard Bacula options can be used on the Windows
+minus (\verb:--:). All the standard Bacula options can be used on the Windows
version. In addition, the following Windows only options are implemented:
\begin{description}
Client Run After Job directive. If you want to do something similar, you might
take the shutdown program from the
\elink{apcupsd project}{http://www.apcupsd.com} or one from the
-\elink{ Sysinternals
-project}{http://www.sysinternals.com/ntw2k/freeware/psshutdown.shtml}.
+\elink{Sysinternals project}{http://www.sysinternals.com/ntw2k/freeware/psshutdown.shtml}.
creating or adding to a DVD ISO filesystem.
You must have {\bf dvd+rw-tools} loaded on your system for DVD writing to
-work. Please note that the original {\bf dvd+rw-tools} package does {\bf NOT}
-work with Bacula. You must apply a patch which can be found in the {\bf patches} directory of Bacula sources.
+work. Please note that the original {\bf dvd+rw-tools} package does {\bf
+NOT} work with Bacula. You must apply a patch which can be found in the
+{\bf patches} directory of Bacula sources with the name
+{\bf dvd+rw-tools-5.21.4.10.8.bacula.patch}.
The fact that Bacula cannot use the OS to write directly
to the DVD makes the whole process a bit more error prone than
-writing to say a disk, but nevertheless, it does work if you
-use some care to set it up properly.
+writing to a disk or a tape, but nevertheless, it does work if you
+use some care to set it up properly. However, at the current time
+(28 October 2005) we still consider this code to be experimental and of
+BETA quality. As a consequence, please do careful testing before relying
+on DVD backups in production.
The remainder of this chapter explains the various directives that you can
use to control the DVD writing.
\index[sd]{Requires Mount }
You must set this directive to {\bf yes} for DVD-writers, and to {\bf no} for
all other devices (tapes/files). This directive indicates if the device
- requires to be mounted to be read, and if it must be written in a special way.
- If it set, {\bf Mount Point}, {\bf Mount Command}, {\bf Unmount Command} and
- {\bf Write Part Command} directives must also be defined.
+ requires to be mounted using the {\bf Mount Command}.
+ To be able to write a DVD, the following directives must also be
+ defined: {\bf Mount Point}, {\bf Mount Command}, {\bf Unmount Command} and
+ {\bf Write Part Command}.
\item [Mount Point = {\it directory}]
- \index[sd]{Mount Point }
+ \index[sd]{Mount Point}
Directory where the device can be mounted.
\item [Mount Command = {\it name-string}]
- \index[sd]{Mount Command }
+ \index[sd]{Mount Command}
Command that must be executed to mount the device. Although the
device is written directly, the mount command is necessary in
order to determine the free space left on the DVD. Before the command is
\normalsize
\item [Unmount Command = {\it name-string}]
- \index[sd]{Unmount Command }
+ \index[sd]{Unmount Command}
Command that must be executed to unmount the device. Before the command is
executed, \%a is replaced with the Archive Device, and \%m with the Mount
Point.
wasting too much space, but to ensure that the data is written to the
medium when all jobs are finished.
- It is ignored with tape and FIFO devices.
+ This directive is ignored for devices other than DVDs.
\end{description}
\addcontentsline{toc}{subsection}{Other Points}
\begin{itemize}
+\item Writing and reading of DVD+RW seems to work quite reliably
+ provided you are using the patched dvd+rw-mediainfo programs.
+ On the other hand, we do not have enough information to ensure
+ that DVD-RW or other forms of DVDs work correctly.
\item DVD+RW supports only about 1000 overwrites. Every time you
mount the filesystem read/write will count as one write. This can
add up quickly, so it is best to mount your DVD+RW filesystem read-only.
unusable. Normally you should not have to format or reformat
DVD+RW media. If it is necessary, current versions of growisofs will
do so automatically.
-\item I had several problems writing to DVD-RWs (this does NOT concern DVD+RW),
- because these media have two writing-modes: {\bf Incremental Sequential} and
- {\bf Restricted Overwrite}. Depending on your device and the media you use,
- one of these modes may not work correctly (e.g. {\bf Incremental Sequential} does
- not work with my NEC DVD-writer and Verbatim DVD-RW).
+\item We have had several problems writing to DVD-RWs (this does NOT
+ concern DVD+RW), because these media have two writing-modes: {\bf
+ Incremental Sequential} and {\bf Restricted Overwrite}. Depending on
+ your device and the media you use, one of these modes may not work
+ correctly (e.g. {\bf Incremental Sequential} does not work with my NEC
+ DVD-writer and Verbatim DVD-RW).
To retrieve the current mode of a DVD-RW, run:
\begin{verbatim}
dvd+rw-format -blank /dev/xxx
\end{verbatim}
-\item Bacula only accepts to write to blank DVDs. To quick blank a DVD+/-RW, run
+\item Bacula only accepts to write to blank DVDs. To quickly blank a DVD+/-RW, run
this command:
\begin{verbatim}
dd if=/dev/zero bs=1024 count=512 | growisofs -Z /dev/xxx=/dev/fd/0
\index[general]{Rotation!Log }
\index[general]{Log Rotation }
\addcontentsline{toc}{subsection}{Log Rotation}
-
If you use the default {\bf bacula-dir.conf} 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 {\bf logrotate} from
the log file to be rotated once a month and kept for a maximum of 5 months.
You may want to edit this file to change the default log rotation preferences.
+\subsection*{Log Watch}
+\index[general]{Watch!Log}
+\index[general]{Log Watch}
+\addcontentsline{toc}{subsection}{Log Watch}
+Some systems such as RedHat 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 {\bf scripts/logwatch}
+directory. The {\bf README} file in that directory gives a brief
+explanation on how to install it and what kind of output to expect.
+
\subsection*{Disaster Recovery}
\index[general]{Recovery!Disaster }
\section*{Testing Your Tape Drive With Bacula}
\label{_ChapterStart27}
-\index[general]{Testing Your Tape Drive With Bacula }
+\index[general]{Testing Your Tape Drive With Bacula}
\addcontentsline{toc}{section}{Testing Your Tape Drive With Bacula}
This chapter is concerned with testing and configuring your tape drive to make
\label{summary}
\subsection*{Summary of Steps to Take to Get Your Tape Drive Working}
-\index[general]{Working!Summary of Steps to Take to Get Your Tape Drive }
-\index[general]{Summary of Steps to Take to Get Your Tape Drive Working }
+\index[general]{Working!Summary of Steps to Take to Get Your Tape Drive}
+\index[general]{Summary of Steps to Take to Get Your Tape Drive Working}
\addcontentsline{toc}{subsection}{Summary of Steps to Take to Get Your Tape
Drive Working}
\ilink{ Tips for Resolving Problems}{problems1} section below.
\subsubsection*{Specifying the Configuration File}
-\index[general]{File!Specifying the Configuration }
-\index[general]{Specifying the Configuration File }
+\index[general]{File!Specifying the Configuration}
+\index[general]{Specifying the Configuration File}
\addcontentsline{toc}{subsubsection}{Specifying the Configuration File}
Starting with version 1.27, each of the tape utility programs including the
using the {\bf -c} option.
\subsubsection*{Specifying a Device Name For a Tape}
-\index[general]{Tape!Specifying a Device Name For a }
-\index[general]{Specifying a Device Name For a Tape }
+\index[general]{Tape!Specifying a Device Name For a}
+\index[general]{Specifying a Device Name For a Tape}
\addcontentsline{toc}{subsubsection}{Specifying a Device Name For a Tape}
{\bf btape} {\bf device-name} where the Volume can be found. In the case of a
specifying Volume names.
\subsubsection*{Specifying a Device Name For a File}
-\index[general]{File!Specifying a Device Name For a }
-\index[general]{Specifying a Device Name For a File }
+\index[general]{File!Specifying a Device Name For a}
+\index[general]{Specifying a Device Name For a File}
\addcontentsline{toc}{subsubsection}{Specifying a Device Name For a File}
If you are attempting to read or write an archive file rather than a tape, the
\subsection*{btape}
\label{btape1}
-\index[general]{Btape }
+\index[general]{Btape}
\addcontentsline{toc}{subsection}{btape}
This program permits a number of elementary tape operations via a tty command
\normalsize
\subsubsection*{Using btape to Verify your Tape Drive}
-\index[general]{Using btape to Verify your Tape Drive }
-\index[general]{Drive!Using btape to Verify your Tape }
+\index[general]{Using btape to Verify your Tape Drive}
+\index[general]{Drive!Using btape to Verify your Tape}
\addcontentsline{toc}{subsubsection}{Using btape to Verify your Tape Drive}
An important reason for this program is to ensure that a Storage daemon
your tape drive.
\subsubsection*{Linux SCSI Tricks}
-\index[general]{Tricks!Linux SCSI }
-\index[general]{Linux SCSI Tricks }
+\index[general]{Tricks!Linux SCSI}
+\index[general]{Linux SCSI Tricks}
\addcontentsline{toc}{subsubsection}{Linux SCSI Tricks}
You can find out what SCSI devices you have by doing:
\label{problems1}
\subsection*{Tips for Resolving Problems}
-\index[general]{Problems!Tips for Resolving }
-\index[general]{Tips for Resolving Problems }
+\index[general]{Problems!Tips for Resolving}
+\index[general]{Tips for Resolving Problems}
\addcontentsline{toc}{subsection}{Tips for Resolving Problems}
\label{CannotRestore}
\subsubsection*{Bacula Saves But Cannot Restore Files}
-\index[general]{Files!Bacula Saves But Cannot Restore }
-\index[general]{Bacula Saves But Cannot Restore Files }
+\index[general]{Files!Bacula Saves But Cannot Restore}
+\index[general]{Bacula Saves But Cannot Restore Files}
\addcontentsline{toc}{subsubsection}{Bacula Saves But Cannot Restore Files}
If you are getting error messages such as:
\label{opendevice}
\subsubsection*{Bacula Cannot Open the Device}
-\index[general]{Device!Bacula Cannot Open the }
-\index[general]{Bacula Cannot Open the Device }
+\index[general]{Device!Bacula Cannot Open the}
+\index[general]{Bacula Cannot Open the Device}
\addcontentsline{toc}{subsubsection}{Bacula Cannot Open the Device}
If you get an error message such as:
\label{IncorrectFiles}
\subsubsection*{Incorrect File Number}
-\index[general]{Number!Incorrect File }
-\index[general]{Incorrect File Number }
+\index[general]{Number!Incorrect File}
+\index[general]{Incorrect File Number}
\addcontentsline{toc}{subsubsection}{Incorrect File Number}
When Bacula moves to the end of the medium, it normally uses the {\bf
\subsubsection*{Incorrect Number of Blocks or Positioning Errors during btape
Testing}
\index[general]{Testing!Incorrect Number of Blocks or Positioning Errors
-during btape }
+during btape}
\index[general]{Incorrect Number of Blocks or Positioning Errors during btape
-Testing }
+Testing}
\addcontentsline{toc}{subsubsection}{Incorrect Number of Blocks or Positioning
Errors during btape Testing}
below for the details on checking and setting the default drive block size.
To recover files from tapes written in fixed block mode, see below.
-\label{TapeModes}
+\label{TapeModes}
\subsubsection*{Ensuring that the Tape Modes Are Properly Set -- {\bf Linux
Only}}
-\index[general]{Ensuring that the Tape Modes Are Properly Set -- Linux Only }
-\index[general]{Only!Ensuring that the Tape Modes Are Properly Set -- Linux }
+\index[general]{Ensuring that the Tape Modes Are Properly Set -- Linux Only}
+\index[general]{Only!Ensuring that the Tape Modes Are Properly Set -- Linux}
\addcontentsline{toc}{subsubsection}{Ensuring that the Tape Modes Are Properly
Set -- Linux Only}
in variable block mode, it will attempt to set your drive appropriately. All
OSes permit setting variable block mode, but some OSes do not permit setting
the other modes that Bacula needs to function properly.
-\label{compression}
+\label{compression}
\subsubsection*{Checking and Setting Tape Hardware Compression and Blocking
Size}
\index[general]{Checking and Setting Tape Hardware Compression and Blocking
-Size }
+Size}
\index[general]{Size!Checking and Setting Tape Hardware Compression and
-Blocking }
+Blocking}
\addcontentsline{toc}{subsubsection}{Checking and Setting Tape Hardware
Compression and Blocking Size}
On FreeBSD, this would be something like: {\bf mt \ -f \ /dev/nsa0 \ blocksize
\ 0}.
+On some operating systems with some tape drives, the amount of data that
+can be written to the tape and whether or not compression is enabled is
+determined by the density usually the {\bf mt \ -f \ /dev/nst0 setdensity xxx} command.
+Often {\bf mt \ -f \ /dev/nst0 \ status} will print out the current
+density code that is used with the drive. Most systems, but unfortunately
+not all, set the density to the maximum by default. On some systems, you
+can also get a list of all available density codes with:
+{\bf mt \ -f \ /dev/nst0 \ densities} or a similar {\bf mt} command.
+Note, for DLT and SDLT devices, no-compression versus compression is very
+often controlled by the density code. On FreeBSD systems, the compression
+mode is set using {\bf mt \ -f \ /dev/nsa0 \ comp xxx} where xxx is the
+mode you want. In general, see {\bf man mt} for the options available on
+your system.
+
+
If your tape drive requires fixed block sizes (very unusual), you can use the
following records:
\label{FreeBSDTapes}
\subsubsection*{Tape Modes on FreeBSD}
-\index[general]{FreeBSD!Tape Modes on }
-\index[general]{Tape Modes on FreeBSD }
+\index[general]{FreeBSD!Tape Modes on}
+\index[general]{Tape Modes on FreeBSD}
\addcontentsline{toc}{subsubsection}{Tape Modes on FreeBSD}
On most FreeBSD systems such as 4.9 and most tape drives, Bacula should run
\index[general]{FreeBSD!Determining What Tape Drives and Autochangers You Have
}
\index[general]{Determining What Tape Drives and Autochangers You Have on
-FreeBSD }
+FreeBSD}
\addcontentsline{toc}{subsubsection}{Determining What Tape Drives and
Autochangers You Have on FreeBSD}
\label{onstream}
\subsubsection*{Using the OnStream driver on Linux Systems}
-\index[general]{Using the OnStream driver on Linux Systems }
-\index[general]{Systems!Using the OnStream driver on Linux }
+\index[general]{Using the OnStream driver on Linux Systems}
+\index[general]{Systems!Using the OnStream driver on Linux}
\addcontentsline{toc}{subsubsection}{Using the OnStream driver on Linux
Systems}
\label{fill}
\subsubsection*{Using btape to Simulate Filling a Tape}
-\index[general]{Using btape to Simulate Filling a Tape }
-\index[general]{Tape!Using btape to Simulate Filling a }
+\index[general]{Using btape to Simulate Filling a Tape}
+\index[general]{Tape!Using btape to Simulate Filling a}
\addcontentsline{toc}{subsubsection}{Using btape to Simulate Filling a
Tape}
\label{RecoveringFiles}
\subsection*{Recovering Files Written to Tape With Fixed Block Sizes}
-\index[general]{Recovering Files Written to Tape With Fixed Block Sizes }
-\index[general]{Sizes!Recovering Files Written to Tape With Fixed Block }
+\index[general]{Recovering Files Written to Tape With Fixed Block Sizes}
+\index[general]{Sizes!Recovering Files Written to Tape With Fixed Block}
\addcontentsline{toc}{subsection}{Recovering Files Written to Tape With Fixed
Block Sizes}
\label{BlockModes}
\subsection*{Tape Blocking Modes}
-\index[general]{Modes!Tape Blocking }
-\index[general]{Tape Blocking Modes }
+\index[general]{Modes!Tape Blocking}
+\index[general]{Tape Blocking Modes}
\addcontentsline{toc}{subsection}{Tape Blocking Modes}
SCSI tapes may either be written in {\bf variable} or {\bf fixed} block sizes.
\subsection*{Details of Tape Modes}
\index[general]{Modes!Details}
-\index[general]{Details of Tape Modes }
+\index[general]{Details of Tape Modes}
\addcontentsline{toc}{subsection}{Details of Tape Modes}
Rudolf Cejkar has provided the following information concerning
certain tape modes and MTEOM.
\end{description}
\subsection*{Autochanger Errors}
-\index[general]{Errors!Autochanger }
-\index[general]{Autochanger Errors }
+\index[general]{Errors!Autochanger}
+\index[general]{Autochanger Errors}
\addcontentsline{toc}{subsection}{Autochanger Errors}
If you are getting errors such as: