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

Commit

Permalink
defines xdirective latex command
Browse files Browse the repository at this point in the history
\xdirective is more flexible than \directive and should be used, to describe configuration directives.
  • Loading branch information
joergsteffens committed Feb 3, 2014
1 parent 08ae0ea commit 76b8d84
Show file tree
Hide file tree
Showing 10 changed files with 155 additions and 122 deletions.
15 changes: 6 additions & 9 deletions manuals/en/main/ansi-labels.tex
Expand Up @@ -33,26 +33,23 @@ \section{Tape Labels: ANSI or IBM}
\subsection{Director Pool Directive}

\begin{description}
\directive{dir}{Label Type}{ANSI{\textbar}IBM{\textbar}Bareos}{}{Bareos}
This directive is implemented in the Director Pool resource and in the SD Device
\xdirective{dir}{Label Type}{ANSI{\textbar}IBM{\textbar}Bareos}{required}{Bareos}{}{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.}
\end{description}

\subsection{Storage Daemon Device Directives}

\begin{description}
\directive{sd}{Label Type}{ANSI{\textbar}IBM{\textbar}Bareos}{}{}
This directive is implemented in the Director Pool resource and in the SD Device
\xdirective{sd}{Label Type}{ANSI{\textbar}IBM{\textbar}Bareos}{}{}{}{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.
precedence over the value passed from the Director to the SD.}

\directive{sd}{Check Label}{yes{\textbar}no}{}{no}
This directive is implemented in the the SD Device resource. If you intend
\xdirective{sd}{Check Label}{yes{\textbar}no}{}{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 Bareos will check the
label type. Without this directive set to yes, Bareos will assume that
labels are of Bareos type and will not check for ANSI or IBM labels.
In other words, if there is a possibility of Bareos encountering an
ANSI/IBM label, you must set this to yes.
ANSI/IBM label, you must set this to yes.}
\end{description}
71 changes: 62 additions & 9 deletions manuals/en/main/bareos.sty
Expand Up @@ -60,27 +60,80 @@
%%
\newcommand{\warning}[1]{Please note! \textit{#1}}
%%
\newcommand{\sinceVersion}[3]{
\index[#1]{#2}Included since version #3
\index[general]{#3!#2}
\newcommand{\sinceVersion}[3]{Version $>=$ #3.%
\index[#1]{#2}%
\index[general]{#3!#2}%
}
\newcommand{\betaSince}[3]{\index[#1]{#2}Included as beta since version #3. Don't use in productive environment!}
\newcommand{\deprecatedSince}[3]{This option is deprecated since version #3}
\newcommand{\removedSince}[3]{This option is removed since version #3}

\newcommand{\directive}[5]{
% 1: config file
% \newenvironment{directives}[1]
% {%
% \def\configfile{#1}
% \begin{itemize}
% }{%
% \end{itemize}
% }

% \newcommand{\xdirective}[5]{
% %% 1: config file (dir | sd | fd)
% % 2: directive name
% % 3: directive type/value
% % 4: "required" | ""
% % 5: default value
% % 6: since version
% \item [#1 = {\textless}#2{\textgreater}]
% \hfill
% \ifthenelse{\isempty{#4}}{}{(default: #4)}
% \ifthenelse{\isempty{#3}}{}{(#3)}
% \hfill \\
% \index[\configfile]{#1}
% \index[\configfile]{Directive!#1}
% \ifthenelse{\isempty{#5}}{}{\sinceVersion{\configfile}{#1}{#5}}
% }

% deprecated. use xdirective instead.
\newcommand{\directive}[6]{
% 1: config file (dir | sd | fd)
% 2: directive name
% 3: directory type/value
% 3: directive type/value
% 4: "required" | ""
% 5: default value
% 6: since version
\item [#2 = {\textless}#3{\textgreater}]
\hfill
\ifthenelse{\isempty{#5}}{}{(default: #5)}
\ifthenelse{\isempty{#4}}{}{(#4)}
\ifthenelse{\isempty{#6}}{}{\sinceVersion{#1}{#2}{#6}}
\hfill \\
\index[#1]{#2}\index[#1]{Directive!#2}}
% \directive{}{}{}{required}{}
\index[#1]{#2}
\index[#1]{Directive!#2}
}

\newcommand{\xdirective}[7]{
% 1: config file (dir | sd | fd)
% 2: directive name
% 3: directive type/value
% 4: "required" | ""
% 5: default value
% 6: since version
% 7: description
\item [#2 = {\textless}#3{\textgreater}]%
\hfill%
\ifthenelse{\isempty{#5}}{}{(default: #5)}%
\ifthenelse{\isempty{#4}}{}{(#4)}%
\hfill \\%
\index[#1]{#2}%
\index[#1]{Directive!#2}%
#7\ \\%
\ifthenelse{\isempty{#6}}{}{%
\sinceVersion{#1}{#2}{#6}%
%\marginpar{#6}
}%
}
% \xdirective{dir|sd|fd}{name}{type}{required}{default}{version}{}
% \xdirective{}{}{}{required}{}{}{}


% \floatstyle{boxed}
Expand Down Expand Up @@ -152,7 +205,7 @@
basicstyle=\ttfamily,
columns=fullflexible,
%label=config:#1,
caption=#1,
caption=#1,
captionpos=b,
}
}{}
Expand Down
22 changes: 11 additions & 11 deletions manuals/en/main/dirdconf-fileset.tex
Expand Up @@ -24,13 +24,13 @@ \section{FileSet Resource}
Start of the FileSet resource. One {\bf FileSet} resource must be
defined for each Backup job.

\directive{dir}{Name}{name}{required}{}
\directive{dir}{Name}{name}{required}{}{}
The name of the FileSet resource. This directive is required.

\directive{dir}{Description}{text}{}{}
\directive{dir}{Description}{text}{}{}{}
Information only.

\directive{dir}{Enable VSS}{yes{\textbar}no}{}{yes (on Windows)}
\directive{dir}{Enable VSS}{yes{\textbar}no}{}{yes (on Windows)}{}
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. This directive is effective only on the Windows File Daemon.
Expand All @@ -44,7 +44,7 @@ \section{FileSet Resource}
\ilink{Windows}{VSS} chapter of this manual.


\directive{dir}{Ignore FileSet Changes}{yes{\textbar}no}{}{no}
\directive{dir}{Ignore FileSet Changes}{yes{\textbar}no}{}{no}{}
Normally, if you modify the FileSet Include or Exclude lists,
the next backup will be forced to a Full so that Bareos can
guarantee that any additions or deletions are properly saved.
Expand All @@ -60,10 +60,10 @@ \section{FileSet Resource}
Exclude, Bareos will force a Full backup to ensure that everything is
properly backed up.

\directive{dir}{Include}{$\ldots$}{}{}
\directive{dir}{Include}{$\ldots$}{}{}{}
Describe the files, that should get included to a backup, see section about the \ilink{Include Ressource}{fileset-include}.

\directive{dir}{Exclude}{$\ldots$}{}{}
\directive{dir}{Exclude}{$\ldots$}{}{}{}
Describe the files, that should get excluded from a backup, see section about the \ilink{Exclude Ressource}{fileset-exclude}.

\end{description}
Expand Down Expand Up @@ -100,7 +100,7 @@ \subsection{FileSet Include Ressource}


\begin{description}
\directive{dir}{File}{ filename \textbar\ dirname \textbar\ \textbar command \textbar\ \textbackslash\textless includefile-client \textbar\ \textless includefile-server }{}{}
\directive{dir}{File}{ filename \textbar\ dirname \textbar\ \textbar command \textbar\ \textbackslash\textless includefile-client \textbar\ \textless includefile-server }{}{}{}
The file list
consists of one file or directory name per line. Directory names should be
specified without a trailing slash with Unix path notation.
Expand Down Expand Up @@ -360,7 +360,7 @@ \subsection{FileSet Include Ressource}
\directive{dir}{Exclude Dir Containing}{filename}{}{}
\directive{dir}{Exclude Dir Containing}{filename}{}{}{}
This directive can be added to the Include section of the FileSet resource. If the specified
filename ({\bf filename-string}) is found on the Client in any directory to be
backed up, the whole directory will be ignored (not backed up).
Expand Down Expand Up @@ -406,7 +406,7 @@ \subsection{FileSet Include Ressource}
files, directories, etc).
\directive{dir}{Plugin}{plugin-name:plugin-parameter1:plugin-parameter2:$\ldots$}{}{}
\directive{dir}{Plugin}{plugin-name:plugin-parameter1:plugin-parameter2:$\ldots$}{}{}{}
\label{directive-fileset-plugin}
Instead of only specifying files, a file set can also use plugins.
Plugins are additional libraries that handle specific requirements.
Expand All @@ -425,7 +425,7 @@ \subsection{FileSet Include Ressource}
Note: It is also possible to define more than one plugin directive in a FileSet to do several database dumps at once.
\directive{dir}{Options}{$\ldots$}{}{}
\directive{dir}{Options}{$\ldots$}{}{}{}
See the \ilink{File Set Options}{fileset-options} section.
\end{description}
Expand Down Expand Up @@ -1333,7 +1333,7 @@ \subsection{FileSet Exclude Ressource}
FileSet Exclude-Ressources very similar to Include-Ressources, except that they only allow following directives:
\begin{description}
\directive{dir}{File}{ filename \textbar\ dirname \textbar\ \textbar command \textbar\ \textbackslash\textless includefile-client \textbar\ \textless includefile-server }{}{}
\directive{dir}{File}{ filename \textbar\ dirname \textbar\ \textbar command \textbar\ \textbackslash\textless includefile-client \textbar\ \textless includefile-server }{}{}{}
Files to exclude are descripted in the same way as at the \ilink{Include ressource}{fileset-include}.
\end{description}
Expand Down
10 changes: 5 additions & 5 deletions manuals/en/main/dirdconf.tex
Expand Up @@ -203,7 +203,7 @@ \section{Director Resource}
that provide the {\bf setsockopt} TCP\_KEEPIDLE function (Linux, ...).
The default value is zero, which means no change is made to the socket.

\directive{dir}{Maximum Concurrent Jobs}{number}{}{1}
\directive{dir}{Maximum Concurrent Jobs}{number}{}{1}{}
\label{DirMaxConJobs}
%\item [Maximum Concurrent Jobs = {\textless}number{\textgreater}] \hfill \\
\index[dir]{Maximum Concurrent Jobs}
Expand Down Expand Up @@ -3367,20 +3367,20 @@ \section{Catalog Resource}
indicating that all catalog data for that Client is maintained in this
Catalog. This directive is required.

\directive{dir}{dbdriver}{postgresql {\textbar} mysql {\textbar} sqlite}{required}{}
\directive{dir}{dbdriver}{postgresql {\textbar} mysql {\textbar} sqlite}{required}{}{}
Selects the database type to use.

\directive{dir}{dbname}{name}{required}{}
\directive{dir}{dbname}{name}{required}{}{}
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 is known to the server (i.e. you explicitly created the Bareos
tables using this name).

\directive{dir}{dbuser}{user}{required}{}
\directive{dir}{dbuser}{user}{required}{}{}
This specifies what user name to use to log into the database.

\directive{dir}{dbpassword}{password}{required}{}
\directive{dir}{dbpassword}{password}{required}{}{}
This specifies the password to use when logging into the database.


Expand Down
14 changes: 7 additions & 7 deletions manuals/en/main/filedconf.tex
Expand Up @@ -57,7 +57,7 @@ \section{Client Resource}
can be easily identified if you have multiple Clients. This directive is
required.

\directive{fd}{Working Directory}{directory}{}{{\it platform specific}}
\directive{fd}{Working Directory}{directory}{}{{\it platform specific}}{}
% \item [Working Directory = {\textless}Directory{\textgreater}] \hfill \\
% \index[fd]{Working Directory}
% \index[fd]{Directive!Working Directory}
Expand All @@ -78,7 +78,7 @@ \section{Client Resource}
the Director is temporarily put in this directory before being passed
to the Storage daemon).

\directive{fd}{Pid Directory}{directory}{}{{\it platform specific}}
\directive{fd}{Pid Directory}{directory}{}{{\it platform specific}}{}
This directive specifies a directory in which the File Daemon
may put its process Id file files. The process Id file is used to shutdown
Bareos and to prevent multiple copies of Bareos from running simultaneously.
Expand All @@ -92,12 +92,12 @@ \section{Client Resource}
% will be properly expanded.


\directive{fd}{Plugin Directory}{directory}{}{{\it platform specific}}
\directive{fd}{Plugin Directory}{directory}{}{{\it platform specific}}{}
This directive specifies a directory in which the File Daemon searches for
plugins with the name {\bf {\textless}pluginname{\textgreater}-fd.so} which it will load at startup.
Typically on Linux systems, it is set to \path|/usr/lib/bareos/plugins/| or \path|/usr/lib64/bareos/plugins/|.

\directive{fd}{Heartbeat Interval}{time-interval}{}{{0}}
\directive{fd}{Heartbeat Interval}{time-interval}{}{{0}}{}
\index[general]{Heartbeat Interval}
\index[general]{Broken pipe}
\index[general]{slow}
Expand Down Expand Up @@ -131,7 +131,7 @@ \section{Client Resource}
% also be caused by Linux firewalls where you have a rule that throttles
% connections or traffic.

\directive{fd}{Maximum Concurrent Jobs}{number}{}{{2}}
\directive{fd}{Maximum Concurrent Jobs}{number}{}{{2}}{}
where {\textless}number{\textgreater} 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
Expand Down Expand Up @@ -190,7 +190,7 @@ \section{Client Resource}
the resolution can be made either by IPv4 or IPv6. If ip4 is specified, then
only IPv4 resolutions will be permitted, and likewise with ip6.

\directive{fd}{FD Port}{port-number}{}{{9102}}
\directive{fd}{FD Port}{port-number}{}{{9102}}{}
This specifies the port number on which the Client listens for Director
connections. It must agree with the FDPort specified in the Client resource
of the Director's configuration file.
Expand Down Expand Up @@ -228,7 +228,7 @@ \section{Client Resource}
setting the Maximum Network Buffer Size to 32,768 in both the
File daemon and in the Storage daemon.

\directive{fd}{Compatible}{yes{\textbar}no}{}{{yes}}
\directive{fd}{Compatible}{yes{\textbar}no}{}{{yes}}{}
This directive enables the compatible mode of the file daemon. In
this mode the file daemon will try to be as compatible to a native
Bacula file daemon as possible. Enabling this option means that
Expand Down
10 changes: 5 additions & 5 deletions manuals/en/main/migration.tex
Expand Up @@ -90,7 +90,7 @@ \section{Migration and Copy Job Resource Directives}
are used to define a Migration job.

\begin{description}
\directive{dir}{Pool}{pool-name}{required}{}
\directive{dir}{Pool}{pool-name}{required}{}{}
The Pool specified in the Migration
control Job is not a new directive for the Job resource, but it is
particularly important because it determines what Pool will be examined
Expand All @@ -101,7 +101,7 @@ \section{Migration and Copy Job Resource Directives}
directove must contain a {\bf Next Pool = ...} directive to define the
Pool to which the data will be migrated.

\directive{dir}{Type}{Migrate{\textbar}Copy}{required}{}
\directive{dir}{Type}{Migrate{\textbar}Copy}{required}{}{}
\begin{description}
\item [Migrate]
defines the job that is run as being a
Expand All @@ -128,7 +128,7 @@ \section{Migration and Copy Job Resource Directives}
subsequently be used for restoration.
\end{description}

\directive{dir}{Selection Type}{selection-type-keyword}{required}{}
\directive{dir}{Selection Type}{selection-type-keyword}{required}{}{}
The {\textless}selection-type-keyword{\textgreater} determines how the migration job
will go about selecting what JobIds to migrate. In most cases, it is
used in conjunction with a {\bf Selection Pattern} to give you fine
Expand Down Expand Up @@ -211,7 +211,7 @@ \section{Migration and Copy Job Resource Directives}
\end{description}


\directive{dir}{Selection Pattern}{quoted-string}{}{}
\directive{dir}{Selection Pattern}{quoted-string}{}{}{}
The Selection Patterns permitted for each Selection-type-keyword are
described above.

Expand All @@ -225,7 +225,7 @@ \section{Migration and Copy Job Resource Directives}
For the SQLQuery keyword, this pattern must be a valid SELECT SQL statement
that returns JobIds.

\directive{dir}{Purge Migration Job}{yes{\textbar}no}{}{no}
\directive{dir}{Purge Migration Job}{yes{\textbar}no}{}{no}{}
This directive may be added to the Migration Job definition in the Director
configuration file to purge the job migrated at the end of a migration.

Expand Down
4 changes: 2 additions & 2 deletions manuals/en/main/monitorconf.tex
Expand Up @@ -54,7 +54,7 @@ \section{Monitor Resource}
in the {\bf Console} resource of the \ilink{Director's configuration}{DirectorChapter}
file. This record is required if you wish to monitor Directors.

\directive{monitor}{Refresh Interval}{time}{}{5 seconds}
\directive{monitor}{Refresh Interval}{time}{}{5 seconds}{}
Specifies the time to wait between status requests to each daemon. It can't
be set to less than 1 second, or more than 10 minutes, and the default value
is 5 seconds.
Expand Down Expand Up @@ -94,7 +94,7 @@ \section{Director Resource}
daemons. It is not required to be the same as the one defined in the Director's
configuration file. This record is required.

\directive{monitor}{DIRPort}{port-number}{}{9101}
\directive{monitor}{DIRPort}{port-number}{}{9101}{}
Specify the port to use to connect to the Director.
This port must be
identical to the {\bf DIRport} specified in the {\bf Director} resource of the
Expand Down

0 comments on commit 76b8d84

Please sign in to comment.