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

Commit

Permalink
Browse files Browse the repository at this point in the history
fix build for html version
  • Loading branch information
joergsteffens committed Oct 24, 2014
1 parent 91727c4 commit 63daebc
Show file tree
Hide file tree
Showing 14 changed files with 157 additions and 75 deletions.
15 changes: 14 additions & 1 deletion manuals/en/main/bareos.sty
Expand Up @@ -356,12 +356,12 @@ Version $>=$ #3%
}{}


\definecolor{colorConfig}{gray}{0.9}

\lstnewenvironment{bconfig}[1]{%
% #1 caption
\renewcommand*{\lstlistingname}{Configuration}
\footnotesize
\definecolor{colorConfig}{gray}{0.9}
\lstset{
backgroundcolor=\color{colorConfig},
frame=single,
Expand All @@ -377,6 +377,19 @@ Version $>=$ #3%
}
}{}

\newcommand{\bconfigInput}[1]{
{
\footnotesize
% \lstinputlisting[backgroundcolor=\color{colorConfig},frame=single,framerule=0pt,basicstyle=\ttfamily,keepspaces=true,columns=fullflexible,moredelim=[is][\it]{<input>}{</input>},moredelim=[is][\underline]{<strong>}{</strong>}]{#1}
\lstinputlisting[
backgroundcolor=\color{colorConfig},
frame=single,framerule=0pt,
basicstyle=\ttfamily,
keepspaces=true,
columns=fullflexible
]{#1}
}
}

\lstnewenvironment{config}[1]{%
% #1 caption
Expand Down
2 changes: 2 additions & 0 deletions manuals/en/main/config/DirJobRun1.conf
@@ -0,0 +1,2 @@
run = "Nightly-backup level=%l since=\"%s\" storage=DDS-4"

8 changes: 8 additions & 0 deletions manuals/en/main/config/DirJobRunAfterFailedJob1.conf
@@ -0,0 +1,8 @@
Run Script {
Command = "echo test"
Runs When = After
Runs On Failure = yes
Runs On Client = no
Runs On Success = yes # default, you can drop this line
}

2 changes: 2 additions & 0 deletions manuals/en/main/config/DirJobRunBeforeJob1.conf
@@ -0,0 +1,2 @@
Run Before Job = "echo test"

5 changes: 5 additions & 0 deletions manuals/en/main/config/DirJobRunBeforeJob2.conf
@@ -0,0 +1,5 @@
Run Script {
Command = "echo test"
Runs On Client = No
Runs When = Before
}
2 changes: 2 additions & 0 deletions manuals/en/main/config/DirJobRunScript1.conf
@@ -0,0 +1,2 @@
Console = "prune files client=\%c"
Console = "update stats age=3"
11 changes: 11 additions & 0 deletions manuals/en/main/config/DirJobRunScript2.conf
@@ -0,0 +1,11 @@
Run Script {
RunsWhen = Before
FailJobOnError = No
Command = "/etc/init.d/apache stop"
}

RunScript {
RunsWhen = After
RunsOnFailure = Yes
Command = "/etc/init.d/apache start"
}
5 changes: 5 additions & 0 deletions manuals/en/main/config/DirJobRunScript3.conf
@@ -0,0 +1,5 @@
Client Run Before Job = "systemstate"
or
Client Run Before Job = "systemstate.bat"
or
Client Run Before Job = "\"C:/Program Files/Bareos/systemstate.bat\""
2 changes: 2 additions & 0 deletions manuals/en/main/config/DirJobStripPrefix1.conf
@@ -0,0 +1,2 @@
Strip Prefix = c:
Add Prefix = d:
5 changes: 5 additions & 0 deletions manuals/en/main/config/DirJobWriteBootstrap1.conf
@@ -0,0 +1,5 @@
Job Defs {
...
Write Bootstrap = "%c_%n.bsr"
...
}
5 changes: 5 additions & 0 deletions manuals/en/main/config/DirPoolActionOnPurge1.conf
@@ -0,0 +1,5 @@
Pool {
Name = Default
Action On Purge = Truncate
...
}
9 changes: 9 additions & 0 deletions manuals/en/main/config/DirPoolActionOnPurge2.conf
@@ -0,0 +1,9 @@
Job {
Name = CatalogBackup
...
RunScript {
RunsWhen=After
RunsOnClient=No
Console = "purge volume action=all allpools storage=File"
}
}
122 changes: 66 additions & 56 deletions manuals/en/main/director-resource-job-definitions.tex
Expand Up @@ -832,9 +832,10 @@
enclosed in double quotes, and thus they must be preceded by a backslash
since they are already inside quotes. For example:

\begin{bconfig}{}^^J
run = "Nightly-backup level=\%l since=\\"\%s\\" storage=DDS-4"^^J
\end{bconfig}
% \begin{bconfig}{}^^J
% run = "Nightly-backup level=\%l since=\\"\%s\\" storage=DDS-4"^^J
% \end{bconfig}
\bconfigInput{config/DirJobRun1.conf}

A cloned job will not start additional clones, so it is not
possible to recurse.
Expand Down Expand Up @@ -862,15 +863,16 @@
for the {\bf RunScript} directive. Note, if you wish that your script
will run regardless of the exit status of the Job, you can use this:

\begin{bconfig}{Run Script that runs after all jobs (successful and failed)}^^J
Run Script \{^^J
\ Command = "echo test"^^J
\ Runs When = After^^J
\ Runs On Failure = yes^^J
\ Runs On Client = no^^J
\ Runs On Success = yes \# default, you can drop this line^^J
\}^^J
\end{bconfig}
% \begin{bconfig}{Run Script that runs after all jobs (successful and failed)}^^J
% Run Script \{^^J
% \ Command = "echo test"^^J
% \ Runs When = After^^J
% \ Runs On Failure = yes^^J
% \ Runs On Client = no^^J
% \ Runs On Success = yes \# default, you can drop this line^^J
% \}^^J
% \end{bconfig}
\bconfigInput{config/DirJobRunAfterFailedJob1.conf}
}

\defDirective{Dir}{Job}{Run After Job}{}{}{%
Expand All @@ -895,19 +897,21 @@
exit code of the program run is non-zero, the current Bareos job will be
canceled.

\begin{bconfig}{}^^J
Run Before Job = "echo test"^^J
\end{bconfig}
% \begin{bconfig}{}^^J
% Run Before Job = "echo test"^^J
% \end{bconfig}
\bconfigInput{config/DirJobRunBeforeJob1.conf}

it's equivalent to :

\begin{bconfig}{}^^J
RunScript \{^^J
\ Command = "echo test"^^J
\ Runs On Client = No^^J
\ Runs When = Before^^J
\}^^J
\end{bconfig}
% \begin{bconfig}{}^^J
% RunScript \{^^J
% \ Command = "echo test"^^J
% \ Runs On Client = No^^J
% \ Runs When = Before^^J
% \}^^J
% \end{bconfig}
\bconfigInput{config/DirJobRunBeforeJob2.conf}
%
% Lutz Kittler has pointed out that using the RunBeforeJob directive can be a
% simple way to modify your schedules during a holiday. For example, suppose
Expand Down Expand Up @@ -941,10 +945,11 @@
more information. You need to specify needed information on command line, nothing
will be prompted. Example:

\begin{bconfig}{Run Script Console commands}^^J
Console = "prune files client=\%c"^^J
Console = "update stats age=3"^^J
\end{bconfig}
% \begin{bconfig}{Run Script Console commands}^^J
% Console = "prune files client=\%c"^^J
% Console = "update stats age=3"^^J
% \end{bconfig}
\bconfigInput{config/DirJobRunScript1.conf}

You can specify more than one Command/Console option per RunScript.

Expand Down Expand Up @@ -1051,19 +1056,20 @@
\end{tabular}

Examples:
\begin{bconfig}{Run Script Examples}^^J
RunScript \{^^J
\ \ RunsWhen = Before^^J
\ \ FailJobOnError = No^^J
\ \ Command = "/etc/init.d/apache stop"^^J
\}^^J
^^J
RunScript \{^^J
\ \ RunsWhen = After^^J
\ \ RunsOnFailure = yes^^J
\ \ Command = "/etc/init.d/apache start"^^J
\}^^J
\end{bconfig}
% \begin{bconfig}{Run Script Examples}^^J
% RunScript \{^^J
% \ \ RunsWhen = Before^^J
% \ \ FailJobOnError = No^^J
% \ \ Command = "/etc/init.d/apache stop"^^J
% \}^^J
% ^^J
% RunScript \{^^J
% \ \ RunsWhen = After^^J
% \ \ RunsOnFailure = yes^^J
% \ \ Command = "/etc/init.d/apache start"^^J
% \}^^J
% \end{bconfig}
\bconfigInput{config/DirJobRunScript2.conf}

{\bf Notes about ClientRunBeforeJob}

Expand Down Expand Up @@ -1116,13 +1122,14 @@
%\end{bconfig}
% \normalsize

\begin{bconfig}{Windows systemstate Run Script}^^J
Client Run Before Job = "systemstate"^^J
or^^J
Client Run Before Job = "systemstate.bat"^^J
or^^J
Client Run Before Job = "\\"C:/Program Files/Bareos/systemstate.bat\\""^^J
\end{bconfig}
% \begin{bconfig}{Windows systemstate Run Script}^^J
% Client Run Before Job = "systemstate"^^J
% or^^J
% Client Run Before Job = "systemstate.bat"^^J
% or^^J
% Client Run Before Job = "\\"C:/Program Files/Bareos/systemstate.bat\\""^^J
% \end{bconfig}
\bconfigInput{config/DirJobRunScript3.conf}

% \begin{itemize}
% \item \path|Client Run Before Job = "systemstate"|
Expand Down Expand Up @@ -1340,10 +1347,12 @@
Under Windows, if you want to restore \texttt{c:/files} to \texttt{d:/files},
you can use:

\begin{bconfig}{}^^J
Strip Prefix = c:^^J
Add Prefix = d:^^J
\end{bconfig}
% \begin{bconfig}{}^^J
% Strip Prefix = c:^^J
% Add Prefix = d:^^J
% \end{bconfig}
%
\bconfigInput{config/DirJobStripPrefix1.conf}
}

\defDirective{Dir}{Job}{Type}{}{}{%
Expand Down Expand Up @@ -1442,12 +1451,13 @@
\ilink{character substitution}{character substitution} like in RunScript
directive. To automatically manage your bootstrap files, you can use
this in your {\bf JobDefs} resources:
\begin{bconfig}{Write Bootstrap Example}^^J
Job Defs \{^^J
\ \ Write Bootstrap = "\%c_\%n.bsr"^^J
\ \ ...^^J
\}^^J
\end{bconfig}
% \begin{bconfig}{Write Bootstrap Example}^^J
% Job Defs \{^^J
% \ \ Write Bootstrap = "\%c_\%n.bsr"^^J
% \ \ ...^^J
% \}^^J
% \end{bconfig}
\bconfigInput{config/DirJobWriteBootstrap1.conf}

For more details on using this file, please see chapter \nameref{BootstrapChapter}.
}
Expand Down
39 changes: 21 additions & 18 deletions manuals/en/main/director-resource-pool-definitions.tex
Expand Up @@ -4,28 +4,31 @@
command. It is useful to prevent disk based volumes from consuming too much
space.

\begin{bconfig}{}^^J
Pool \{^^J
\ Name = Default^^J
\ Action On Purge = Truncate^^J
\ ...^^J
\}^^J
\end{bconfig}
% \begin{bconfig}{}^^J
% Pool \{^^J
% \ Name = Default^^J
% \ Action On Purge = Truncate^^J
% \ ...^^J
% \}^^J
% \end{bconfig}
\bconfigInput{config/DirPoolActionOnPurge1.conf}


You can schedule the truncate operation at the end of your CatalogBackup job
like in this example:

\begin{bconfig}{}^^J
Job \{^^J
\ Name = CatalogBackup^^J
\ ...^^J
\ RunScript \{^^J
\ \ RunsWhen=After^^J
\ \ RunsOnClient=No^^J
\ \ Console = "purge volume action=all allpools storage=File"^^J
\ \}^^J
\}^^J
\end{bconfig}
% \begin{bconfig}{}^^J
% Job \{^^J
% \ Name = CatalogBackup^^J
% \ ...^^J
% \ RunScript \{^^J
% \ \ RunsWhen=After^^J
% \ \ RunsOnClient=No^^J
% \ \ Console = "purge volume action=all allpools storage=File"^^J
% \ \}^^J
% \}^^J
% \end{bconfig}
\bconfigInput{config/DirPoolActionOnPurge2.conf}
}

\defDirective{Dir}{Pool}{Autoprune}{}{}{%
Expand Down

0 comments on commit 63daebc

Please sign in to comment.