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

Commit

Permalink
use autodoc for Catalog, Console, Counter resources
Browse files Browse the repository at this point in the history
Signed-off-by: Joerg Steffens <joerg.steffens@bareos.com>
  • Loading branch information
K. Timme authored and joergsteffens committed Nov 3, 2014
1 parent 6550bdd commit f356814
Show file tree
Hide file tree
Showing 5 changed files with 116 additions and 249 deletions.
2 changes: 2 additions & 0 deletions manuals/en/main/config/DirConsoleJobACL1.conf
@@ -0,0 +1,2 @@
JobACL = "Backup client 1", "Backup client 2"
JobACL = "RestoreFiles"
256 changes: 9 additions & 247 deletions manuals/en/main/dirdconf.tex
Expand Up @@ -487,65 +487,10 @@ \section{Catalog Resource}
or on a different machine on the network. See below for more details.

\input{autogenerated/director-resource-catalog-table.tex}
\input{director-resource-catalog-definitions.tex}
\input{autogenerated/director-resource-catalog-description.tex}

\begin{description}

\item [Catalog]
\index[dir]{Catalog}
\index[dir]{Directive!Catalog}
Start of the Catalog resource. At least one Catalog resource must be
defined.

\item [Name = {\textless}name{\textgreater}] \hfill \\
\index[dir]{Name}
\index[dir]{Directive!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.

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

\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}{}{}
This specifies what user name to use to log into the database.

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


\item [DB Socket = {\textless}socket-name{\textgreater}] \hfill \\
\index[dir]{DB Socket}
\index[dir]{Directive!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. If the DB Socket is specified, the
MySQL server must reside on the same machine as the Director.

\item [DB Address = {\textless}address{\textgreater}] \hfill \\
\index[dir]{DB Address}
\index[dir]{Directive!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
only by MySQL and PostgreSQL and is ignored by SQLite if provided.
This directive is optional.

\item [DB Port = {\textless}port{\textgreater}] \hfill \\
\index[dir]{DB Port}
\index[dir]{Directive!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 PostgreSQL and is ignored by SQLite if provided. This
directive is optional.
% \begin{description}

%% \item [Multiple Connections = {\textless}yes{\textbar}no{\textgreater}] \hfill \\
%% \index[dir]{Multiple Connections}
Expand All @@ -568,49 +513,7 @@ \section{Catalog Resource}
%% This directive has not been tested. Please test carefully before running it
%% in production and report back your results.

\item [Disable Batch Insert = {\textless}yes{\textbar}no{\textgreater}] \hfill \\
\index[dir]{Disable Batch Insert}
\index[dir]{Directive!Disable Batch Insert}
This directive allows you to override at runtime if the Batch insert should
be enabled or disabled. Normally this is determined by querying the database
library if it is thread-safe. If you think that disabling Batch insert will make
your backup run faster you may disable it using this option and set it to {\bf Yes}

\item [Min Connections = {\textless}Number{\textgreater}] \hfill \\
\index[dir]{Min Connections}
\index[dir]{Directive!Min Connections}
This directive is used by the experimental database pooling functionality. Only use
this for non production sites. This sets the minimum number of connections to a
database to keep in this database pool.

\item [Max Connections = {\textless}Number{\textgreater}] \hfill \\
\index[dir]{Max Connections}
\index[dir]{Directive!Max Connections}
This directive is used by the experimental database pooling functionality. Only use
this for non production sites. This sets the maximum number of connections to a
database to keep in this database pool.

\item [Inc Connections = {\textless}Number{\textgreater}] \hfill \\
\index[dir]{}
\index[dir]{Directive!}
This directive is used by the experimental database pooling functionality. Only use
this for non production sites. This sets the number of connections to add to a
database pool when not enough connections are available on the pool anymore.

\item [Idle Timeout = {\textless}Number{\textgreater}] \hfill \\
\index[dir]{Idle Timeout}
\index[dir]{Directive!Idle Timeout}
This directive is used by the experimental database pooling functionality. Only use
this for non production sites. This sets the idle time after which a database pool
should be shrinked.

\item [Validate Timeout = {\textless}Number{\textgreater}] \hfill \\
\index[dir]Validate Timeout{}
\index[dir]{Directive!Validate Timeout}
This directive is used by the experimental database pooling functionality. Only use
this for non production sites. This sets the validation timeout after which the
database connection is polled to see if its still alive.
\end{description}
% \end{description}

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

Expand Down Expand Up @@ -699,111 +602,12 @@ \section{Console Resource}
directives are permitted within the Director's configuration resource:

\input{autogenerated/director-resource-console-table.tex}
\input{director-resource-console-definitions.tex}
\input{autogenerated/director-resource-console-description.tex}

\begin{description}

\item [Name = {\textless}name{\textgreater}] \hfill \\
\index[dir]{Name}
\index[dir]{Directive!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 = {\textless}password{\textgreater}] \hfill \\
\index[dir]{Password}
\index[dir]{Directive!Password}
Specifies the password that must be supplied for a named Bareos 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 created with the password. This directive
is required.

The password is plain text. It is not generated through any special
process. However, it is preferable for security reasons to choose
random text.

\item [JobACL = {\textless}name-list{\textgreater}] \hfill \\
\index[dir]{JobACL}
\index[dir]{Directive!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 specified by separating them with commas, and/or by specifying
multiple JobACL directives. For example, the directive may be specified
as:

\footnotesize
\begin{verbatim}
JobACL = "Backup client 1", "Backup client 2"
JobACL = "RestoreFiles"
\end{verbatim}
\normalsize

With the above specification, the console can access the Director's resources
for the four jobs named on the JobACL directives, but for no others.

\item [ClientACL = {\textless}name-list{\textgreater}] \hfill \\
\index[dir]{ClientACL}
\index[dir]{Directive!ClientACL}
This directive is used to specify a list of Client resource names that can
be
accessed by the console.

\item [StorageACL = {\textless}name-list{\textgreater}] \hfill \\
\index[dir]{StorageACL}
\index[dir]{Directive!StorageACL}
This directive is used to specify a list of Storage resource names that can
be accessed by the console.

\item [ScheduleACL = {\textless}name-list{\textgreater}] \hfill \\
\index[dir]{ScheduleACL}
\index[dir]{Directive!ScheduleACL}
This directive is used to specify a list of Schedule resource names that can
be accessed by the console.

\item [PoolACL = {\textless}name-list{\textgreater}] \hfill \\
\index[dir]{PoolACL}
\index[dir]{Directive!PoolACL}
This directive is used to specify a list of Pool resource names that can be
accessed by the console.

\item [FileSetACL = {\textless}name-list{\textgreater}] \hfill \\
\index[dir]{FileSetACL}
\index[dir]{Directive!FileSetACL}
This directive is used to specify a list of FileSet resource names that
can be accessed by the console.

\item [CatalogACL = {\textless}name-list{\textgreater}] \hfill \\
\index[dir]{CatalogACL}
\index[dir]{Directive!CatalogACL}
This directive is used to specify a list of Catalog resource names that
can be accessed by the console.

\item [CommandACL = {\textless}name-list{\textgreater}] \hfill \\
\index[dir]{CommandACL}
\index[dir]{Directive!CommandACL}
This directive is used to specify a list of of console commands that can
be executed by the console.

\item [WhereACL = {\textless}string{\textgreater}] \hfill \\
\index[dir]{WhereACL}
\index[dir]{Directive!WhereACL}
This directive permits you to specify where a restricted console
can restore files. If this directive is not specified, only the
default restore location is permitted (normally {\bf
/tmp/bareos-restores}. If {\bf *all*} is specified any path the
user enters will be accepted (not very secure), any other
value specified (there may be multiple WhereACL directives) will
restrict the user to use that path. For example, on a Unix system,
if you specify "/", the file will be restored to the original
location. This directive is untested.

\end{description}

Aside from Director resource names and console command names, the special
keyword {\bf *all*} can be specified in any of the above access control lists.
keyword {\bf all} can be specified in any of the above access control lists.
When this keyword is present, any resource or command name (which ever is
appropriate) will be accepted. For an example configuration file, please see
the \ilink{Console Configuration}{ConsoleConfChapter} chapter of this manual.
Expand All @@ -818,50 +622,8 @@ \section{Counter Resource}
directive.

\input{autogenerated/director-resource-counter-table.tex}

\begin{description}

\item [Counter]
\index[dir]{Counter}
\index[dir]{Directive!Counter}
Start of the Counter resource. Counter directives are optional.

\item [Name = {\textless}name{\textgreater}] \hfill \\
\index[dir]{Name}
\index[dir]{Directive!Name}
The name of the Counter. This is the name you will use in the variable
expansion to reference the counter value.

\item [Minimum = {\textless}integer{\textgreater}] \hfill \\
\index[dir]{Minimum}
\index[dir]{Directive!Minimum}
This specifies the minimum value that the counter can have. It also becomes
the default. If not supplied, zero is assumed.

\item [Maximum = {\textless}integer{\textgreater}] \hfill \\
\index[dir]{Maximum}
\index[dir]{Directive!Maximum}
\index[dir]{Directive!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 = {\textless}counter-name{\textgreater}] \hfill \\
%\index[dir]{*WrapCounter}
%\index[dir]{Directive!*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 = {\textless}catalog-name{\textgreater}] \hfill \\
\index[dir]{Catalog}
\index[dir]{Directive!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 Bareos is started.
\end{description}
\input{director-resource-counter-definitions.tex}
\input{autogenerated/director-resource-counter-description.tex}

\section{Example Director Configuration File}
\label{SampleDirectorConfiguration}
Expand Down
49 changes: 47 additions & 2 deletions manuals/en/main/director-resource-catalog-definitions.tex
Expand Up @@ -2,48 +2,90 @@
}

\defDirective{Dir}{Catalog}{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
only by MySQL and PostgreSQL and is ignored by SQLite if provided.
This directive is optional.
}

\defDirective{Dir}{Catalog}{DB Driver}{}{}{%
\defDirective{Dir}{Catalog}{DB Driver}{postgresql {\textbar} mysql {\textbar} sqlite}{}{%
Selects the database type to use.
}

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

\defDirective{Dir}{Catalog}{DB Password}{}{}{%
This specifies the password to use when logging into the database.
}

\defDirective{Dir}{Catalog}{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 PostgreSQL and is ignored by SQLite if provided. This
directive is optional.
}

\defDirective{Dir}{Catalog}{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. If the DB Socket is specified, the
MySQL server must reside on the same machine as the Director.
}

\defDirective{Dir}{Catalog}{DB User}{}{}{%
\defDirective{Dir}{Catalog}{DB User}{user}{}{%
This specifies what user name to use to log into the database.
}

\defDirective{Dir}{Catalog}{Description}{}{}{%
}

\defDirective{Dir}{Catalog}{Disable Batch Insert}{}{}{%
This directive allows you to override at runtime if the Batch insert should
be enabled or disabled. Normally this is determined by querying the database
library if it is thread-safe. If you think that disabling Batch insert will make
your backup run faster you may disable it using this option and set it to {\bf Yes}
}

\defDirective{Dir}{Catalog}{Idle Timeout}{}{}{%
This directive is used by the experimental database pooling functionality. Only use
this for non production sites. This sets the idle time after which a database pool
should be shrinked.
}

\defDirective{Dir}{Catalog}{Inc Connections}{}{}{%
This directive is used by the experimental database pooling functionality. Only use
this for non production sites. This sets the number of connections to add to a
database pool when not enough connections are available on the pool anymore.
}

\defDirective{Dir}{Catalog}{Max Connections}{}{}{%
This directive is used by the experimental database pooling functionality. Only use
this for non production sites. This sets the maximum number of connections to a
database to keep in this database pool.
}

\defDirective{Dir}{Catalog}{Min Connections}{}{}{%
This directive is used by the experimental database pooling functionality. Only use
this for non production sites. This sets the minimum number of connections to a
database to keep in this database pool.
}

\defDirective{Dir}{Catalog}{Multiple Connections}{}{}{%
}

\defDirective{Dir}{Catalog}{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.
}

\defDirective{Dir}{Catalog}{Password}{}{}{%
Expand All @@ -53,5 +95,8 @@
}

\defDirective{Dir}{Catalog}{Validate Timeout}{}{}{%
This directive is used by the experimental database pooling functionality. Only use
this for non production sites. This sets the validation timeout after which the
database connection is polled to see if its still alive.
}

0 comments on commit f356814

Please sign in to comment.