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

Commit

Permalink
improve TOC, some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
joergsteffens committed Sep 19, 2013
1 parent 6d820fe commit 4bf293f
Show file tree
Hide file tree
Showing 22 changed files with 409 additions and 407 deletions.
6 changes: 3 additions & 3 deletions manuals/en/main/ansi-labels.tex
@@ -1,5 +1,5 @@

\chapter{ANSI and IBM Tape Labels}
\section{Tape Labels: ANSI or IBM}
\label{AnsiLabelsChapter}
\index[general]{Labels!Tape}
\index[general]{Tape!Label!ANSI}
Expand Down Expand Up @@ -30,7 +30,7 @@ \chapter{ANSI and IBM Tape Labels}
and multiple backup programs.


\section{Director Pool Directive}
\subsection{Director Pool Directive}

\begin{description}
\directive{dir}{Label Type}{ANSI{\textbar}IBM{\textbar}Bareos}{}{Bareos}
Expand All @@ -39,7 +39,7 @@ \section{Director Pool Directive}
precedence over the value passed from the Director to the SD.
\end{description}

\section{Storage Daemon Device Directives}
\subsection{Storage Daemon Device Directives}

\begin{description}
\directive{sd}{Label Type}{ANSI{\textbar}IBM{\textbar}Bareos}{}{}
Expand Down
162 changes: 83 additions & 79 deletions manuals/en/main/bconsole.tex
Expand Up @@ -35,8 +35,7 @@ \section{Console Configuration}
of the Console, and at the current time, the only Resource Record defined
is the Director resource, which gives the Console the name and address of
the Director. For more information on configuration of the Console
program, please see the \ilink{Console Configuration
File}{ConsoleConfChapter} Chapter of this document.
program, please see the \ilink{Console Configuration}{ConsoleConfChapter} chapter of this document.

\section{Running the Console Program}

Expand Down Expand Up @@ -99,7 +98,7 @@ \section{Running the Console Program}
are scripting the console, you may need to take some care to limit the
line length.

\section{Exit the Console Program}
\subsection{Exit the Console Program}
\index[general]{Command!bconsole!exit}

Normally, you simply enter {\bf quit} or {\bf exit} and the Console program
Expand All @@ -117,7 +116,82 @@ \section{Exit the Console Program}
Volume name, the period will be taken to be the Volume name. In that case, you
will most likely be able to cancel at the next prompt.

\section{Alphabetic List of Console Keywords}

\subsection{Running the Console from a Shell Script}
\index[general]{Console!Running from a Shell}
\label{scripting}

You can automate many Console tasks by running the console program from a
shell script. For example, if you have created a file containing the following
commands:

\footnotesize
\begin{verbatim}
bconsole -c ./bconsole.conf <<END_OF_DATA
unmount storage=DDS-4
quit
END_OF_DATA
\end{verbatim}
\normalsize

when that file is executed, it will unmount the current DDS-4 storage device.
You might want to run this command during a Job by using the {\bf
RunBeforeJob} or {\bf RunAfterJob} records.

It is also possible to run the Console program from file input where the file
contains the commands as follows:

\footnotesize
\begin{verbatim}
bconsole -c ./bconsole.conf <filename
\end{verbatim}
\normalsize

where the file named {\bf filename} contains any set of console commands.

As a real example, the following script is part of the Bareos regression
tests. It labels a volume (a disk volume), runs a backup, then does a restore
of the files saved.

\footnotesize
\begin{verbatim}
bconsole <<END_OF_DATA
@output /dev/null
messages
@output /tmp/log1.out
label volume=TestVolume001
run job=Client1 yes
wait
messages
@#
@# now do a restore
@#
@output /tmp/log2.out
restore current all
yes
wait
messages
@output
quit
END_OF_DATA
\end{verbatim}
\normalsize

The output from the backup is directed to /tmp/log1.out and the output from
the restore is directed to /tmp/log2.out. To ensure that the backup and
restore ran correctly, the output files are checked with:

\footnotesize
\begin{verbatim}
grep "^ *Termination: *Backup OK" /tmp/log1.out
backupstat=$?
grep "^ *Termination: *Restore OK" /tmp/log2.out
restorestat=$?
\end{verbatim}
\normalsize


\section{Console Keywords}
\index[general]{Console!Keywords}

Unless otherwise specified, each of the following keywords
Expand Down Expand Up @@ -249,7 +323,7 @@ \section{Alphabetic List of Console Keywords}
Used in the restore command. Takes no argument.
\end{description}

\section{Alphabetic List of Console Commands}
\section{Console Commands}
\index[general]{Console!Commands}

The following commands are currently implemented:
Expand Down Expand Up @@ -1528,7 +1602,7 @@ \section{Alphabetic List of Console Commands}

\end{description}

\section{Special dot (.) Commands}
\subsection{Special dot (.) Commands}
\label{dotcommands}
\index[general]{Console!Command!Special .}
\index[general]{Console!Command!. Commands}
Expand Down Expand Up @@ -1563,7 +1637,7 @@ \section{Special dot (.) Commands}
\normalsize


\section{Special At (@) Commands}
\subsection{Special At (@) Commands}
\label{atcommands}

Normally, all commands entered to the Console program are immediately
Expand Down Expand Up @@ -1644,82 +1718,12 @@ \section{Special At (@) Commands}

\end{description}

\section{Running the Console from a Shell Script}
\index[general]{Console!Running from a Shell}
\label{scripting}

You can automate many Console tasks by running the console program from a
shell script. For example, if you have created a file containing the following
commands:

\footnotesize
\begin{verbatim}
bconsole -c ./bconsole.conf <<END_OF_DATA
unmount storage=DDS-4
quit
END_OF_DATA
\end{verbatim}
\normalsize

when that file is executed, it will unmount the current DDS-4 storage device.
You might want to run this command during a Job by using the {\bf
RunBeforeJob} or {\bf RunAfterJob} records.

It is also possible to run the Console program from file input where the file
contains the commands as follows:

\footnotesize
\begin{verbatim}
bconsole -c ./bconsole.conf <filename
\end{verbatim}
\normalsize

where the file named {\bf filename} contains any set of console commands.

As a real example, the following script is part of the Bareos regression
tests. It labels a volume (a disk volume), runs a backup, then does a restore
of the files saved.

\footnotesize
\begin{verbatim}
bconsole <<END_OF_DATA
@output /dev/null
messages
@output /tmp/log1.out
label volume=TestVolume001
run job=Client1 yes
wait
messages
@#
@# now do a restore
@#
@output /tmp/log2.out
restore current all
yes
wait
messages
@output
quit
END_OF_DATA
\end{verbatim}
\normalsize

The output from the backup is directed to /tmp/log1.out and the output from
the restore is directed to /tmp/log2.out. To ensure that the backup and
restore ran correctly, the output files are checked with:

\footnotesize
\begin{verbatim}
grep "^ *Termination: *Backup OK" /tmp/log1.out
backupstat=$?
grep "^ *Termination: *Restore OK" /tmp/log2.out
restorestat=$?
\end{verbatim}
\normalsize

\section{Adding Volumes to a Pool}
\index[general]{Console!Adding a Volume to a Pool}

\TODO{move to another chapter}

If you have used the {\bf label} command to label a Volume, it will be
automatically added to the Pool, and you will not need to add any media to the
pool.
Expand Down
6 changes: 3 additions & 3 deletions manuals/en/main/bootstrap.tex
Expand Up @@ -361,15 +361,15 @@ \section{Automatic Generation of Bootstrap Files}

The {\bf no} answers the {\bf Do you want to run this (yes/mod/no)} question.

\label{bscanBootstrap}
\section{Bootstrap for bscan}
\index[general]{bscan}
\index[general]{bscan!bootstrap}
\index[general]{Bootstrap!bscan}
\index[general]{Command!bscan}
\label{bscanBootstrap}

If you have a very large number of Volumes to scan with {\bf bscan},
you may exceed the command line limit (511 characters). I that case,
you may exceed the command line limit (511 characters). In that case,
you can create a simple bootstrap file that consists of only the
volume names. An example might be:

Expand All @@ -384,7 +384,7 @@ \section{Bootstrap for bscan}
\normalsize


\section{A Final Bootstrap Example}
\section{Bootstrap Example}
\index[general]{Example!Bootstrap}
\index[general]{Bootstrap!Example}

Expand Down
97 changes: 67 additions & 30 deletions manuals/en/main/catmaintenance.tex
Expand Up @@ -95,6 +95,72 @@ \section{Setting Retention Periods}
time you run a Job.
\end{description}


\subsection{Job statistics}

%\chapter{Using Bareos catalog to grab information}
\label{UseBareosCatalogToExtractInformationChapter}
\index[general]{Statistics}
\index[general]{Job!Statistics}


Bareos catalog contains lot of information about your IT infrastructure, how
many files, their size, the number of video or music files etc. Using Bareos
catalog during the day to get them permit to save resources on your servers.

In this chapter, you will find tips and information to measure Bareos
efficiency and report statistics.

If you want to have statistics on your backups to
provide some Service Level Agreement indicators, you could use a few
SQL queries on the Job table to report how many:

\begin{itemize}
\item jobs have run
\item jobs have been successful
\item files have been backed up
\item ...
\end{itemize}

However, these statistics are accurate only if your job retention is greater
than your statistics period. Ie, if jobs are purged from the catalog, you won't
be able to use them.

Now, you can use the \textbf{update stats [days=num]} console command to fill
the JobHistory table with new Job records. If you want to be sure to take in
account only \textbf{good jobs}, ie if one of your important job has failed but
you have fixed the problem and restarted it on time, you probably want to
delete the first \textit{bad} job record and keep only the successful one. For
that simply let your staff do the job, and update JobHistory table after two or
three days depending on your organization using the \textbf{[days=num]} option.

These statistics records aren't used for restoring, but mainly for
capacity planning, billings, etc.

The \configdirective{Statistics Retention = {\textless}time{\textgreater}} director directive defines
the length of time that Bareos will keep statistics job records in the Catalog
database after the Job End time. This information is stored in the \texttt{JobHistory} table.
When this time
period expires, and if user runs \texttt{prune stats} command, Bareos will
prune (remove) Job records that are older than the specified period.

You can use the following Job resource in your nightly \textbf{BackupCatalog}
job to maintain statistics.
\begin{verbatim}
Job {
Name = BackupCatalog
...
RunScript {
Console = "update stats days=3"
Console = "prune stats yes"
RunsWhen = After
RunsOnClient = no
}
}
\end{verbatim}



\section{MySQL}
\label{CompactingMySQL}
\subsection{Compacting Your MySQL Database}
Expand Down Expand Up @@ -623,31 +689,11 @@ \section{Security considerations}
you with a starting point. We hope it helps.


\label{BackingUPOtherDBs}
\section{Backing Up Third Party Databases}
\index[general]{Backing Up Third Party Databases}
\index[general]{Databases!Backing Up Third Party}

If you are running a database in production mode on your machine, Bareos will
happily backup the files, but if the database is in use while Bareos is
reading it, you may back it up in an unstable state.

The best solution is to shutdown your database before backing it up, or use
some tool specific to your database to make a valid live copy perhaps by
dumping the database in ASCII format. I am not a database expert, so I cannot
provide you advice on how to do this, but if you are unsure about how to
backup your database, you might try visiting the Backup Central site, which
has been renamed Storage Mountain (www.backupcentral.com). In particular,
their
\elink{ Free Backup and Recovery
Software}{http://www.backupcentral.com/toc-free-backup-software.html} page has
links to scripts that show you how to shutdown and backup most major
databases.
\label{Size}

\section{Database Size}
\index[general]{Size!Database}
\index[general]{Database Size}
\label{Size}

As mentioned above, if you do not do automatic pruning, your Catalog will grow
each time you run a Job. Normally, you should decide how long you want File
Expand Down Expand Up @@ -731,12 +777,3 @@ \section{Database Size}
\normalsize

This database has a total size of approximately 450 Megabytes.

If we were using SQLite, the determination of the total database size would be
much easier since it is a single file, but we would have less insight to the
size of the individual tables as we have in this case.

Note, SQLite databases may be as much as 50\% larger than MySQL databases due
to the fact that all data is stored as ASCII strings. That is even binary
integers are stored as ASCII strings, and this seems to increase the space
needed.

0 comments on commit 4bf293f

Please sign in to comment.