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

Commit

Permalink
fixing todos
Browse files Browse the repository at this point in the history
fixing todos

Signed-off-by: Marco van Wieringen <marco.van.wieringen@bareos.com>
  • Loading branch information
joergsteffens authored and Marco van Wieringen committed Sep 12, 2013
1 parent 0919464 commit 4a011d4
Show file tree
Hide file tree
Showing 26 changed files with 1,262 additions and 1,160 deletions.
51 changes: 51 additions & 0 deletions manuals/en/main/README.document-conventions.txt
@@ -0,0 +1,51 @@
Conventions

Links, internal:
\ilink{Description}{LaTex-Label}

Links, external
\elink{Description}{URL}

\newcommand{\command}[1]{\path|#1|}
\newcommand{\bcommand}[1]{\path|#1|}
\newcommand{\file}[1]{\path|#1|}
\newcommand{\user}[1]{\path|#1|}
\newcommand{\group}[1]{\path|#1|}
\newcommand{\variable}[1]{\path|#1|}
\newcommand{\parameter}[1]{\path|#1|}

Bareos configuration files:
\begin{bconfig}{<CAPTION>}
<configuration content 1>
<configuration content 2>
\end{bconfig}

\begin{bconfig}{}
\end{bconfig}

Bareos bconsole in- and output:
\begin{bconsole}{prompt}{command}{caption (caption is "command", if not given)}{input}
output
\end{bconsole}

\begin{bconsole}{}{}{}{}
\end{bconsole}




Index:
rules for using index:
use singular
first letter: upper case letters
everything to [general] (in the longterm)

index keywords (instead of ...)

Windows (Win32)
Configuration (configure)
Command (for executabel commands)
Console!Command (for bconsole commands)
Restore (Restoring)
Catalog (Bareos Catalog, Bareos Database)
Problem (Troubleshooting)
3 changes: 2 additions & 1 deletion manuals/en/main/ansi-labels.tex
@@ -1,8 +1,9 @@

\chapter{ANSI and IBM Tape Labels}
\label{AnsiLabelsChapter}
\index[general]{ANSI and IBM Tape Labels}
\index[general]{Labels!Tape}
\index[general]{Tape!Label!ANSI}
\index[general]{Tape!Label!IBM}

Bareos supports ANSI or IBM tape labels as long as you
enable it. In fact, with the proper configuration, you can
Expand Down
155 changes: 1 addition & 154 deletions manuals/en/main/autochangers.tex
Expand Up @@ -45,6 +45,7 @@ \chapter{Autochanger Support}
call any other script or program. The current
version of {\bf mtx-changer} works with the \command{mtx} program.
FreeBSD users might need to adapt this script to use \command{chio}.
For more details, refer to the \ilink{Testing Autochanger}{AutochangerTesting} chapter.

Bareos also supports autochangers with barcode
readers. This support includes two Console commands: \bcommand{label barcodes}
Expand Down Expand Up @@ -656,160 +657,6 @@ \section{Update Slots Command}
not find any Volume names so will do nothing.


\section{Testing Autochanger and Adapting mtx-changer script}
\label{AutochangerTesting}
\index[general]{Autochanger!Testing}
\index[general]{Autochanger!mtx-changer}
\index[general]{Command!mtx-changer}

\TODO{move to troubleshooting}
Before attempting to use the autochanger with Bareos, it is preferable to
"hand-test" that the changer works. To do so, we suggest you do the
following commands:

\begin{description}

\item [Make sure Bareos is not running.]

\item [/usr/lib/bareos/scripts/mtx-changer \ /dev/sg0 \ list \ 0 \ /dev/nst0 \ 0]
\index[sd]{mtx-changer list}

This command should print:

\footnotesize
\begin{verbatim}
1:
2:
3:
...
\end{verbatim}
\normalsize

or one number per line for each slot that is occupied in your changer, and
the number should be terminated by a colon ({\bf :}). If your changer has
barcodes, the barcode will follow the colon. If an error message is printed,
you must resolve the problem (e.g. try a different SCSI control device name
if {\bf /dev/sg0} is incorrect). For example, on FreeBSD systems, the
autochanger SCSI control device is generally {\bf /dev/pass2}.

\item [/usr/lib/bareos/scripts/mtx-changer \ /dev/sg0 \ listall \ 0 \ /dev/nst0 \ 0]
\index[sd]{mtx-changer listall}

This command should print:

\footnotesize
\begin{verbatim}
Drive content: D:Drive num:F:Slot loaded:Volume Name
D:0:F:2:vol2 or D:Drive num:E
D:1:F:42:vol42
D:3:E
Slot content:
S:1:F:vol1 S:Slot num:F:Volume Name
S:2:E or S:Slot num:E
S:3:F:vol4
Import/Export tray slots:
I:10:F:vol10 I:Slot num:F:Volume Name
I:11:E or I:Slot num:E
I:12:F:vol40
\end{verbatim}
\normalsize

\item [/usr/lib/bareos/scripts/mtx-changer \ /dev/sg0 \ transfer \ 1 \ 2]
\index[sd]{mtx-changer listall}

This command should transfer a volume from source (1) to destination (2)

\item [/usr/lib/bareos/scripts/mtx-changer \ /dev/sg0 \ slots ]
\index[sd]{mtx-changer slots}

This command should return the number of slots in your autochanger.

\item [/usr/lib/bareos/scripts/mtx-changer \ /dev/sg0 \ unload \ 1 \ /dev/nst0 \ 0 ]
\index[sd]{mtx-changer unload}

If a tape is loaded from slot 1, this should cause it to be unloaded.

\item [/usr/lib/bareos/scripts/mtx-changer \ /dev/sg0 \ load \ 3 \ /dev/nst0 \ 0 ]
\index[sd]{mtx-changer load}

Assuming you have a tape in slot 3, it will be loaded into drive (0).


\item [/usr/lib/bareos/scripts/mtx-changer \ /dev/sg0 \ loaded \ 0 \ /dev/nst0 \ 0]
\index[sd]{mtx-changer loaded}

It should print "3"
Note, we have used an "illegal" slot number 0. In this case, it is simply
ignored because the slot number is not used. However, it must be specified
because the drive parameter at the end of the command is needed to select
the correct drive.

\item [/usr/lib/bareos/scripts/mtx-changer \ /dev/sg0 \ unload \ 3 /dev/nst0 \ 0]

will unload the tape into slot 3.

\end{description}

Once all the above commands work correctly, assuming that you have the right
{\bf Changer Command} in your configuration, Bareos should be able to operate
the changer. The only remaining area of problems will be if your autoloader
needs some time to get the tape loaded after issuing the command. After the
{\bf mtx-changer} script returns, Bareos will immediately rewind and read the
tape. If Bareos gets rewind I/O errors after a tape change, you will probably
need to configure the \parameter{load_sleep} paramenter in the config file \file{/etc/bareos/mtx-changer.conf}.
You can test whether or not you need a {\bf sleep} by putting the following
commands into a file and running it as a script:

\footnotesize
\begin{verbatim}
#!/bin/sh
/usr/lib/bareos/scripts/mtx-changer /dev/sg0 unload 1 /dev/nst0 0
/usr/lib/bareos/scripts/mtx-changer /dev/sg0 load 3 /dev/nst0 0
mt -f /dev/st0 rewind
mt -f /dev/st0 weof
\end{verbatim}
\normalsize

If the above script runs, you probably have no timing problems. If it does not
run, start by putting a {\bf sleep 30} or possibly a {\bf sleep 60} in the
script just after the mtx-changer load command. If that works, then you should
configure the \parameter{load_sleep} paramenter in the config file \file{/etc/bareos/mtx-changer.conf} to the specified value so that it will be
effective when Bareos runs.

A second problem that comes up with a small number of autochangers is that
they need to have the cartridge ejected before it can be removed. If this is
the case, the {\bf load 3} will never succeed regardless of how long you wait.
If this seems to be your problem, you can insert an eject just after the
unload so that the script looks like:

\footnotesize
\begin{verbatim}
#!/bin/sh
/usr/lib/bareos/scripts/mtx-changer /dev/sg0 unload 1 /dev/nst0 0
mt -f /dev/st0 offline
/usr/lib/bareos/scripts/mtx-changer /dev/sg0 load 3 /dev/nst0 0
mt -f /dev/st0 rewind
mt -f /dev/st0 weof
\end{verbatim}
\normalsize

If this solves your problems, set the parameter \parameter{offline} in the config file \file{/etc/bareos/mtx-changer.conf} to "1".

\TODO{provide a test script, distributed with Bareos}

%As noted earlier, there are several scripts in {\bf
%{\textless}bareos-source{\textgreater}/examples/devices} that implement the above features,
%so they may be a help to you in getting your script to work.

%If Bareos complains "Rewind error on /dev/nst0. ERR=Input/output error." you
%most likely need more sleep time in your {\bf mtx-changer} before returning to
%Bareos after a load command has been completed.


\section{Using the Autochanger}
\index[general]{Autochanger!Using the}
\label{using}
Expand Down
57 changes: 54 additions & 3 deletions manuals/en/main/backward-compability.tex
@@ -1,5 +1,10 @@
\chapter{Backward Compatibility}
\index[general]{Backward Compatibility}
\index[general]{Compatibility:Backward}

\section{Tape Formats}
\index[general]{tape!format}


One of the major goals of Backup softare is to ensure that you can restore
tapes (the word tape should also include disk volumes) that you wrote years
ago. This means that each new version of the software should be able to read old
Expand All @@ -23,8 +28,6 @@ \chapter{Backward Compatibility}
but each newer version of Bareos should know how to read all the
older streams.

\TODO{add information about bareos bacula compatibility}

% If you want to be 100% sure that you can read old tapes, you
% should:
%
Expand All @@ -37,3 +40,51 @@ \chapter{Backward Compatibility}
%
% The second point is probably overkill but if you want to be sure, it may
% save you someday.

\section{Compatibility between Bareos and Bacula}
\index[general]{Compatibility:Bacula}
\index[general]{Bacula}

A Director and a Storage Daemon should (must) always run at the same version.
This is true for Baroes as well as for Bacula.
It is not possible to mix these components.
This is because the protocol between Director and Storage Daemon itself is not versioned (also true for Bareos and Bacula).
If you want to be able to switch back from Bareos to Bacula after using a Bareos director and storage daemon
you have to enable the compatible mode in the Bareos storage daemon (which is currently the default)
to have it write the data in the same format as the Bacula storage daemon.

The Bareos File Daemon is compatible with all version of the Bacula director
when you enable the compatible mode in the config of the file daemon.
Currently the compatible option is on by default but that may change in the future.
To be sure this is enabled you can explicitly set the compatible option
by putting the following in the bareos-fd.conf:

\begin{bconfig}{Compatibility directive}
compatible=true
\end{bconfig}


A Bareos director can only talk to Bacula file daemons of version 2.0 or higher.

\newcommand{\bareoscolor}{\textcolor{blue}{Bareos\ }}
\newcommand{\baculacolor}{\textcolor{red}{Bacula\ }}


These combinations of Bareos and Bacula are know to work together:

\begin{tabular}[h]{|l|l|l|l|}
\hline
\textbf{Director} & \textbf{Storage Daemon} & \textbf{File Daemon} & \textbf{Remarks} \\
\hline
\hline
\bareoscolor & \bareoscolor & \bareoscolor & \\
\hline
\bareoscolor & \bareoscolor & \baculacolor $\ge$ 2.0 & \\
\hline
\baculacolor & \baculacolor & \baculacolor & \\
\hline
\baculacolor & \baculacolor & \bareoscolor (compatibe mode) & \\
\hline
\end{tabular}

Other combinations like Bacula director (dir) with Bareos storage daemon (sd) will not work. However this wasn't even possible with different versions of bacula-dir and bacula-sd.

0 comments on commit 4a011d4

Please sign in to comment.