Skip to content
This repository has been archived by the owner on Mar 19, 2021. It is now read-only.

Commit

Permalink
use wildcard to import configuration files
Browse files Browse the repository at this point in the history
and some cleanups in the configuration chapter.
  • Loading branch information
joergsteffens committed Apr 15, 2016
1 parent 5d545d4 commit 1fa8224
Show file tree
Hide file tree
Showing 8 changed files with 111 additions and 86 deletions.
12 changes: 11 additions & 1 deletion manuals/en/main/bareos.sty
Expand Up @@ -15,7 +15,6 @@
%\def\idir{../../images/conv/} %% images directory
\def\idir{images/}


\newcommand{\bareosFd}{Bareos File Daemon\xspace}
\newcommand{\bareosSd}{Bareos Storage Daemon\xspace}
\newcommand{\bareosDir}{Bareos Director\xspace}
Expand Down Expand Up @@ -99,6 +98,17 @@
% and
% \hyperlink{label}{text}

% short cut for links from check marks to a internal chapter
% \DeclareUnicodeCharacter{2713}{\bcheckmark}
% \DeclareRobustCommand\bcheckmark{%
% \unskip\nobreak\thinspace\textemdash\allowbreak\thinspace\ignorespaces}
\newcommand{\bcheckmark}{x}
% check mark internal link
\newcommand{\cmlink}[1]{\ilink{\bcheckmark}{#1}}




\newcommand{\ticket}[1]{%
\href{https://bugs.bareos.org/view.php?id=#1}{Ticket \##1}%
}
Expand Down
127 changes: 70 additions & 57 deletions manuals/en/main/configure.tex
Expand Up @@ -12,50 +12,38 @@
file containing a set of Resource definitions. These resources are very
similar from one service to another, but may contain different directives
(records) depending on the service. For example, in the Director's resource
file, the {\bf Director} resource defines the name of the Director, a number
file, the \nameref{DirectorResourceDirector} defines the name of the Director, a number
of global Director parameters and his password. In the File daemon
configuration file, the {\bf Director} resource specifies which Directors are
configuration file, the \nameref{ClientResourceDirector} specifies which Directors are
permitted to use the File daemon.

If you install a full Bareos system (Director, Storage and File Daemon) to one system,
the Bareos packages tries there best to generate a working configuration.
However, this configuration is very limited and before you will use Bareos in production,
it will be required, that you customize the configuration.
the Bareos packages tries there best to generate a working configuration as a basis for your individual configuration.


%\addcontentsline{lof}{figure}{Bareos Objects}
%\includegraphics{\idir bareos-objects}
%\label{ResFormat}


%\section{Detailed Information for each Daemon}
\index[general]{Detailed Information for each Daemon}
\index[general]{Daemon!Detailed Information for each}

The details of each Resource and the directives permitted therein are
The details of each resource and the directives permitted therein are
described in the following chapters.

The following configuration files must be defined:

\begin{itemize}
\item
\nameref{ConsoleConfChapter} -- to define the resources for
the Console program (user interface to the Director). It defines which
Directors are available so that you may interact with them.
\item
\nameref{DirectorChapter} -- to define the resources
necessary for the Director. You define all the Clients and Storage daemons
that you use in this configuration file.
that you use in this configuration file.
\item
\nameref{StoredConfChapter} -- to define the resources to
be used by each Storage daemon. Normally, you will have a single Storage
daemon that controls your tape drive or tape drives. However, if you have
tape drives on several machines, you will have at least one Storage daemon
per machine.
\item
\nameref{FiledConfChapter} -- to define the resources for
each client to be backed up. That is, you will have a separate Client
resource file on each machine that runs a File daemon.
resource file on each machine that runs a File daemon.
\item
\nameref{StoredConfChapter} -- to define the resources to
be used by each Storage daemon. Normally, you will have a single Storage
daemon that controls your tape drive or tape drives. However, if you have
tape drives on several machines, you will have at least one Storage daemon
per machine.
\nameref{ConsoleConfChapter} -- to define the resources for
the Console program (user interface to the Director). It defines which
Directors are available so that you may interact with them.
\end{itemize}


Expand Down Expand Up @@ -169,20 +157,41 @@ \subsection{Including other Configuration Files}
\index[general]{Configuration!Including Files}
If you wish to break your configuration file into smaller pieces, you can do
so by including other files using the syntax @{\bf filename} where {\bf
filename} is the full path and filename of another file. The @filename
so by including other files using the syntax \configdirective{@filename}
where \file{filename} is the full path and filename of another file.
The \configdirective{@filename}
specification can be given anywhere a primitive token would appear.
If you wish include all files in a specific directory, you can use the following:
\begin{bconfig}{include configuration files}
# Include subfiles associated with configuration of clients.
# They define the bulk of the Clients, Jobs, and FileSets.
# Remember to "reload" the Director after adding a client file.
#
@|"sh -c 'for f in /etc/bareos/clientdefs/*.conf ; do echo @${f} ; done'"
@/etc/bareos/extra/clients.conf
\end{bconfig}
Since Bareos \sinceVersion{}{Including Configuration files by wildcard}{16.2.1} wildcards in pathes are supported:
\begin{bconfig}{include multiple configuration files}
@/etc/bareos/extra/*.conf
\end{bconfig}
\hide{$}
% Before
% this could be archived by
% If you wish include all files in a specific directory, you can use the following:
% \begin{bconfig}{include configuration files}
% # Include subfiles associated with configuration of clients.
% # They define the bulk of the Clients, Jobs, and FileSets.
% # Remember to "reload" the Director after adding a client file.
% #
% @|"sh -c 'for f in /etc/bareos/clientdefs/*.conf ; do echo @${f} ; done'"
% \end{bconfig}
% \hide{$}
By using \configdirective {@!command} it is also possible to include the output of a script as configuration:
\begin{bconfig}{use the output of a script as configuration}
@|"/etc/bareos/generate_configuration_to_stdout.sh"
\end{bconfig}
or if parameter should be used:
\begin{bconfig}{use the output of a script with parameter as configuration}
@|"sh -c '/etc/bareos/generate_client_configuration_to_stdout.sh clientname=client1.example.com'"
\end{bconfig}
The scripts are called at the start of the daemon. You should use them with care.
\subsection{Data Types}
Expand Down Expand Up @@ -631,44 +640,48 @@ \section{Resource Types}
The following table lists all current Bareos resource types. It shows what
resources must be defined for each service (daemon). The default configuration
files will already contain at least one example of each permitted resource, so
you need not worry about creating all these kinds of resources from scratch.
files will already contain at least one example of each permitted resource.
\addcontentsline{lot}{table}{Resource Types}
\begin{longtable}{|l|c|c|c|c|}
\begin{longtable}{|l||c|c|c|c|}
\hline
\multicolumn{1}{|c| }{\bf Resource } & \multicolumn{1}{c| }{\bf Director } &
\multicolumn{1}{c| }{\bf Client } & \multicolumn{1}{c| }{\bf Storage } &
\multicolumn{1}{c| }{\bf Console } \\
\multicolumn{1}{|c|| }{\bf Resource } &
\multicolumn{1}{c| }{ \ilink{Director}{DirectorConfChapter} } &
\multicolumn{1}{c| }{ \ilink{Client}{FiledConfChapter} } &
\multicolumn{1}{c| }{ \ilink{Storage}{StoredConfChapter} } &
\multicolumn{1}{c| }{ \ilink{Console}{ConsoleConfChapter} } \\
\hline
{Autochanger } & & & x & \\
\hline
{Autochanger} & & & \cmlink{StorageResourceAutochanger} & \\
\hline
{Catalog } & x & & & \\
{Catalog } & \cmlink{DirectorResourceCatalog} & & & \\
\hline
{Client } & \cmlink{DirectorResourceClient} & \cmlink{ClientResourceClient} & & \\
\hline
{Client } & x & x & & \\
{Console } & \cmlink{DirectorResourceConsole} & & & \cmlink{ConsoleResourceConsole} \\
\hline
{Console } & x & & & x \\
{Device } & & & \cmlink{StorageResourceDevice} & \\
\hline
{Device } & & & x & \\
{Director } & \cmlink{DirectorResourceDirector} & \cmlink{ClientResourceDirector} & \cmlink{StorageResourceDirector} & \cmlink{ConsoleResourceDirector} \\
\hline
{Director } & x & x & x & x \\
{FileSet } & \cmlink{DirectorResourceFileSet} & & & \\
\hline
{FileSet } & x & & & \\
{Job} & \cmlink{DirectorResourceJob} & & & \\
\hline
{Job } & x & & & \\
{JobDefs } & \cmlink{DirectorResourceJobDefs} & & & \\
\hline
{JobDefs } & x & & & \\
{Message } & \cmlink{ResourceMessages} & \cmlink{ResourceMessages} & \cmlink{ResourceMessages} & \\
\hline
{Message } & x & x & x & \\
{NDMP } & & & \cmlink{StorageResourceNDMP} & \\
\hline
{NDMP } & & & x & \\
{Pool } & \cmlink{DirectorResourcePool} & & & \\
\hline
{Pool } & x & & & \\
{Profile} & \cmlink{DirectorResourceProfile} & & & \\
\hline
{Schedule } & x & & & \\
{Schedule } & \cmlink{DirectorResourceSchedule} & & & \\
\hline
{Storage } & x & & x &
\\ \hline
{Storage } & \cmlink{DirectorResourceStorage} & & \cmlink{StorageResourceStorage} & \\
\hline
\end{longtable}
\section{Names, Passwords and Authorization}
Expand Down
4 changes: 2 additions & 2 deletions manuals/en/main/consoleconf.tex
Expand Up @@ -18,7 +18,7 @@ \chapter{Console Configuration}
The following Console Resource definition must be defined:

\section{Director Resource}
\label{DirectorResource3}
\label{ConsoleResourceDirector}
\index[general]{Director Resource}
\index[general]{Resource!Director}

Expand Down Expand Up @@ -90,7 +90,7 @@ \section{ConsoleFont Resource}
}

\section{Console Resource}
\label{ConsoleResource}
\label{ConsoleResourceConsole}
\index[general]{Console Resource}
\index[general]{Resource!Console}

Expand Down
1 change: 1 addition & 0 deletions manuals/en/main/dirdconf.tex
@@ -1,6 +1,7 @@

\chapter{Director Configuration}
\label{DirectorChapter}
\label{DirectorConfChapter}
\index[general]{Director!Configuring the}
\index[general]{Configuring the Director}

Expand Down
8 changes: 4 additions & 4 deletions manuals/en/main/filedconf.tex
Expand Up @@ -18,18 +18,18 @@ \chapter{Client/File Daemon Configuration}

\begin{itemize}
\item
\ilink{Client}{ClientResource} -- to define what Clients are to
\ilink{Client}{ClientResourceClient} -- to define what Clients are to
be backed up.
\item
\ilink{Director}{DirectorResource} -- to define the Director's
\ilink{Director}{ClientResourceDirector} -- to define the Director's
name and its access password.
\item
\ilink{Messages}{MessagesChapter} -- to define where error and
information messages are to be sent.
\end{itemize}

\section{Client Resource}
\label{ClientResource}
\label{ClientResourceClient}
\index[general]{Resource!Client}
\index[general]{Client Resource}

Expand All @@ -56,7 +56,7 @@ \section{Client Resource}
\normalsize

\section{Director Resource}
\label{DirectorResource}
\label{ClientResourceDirector}
\index[general]{Director Resource}
\index[general]{Resource!Director}

Expand Down
1 change: 1 addition & 0 deletions manuals/en/main/messagesres.tex
Expand Up @@ -2,6 +2,7 @@
\chapter{Messages Resource}
\label{MessagesChapter}
\label{MessagesResource}
\label{ResourceMessages}
\index[general]{Resource!Messages}
\index[general]{Messages Resource}

Expand Down
8 changes: 3 additions & 5 deletions manuals/en/main/storedconf-autochangerres.tex
Expand Up @@ -3,7 +3,7 @@ \section{Autochanger Resource}
\index[sd]{Autochanger Resource}
\index[sd]{Resource!Autochanger}
\label{AutochangerRes}
\label{AutochangerResource1}
\label{StorageResourceAutochanger}


The Autochanger resource supports single or multiple drive
Expand All @@ -22,8 +22,7 @@ \section{Autochanger Resource}

The following is an example of a valid Autochanger resource definition:

\footnotesize
\begin{verbatim}
\begin{bconfig}{Autochanger Configuration Example}
Autochanger {
Name = "DDS-4-changer"
Device = DDS-4-1, DDS-4-2, DDS-4-3
Expand All @@ -48,8 +47,7 @@ \section{Autochanger Resource}
Autoselect = no
...
}
\end{verbatim}
\normalsize
\end{bconfig}

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
Expand Down
36 changes: 19 additions & 17 deletions manuals/en/main/storedconf.tex
Expand Up @@ -3,7 +3,8 @@

\chapter{Storage Daemon Configuration}
\label{StoredConfChapter}
\index[general]{Storage Daemon Configuration}
\index[sd]{Configuration}
\index[general]{Storage Daemon!Configuration}
\index[general]{Configuration!Storage Daemon}

The \bareosSd configuration file has relatively few resource definitions.
Expand All @@ -21,13 +22,13 @@ \chapter{Storage Daemon Configuration}

\begin{itemize}
\item
\ilink{Storage}{StorageResource} -- to define the name of the
\ilink{Storage}{StorageResourceStorage} -- to define the name of the
Storage daemon.
\item
\ilink{Director}{DirectorResource1} -- to define the Director's
\ilink{Director}{StorageResourceDirector} -- to define the Director's
name and his access password.
\item
\ilink{Device}{DeviceResource} -- to define the
\ilink{Device}{StorageResourceDevice} -- to define the
characteristics of your storage device (tape drive).
\item
\ilink{Messages}{MessagesChapter} -- to define where error and
Expand All @@ -37,16 +38,16 @@ \chapter{Storage Daemon Configuration}
Following resources are optional:
\begin{itemize}
\item
\nameref{AutochangerRes} -- to define Autochanger devices.
\nameref{StorageResourceAutochanger} -- to define Autochanger devices.
\item
\nameref{NDMPResource} -- to define the NDMP authentication
\nameref{StorageResourceNDMP} -- to define the NDMP authentication
context.
\end{itemize}

\section{Storage Resource}
\label{StorageResource}
\index[general]{Resource!Storage}
\index[general]{Storage!Resource}
\label{StorageResourceStorage}
\index[sd]{Resource!Storage}
\index[sd]{Storage!Resource}

In general, the properties specified under the Storage resource define global
properties of the Storage daemon. Each Storage daemon configuration file must
Expand Down Expand Up @@ -80,9 +81,9 @@ \section{Storage Resource}
\end{bconfig}

\section{Director Resource}
\label{DirectorResource1}
\index[general]{Resource!Director}
\index[general]{Director!Resource}
\label{StorageResourceDirector}
\index[sd]{Resource!Director}
\index[sd]{Director!Resource}

The Director resource specifies the Name of the Director which is permitted
to use the services of the Storage daemon. There may be multiple Director
Expand All @@ -105,8 +106,9 @@ \section{Director Resource}

\section{NDMP Resource}
\label{NDMPResource}
\index[general]{Resource!NDMP}
\index[general]{NDMP!Resource}
\label{StorageResourceNDMP}
\index[sd]{Resource!NDMP}
\index[sd]{NDMP!Resource}

The NDMP Resource specifies the authentication details of each NDMP client.
There may be multiple NDMP resources for a single Storage daemon. In general,
Expand All @@ -119,9 +121,9 @@ \section{NDMP Resource}


\section{Device Resource}
\label{DeviceResource}
\index[general]{Resource!Device}
\index[general]{Device!Resource}
\label{StorageResourceDevice}
\index[sd]{Resource!Device}
\index[sd]{Device!Resource}

The Device Resource specifies the details of each device (normally a tape
drive) that can be used by the Storage daemon. There may be multiple
Expand Down

0 comments on commit 1fa8224

Please sign in to comment.