\normalsize
Note that, in the case of a file, the Volume name becomes the filename, so in
-the above example, you will replace the {\bf xxx} with the name of the volume
+the above example, you will replace the {\bf Volume-name} with the name of the volume
(file) you wrote.
Normally if no options are specified, {\bf bls} will produce the equivalent
was written when you saved it (default bacula-dir.conf file).
The {\bf bscan} program can be used to re-create a database (catalog)
-records from the backup information written to one or more Volumes.
-This is normally
-needed only if one or more Volumes have been pruned or purged from your
-catalog so that the records on the Volume are no longer in the catalog, or
-for Volumes that you have archived.
-
-With some care, it can also be used to synchronize your existing catalog with
-a Volume. Although we have never seen a case of bscan damaging a
-catalog, since bscan modifies your catalog, we recommend that
-you do a simple ASCII backup of your database before running {\bf bscan} just
-to be sure. See \ilink{Compacting Your Database}{CompactingMySQL} for
+records from the backup information written to one or more Volumes. This
+is normally needed only if one or more Volumes have been pruned or purged
+from your catalog so that the records on the Volume are no longer in the
+catalog, or for Volumes that you have archived. Note, if you scan in
+Volumes that were previously purged, you will be able to do restores from
+those Volumes. However, unless you modify the Job and File retention times
+for the Jobs that were added by scanning, the next time you run any backup Job
+with the same name, the records will be pruned again. Since it takes a
+long time to scan Volumes this can be very frustrating.
+
+With some care, {\bf bscan} can also be used to synchronize your existing
+catalog with a Volume. Although we have never seen a case of bscan
+damaging a catalog, since bscan modifies your catalog, we recommend that
+you do a simple ASCII backup of your database before running {\bf bscan}
+just to be sure. See \ilink{Compacting Your Database}{CompactingMySQL} for
the details of making a copy of your database.
{\bf bscan} can also be useful in a disaster recovery situation, after the
by {\bf bscan}, if you have too many Volumes, you will need to manually
create a bootstrap file. See the \ilink{Bootstrap}{BootstrapChapter}
chapter of this manual for more details, in particular the section
-entitled \ilink{Bootstrap for bscan}{bscanBootstrap}.
+entitled \ilink{Bootstrap for bscan}{bscanBootstrap}. Basically, the
+.bsr file for the above example might look like:
+
+\footnotesize
+\begin{verbatim}
+Volume=Vol001
+Volume=Vol002
+Volume=Vol003
+\end{verbatim}
+\normalsize
+
+Note: {\bf bscan} does not support supplying Volume names on the
+command line and at the same time in a bootstrap file. Please
+use only one or the other.
You should, always try to specify the tapes in the order they are written.
-However, bscan can handle scanning tapes that are not sequential. Any
+If you do not, any Jobs that span a volume may not be fully or properly
+restored. However, bscan can handle scanning tapes that are not sequential. Any
incomplete records at the end of the tape will simply be ignored in that
case. If you are simply repairing an existing catalog, this may be OK, but
if you are creating a new catalog from scratch, it will leave your database
in an incorrect state. If you do not specify all necessary Volumes on a
single bscan command, bscan will not be able to correctly restore the
records that span two volumes. In other words, it is much better to
-specify two or three volumes on a single bscan command rather than run
-bscan two or three times, each with a single volume.
-
+specify two or three volumes on a single bscan command (or in a .bsr file)
+rather than run bscan two or three times, each with a single volume.
Note, the restoration process using bscan is not identical to the original
creation of the catalog data. This is because certain data such as Client
rewind rewind the tape
scan read() tape block by block to EOT and report
scanblocks Bacula read block by block to EOT and report
+ speed report drive speed
status print tape status
test General test Bacula tape functions
weof write an EOF on the tape
note for labeling tapes, we recommend that you use the {\bf label} command in
the {\bf Console} program since it will never overwrite a valid Bacula tape.
+\subsubsection*{Testing your Tape Drive}
+\label{sec:btapespeed}
+
+To determine the best configuration of your tape drive, you can run the new
+\texttt{speed} command available in the \texttt{btape} program.
+
+This command can have the following arguments:
+\begin{itemize}
+\item[\texttt{file\_size=n}] Specify the Maximum File Size for this test
+ (between 1 and 5GB). This counter is in GB.
+\item[\texttt{nb\_file=n}] Specify the number of file to be written. The amount
+ of data should be greater than your memory ($file\_size*nb\_file$).
+\item[\texttt{skip\_zero}] This flag permits to skip tests with constant
+ data.
+\item[\texttt{skip\_random}] This flag permits to skip tests with random
+ data.
+\item[\texttt{skip\_raw}] This flag permits to skip tests with raw access.
+\item[\texttt{skip\_block}] This flag permits to skip tests with Bacula block
+ access.
+\end{itemize}
+
+\begin{verbatim}
+*speed file_size=3 skip_raw
+btape.c:1078 Test with zero data and bacula block structure.
+btape.c:956 Begin writing 3 files of 3.221 GB with blocks of 129024 bytes.
+++++++++++++++++++++++++++++++++++++++++++
+btape.c:604 Wrote 1 EOF to "Drive-0" (/dev/nst0)
+btape.c:406 Volume bytes=3.221 GB. Write rate = 44.128 MB/s
+...
+btape.c:383 Total Volume bytes=9.664 GB. Total Write rate = 43.531 MB/s
+
+btape.c:1090 Test with random data, should give the minimum throughput.
+btape.c:956 Begin writing 3 files of 3.221 GB with blocks of 129024 bytes.
++++++++++++++++++++++++++++++++++++++++++++
+btape.c:604 Wrote 1 EOF to "Drive-0" (/dev/nst0)
+btape.c:406 Volume bytes=3.221 GB. Write rate = 7.271 MB/s
++++++++++++++++++++++++++++++++++++++++++++
+...
+btape.c:383 Total Volume bytes=9.664 GB. Total Write rate = 7.365 MB/s
+
+\end{verbatim}
+
+When using compression, the random test will give your the minimum throughput
+of your drive . The test using constant string will give you the maximum speed
+of your hardware chain. (cpu, memory, scsi card, cable, drive, tape).
+
+You can change the block size in the Storage Daemon configuration file.
+
\section{Other Programs}
\index[general]{Programs!Other}
\index[general]{Other Programs}