]> git.sur5r.net Git - bacula/docs/blobdiff - docs/manual-fr/progs.tex
'Spool Data = Yes' sets 'Spool Attributes = Yes'
[bacula/docs] / docs / manual-fr / progs.tex
index fd01a79e39f526f15cfcc6e1431848d8fe2d8f7f..d4ee4e1b0dc5d28edb623c907cb5c9d5b98188c2 100644 (file)
@@ -11,7 +11,6 @@ This document describes the utility programs written to aid Bacula users and
 developers in dealing with Volumes external to Bacula. 
 
 \subsection*{Specifying the Configuration File}
-\index[general]{File!Specifying the Configuration }
 \index[general]{Specifying the Configuration File }
 \addcontentsline{toc}{subsection}{Specifying the Configuration File}
 
@@ -23,6 +22,7 @@ for your archive device (generally a tape drive). By default, they read {\bf
 bacula-sd.conf} in the current directory, but you may specify a different
 configuration file using the {\bf -c} option. 
 
+
 \subsection*{Specifying a Device Name For a Tape}
 \index[general]{Tape!Specifying a Device Name For a }
 \index[general]{Specifying a Device Name For a Tape }
@@ -34,6 +34,12 @@ found. In the case of a tape, this is the physical device name such as {\bf
 work, it must find the identical name in the Device resource of the
 configuration file. See below for specifying Volume names. 
 
+Please note that if you have Bacula running and you ant to use
+one of these programs, you will either need to stop the Storage daemon, or
+{\bf unmount} any tape drive you want to use, otherwise the drive
+will {\bf busy} because Bacula is using it.
+
+
 \subsection*{Specifying a Device Name For a File}
 \index[general]{File!Specifying a Device Name For a }
 \index[general]{Specifying a Device Name For a File }
@@ -108,7 +114,7 @@ accept any volume. For example:
 
 \subsection*{bls}
 \label{bls}
-\index[general]{Bls }
+\index[general]{bls }
 \addcontentsline{toc}{subsection}{bls}
 
 {\bf bls} can be used to do an {\bf ls} type listing of a {\bf Bacula} tape or
@@ -116,18 +122,17 @@ file. It is called:
 
 \footnotesize
 \begin{verbatim}
-Usage: bls [-d debug_level] <device-name>
+Usage: bls [options] <device-name>
        -b <file>       specify a bootstrap file
-       -c <file>       specify a configuration file
-       -d <level>       specify a debug level
+       -c <file>       specify a config file
+       -d <level>      specify debug level
        -e <file>       exclude list
        -i <file>       include list
        -j              list jobs
        -k              list blocks
-       -L              list tape label
-    (none of above)    list saved files
-       -p              proceed inspite of I/O errors
-       -t              use default tape device
+    (no j or k option) list saved files
+       -L              dump label
+       -p              proceed inspite of errors
        -v              be verbose
        -V              specify Volume names (separated by |)
        -?              print this message
@@ -184,10 +189,10 @@ bls: Got EOF on device /tmp
 \end{verbatim}
 \normalsize
 
-\subsubsection*{Listing Bacula Jobs}
-\index[general]{Listing Bacula Jobs }
-\index[general]{Jobs!Listing Bacula }
-\addcontentsline{toc}{subsubsection}{Listing Bacula Jobs}
+\subsubsection*{Listing Jobs}
+\index[general]{Listing Jobs with bls }
+\index[general]{bls!Listing Jobs }
+\addcontentsline{toc}{subsubsection}{bls Listing Jobs}
 
 If you are listing a Volume to determine what Jobs to restore, normally the
 {\bf -j} option provides you with most of what you will need as long as you
@@ -195,15 +200,24 @@ don't have multiple clients. For example,
 
 \footnotesize
 \begin{verbatim}
-./bls -j /tmp/test1
-Volume Record: SessId=2 SessTime=1033762386 JobId=0 DataLen=144
-Begin Session Record: SessId=2 SessTime=1033762386 JobId=1 Level=F Type=B
-End Session Record: SessId=2 SessTime=1033762386 JobId=1 Level=F Type=B
-Begin Session Record: SessId=3 SessTime=1033762386 JobId=2 Level=I Type=B
-End Session Record: SessId=3 SessTime=1033762386 JobId=2 Level=I Type=B
-Begin Session Record: SessId=4 SessTime=1033762386 JobId=3 Level=I Type=B
-End Session Record: SessId=4 SessTime=1033762386 JobId=3 Level=I Type=B
-bls: Got EOF on device /tmp
+./bls -j -V Test1 -c stored.conf DDS-4
+bls: butil.c:258 Using device: "DDS-4" for reading.
+11-Jul 11:54 bls: Ready to read from volume "Test1" on device "DDS-4" (/dev/nst0).
+Volume Record: File:blk=0:1 SessId=4 SessTime=1121074625 JobId=0 DataLen=165
+Begin Job Session Record: File:blk=0:2 SessId=4 SessTime=1121074625 JobId=1 Level=F Type=B
+Begin Job Session Record: File:blk=0:3 SessId=5 SessTime=1121074625 JobId=5 Level=F Type=B
+Begin Job Session Record: File:blk=0:6 SessId=3 SessTime=1121074625 JobId=2 Level=F Type=B
+Begin Job Session Record: File:blk=0:13 SessId=2 SessTime=1121074625 JobId=4 Level=F Type=B
+End Job Session Record: File:blk=0:99 SessId=3 SessTime=1121074625 JobId=2 Level=F Type=B
+   Files=168 Bytes=1,732,978 Errors=0 Status=T
+End Job Session Record: File:blk=0:101 SessId=2 SessTime=1121074625 JobId=4 Level=F Type=B
+   Files=168 Bytes=1,732,978 Errors=0 Status=T
+End Job Session Record: File:blk=0:108 SessId=5 SessTime=1121074625 JobId=5 Level=F Type=B
+   Files=168 Bytes=1,732,978 Errors=0 Status=T
+End Job Session Record: File:blk=0:109 SessId=4 SessTime=1121074625 JobId=1 Level=F Type=B
+   Files=168 Bytes=1,732,978 Errors=0 Status=T
+11-Jul 11:54 bls: End of Volume at file 1 on device "DDS-4" (/dev/nst0), Volume "Test1"
+11-Jul 11:54 bls: End of all volumes.
 \end{verbatim}
 \normalsize
 
@@ -212,13 +226,13 @@ shows a full save followed by two incremental saves.
 Adding the {\bf -v} option will display virtually all information that is
 available for each record: 
 
-\subsubsection*{Listing Bacula Blocks}
-\index[general]{Listing Bacula Blocks }
-\index[general]{Blocks!Listing Bacula }
-\addcontentsline{toc}{subsubsection}{Listing Bacula Blocks}
+\subsubsection*{Listing Blocks}
+\index[general]{Listing Blocks with bls }
+\index[general]{bls!Listing Blocks }
+\addcontentsline{toc}{subsubsection}{bls Listing Blocks}
 
 Normally, except for debugging purposes, you will not need to list Bacula
-blocks (the ``primitive'' unit of Bacula data on the Volume). However, you can
+blocks (the "primitive" unit of Bacula data on the Volume). However, you can
 do so with: 
 
 \footnotesize
@@ -423,7 +437,7 @@ program.
 
 \subsection*{bscan}
 \label{bscan}
-\index[general]{Bscan }
+\index[general]{bscan }
 \addcontentsline{toc}{subsection}{bscan}
 
 The {\bf bscan} program can be used to re-create a database (catalog) from the
@@ -432,7 +446,8 @@ 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. 
 
 With some care, it can also be used to synchronize your existing catalog with
-a Volume. Since {\bf bscan} modifies your catalog, we strongly recommend that
+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}. 
@@ -473,25 +488,27 @@ you have provided security on your database, you may need to supply either the
 database name ({\bf -b} option), the user name ({\bf -u} option), and/or the
 password ({\bf -p}) options. 
 
-As an example, let's suppose that you did a backup to Volume ``Vol001'' and
-that sometime later all record of that Volume was pruned or purged from the
-database. By using {\bf bscan} you can recreate the catalog entries for that
-Volume and then use the {\bf restore} command in the Console to restore
+As an example, let's suppose that you did a backup to Volumes "Vol001" 
+and "Vol002", then sometime later all records of one or both those
+Volumes
+were pruned or purged from the
+database. By using {\bf bscan} you can recreate the catalog entries for
+those Volumes and then use the {\bf restore} command in the Console to restore
 whatever you want. A command something like: 
 
 \footnotesize
 \begin{verbatim}
-bscan -c bacula-sd.conf -v -V Vol001 /dev/nst0
+bscan -c bacula-sd.conf -v -V Vol001\|Vol002 /dev/nst0
 \end{verbatim}
 \normalsize
 
-will give you a give you an idea of what is going to happen without changing
+will give you an idea of what is going to happen without changing
 your catalog. Of course, you may need to change the path to the Storage
 daemon's conf file, the Volume name, and your tape (or disk) device name. This
 command must read the entire tape, so if it has a lot of data, it may take a
 long time, and thus you might want to immediately use the command listed
 below. Note, if you are writing to a disk file, replace the device name with
-the path to the directory that contains the Volume. This must correspond to
+the path to the directory that contains the Volumes. This must correspond to
 the Archive Device in the conf file. 
 
 Then to actually write or store the records in the catalog, add the {\bf -s}
@@ -499,17 +516,17 @@ option as follows:
 
 \footnotesize
 \begin{verbatim}
- bscan -s -m -c bacula-sd.conf -v -V Vol001 /dev/nst0
+ bscan -s -m -c bacula-sd.conf -v -V Vol001\|Vol002 /dev/nst0
 \end{verbatim}
 \normalsize
 
 When writing to the database, if bscan finds existing records, it will
 generally either update them if something is wrong or leave them alone. Thus
-if the Volume you are scanning is all or partially in the catalog already, no
+if the Volumes you are scanning are all or partially in the catalog already, no
 harm will be done to that existing data. Any missing data will simply be
 added. 
 
-If you have multiple tapes, you can scan them with: 
+If you have multiple tapes, you should scan them with: 
 
 \footnotesize
 \begin{verbatim}
@@ -517,9 +534,16 @@ If you have multiple tapes, you can scan them with:
 \end{verbatim}
 \normalsize
 
-You should, where ever possible try to specify the tapes in the order they are
-written. 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.
+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
+incomplete records at the end of the tape will simply be ignored in that
+case.  If you are simply reparing 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.
 
 
 Note, the restoration process using bscan is not identical to the original
@@ -666,7 +690,7 @@ against it and get valid results.
 \addcontentsline{toc}{subsubsection}{Using bscan to Correct the Volume File
 Count}
 
-If the Storage daemon crashes during a backup Job, the catalog will no be
+If the Storage daemon crashes during a backup Job, the catalog will not be
 properly updated for the Volume being used at the time of the crash. This
 means that the Storage daemon will have written say 20 files on the tape, but
 the catalog record for the Volume indicates only 19 files. 
@@ -683,7 +707,7 @@ update only the final Media record for the Volumes read.
 
 If you use {\bf bscan} to enter the contents of the Volume into an existing
 catalog, you should be aware that the records you entered may be immediately
-pruned during the next job particularly if the Volume is very old or had been
+pruned during the next job, particularly if the Volume is very old or had been
 previously purged. To avoid this, after running {\bf bscan}, you can manually
 set the volume status (VolStatus) to {\bf Read-Only} by using the {\bf update}
 command in the catalog. This will allow you to restore from the volume without
@@ -758,7 +782,7 @@ file. As a default, it will look for {\bf bacula-sd.conf} in the current
 directory. If your configuration file is elsewhere, please use the {\bf -c}
 option to specify where. 
 
-The physical device name must be specified on the command line, and that this
+The physical device name must be specified on the command line, and this
 same device name must be present in the Storage daemon's configuration file
 read by {\bf btape} 
 
@@ -833,11 +857,10 @@ The most useful commands are:
 \begin{itemize}
 \item test -- test writing records and EOF marks and  reading them back.  
 \item fill -- completely fill a volume with records, then  write a few records
-   on a second volume, and finally,  both volumes will be read back. Please be
-   aware that  the data written will be quite similar every record, so  you might
-want to turn compression off. One user found  that the fill command wrote
-750Gb to a tape that can  hold 35Gb -- so you can see that the hardware
-compression  really worked well! 
+   on a second volume, and finally,  both volumes will be read back. 
+   This command writes blocks containing random data, so your drive will
+   not be able to compress the data, and thus it is a good test of 
+   the real physical capacity of your tapes.              
 \item readlabel -- read and dump the label on a Bacula tape.  
 \item cap -- list the device capabilities as defined in the  configuration
    file and as perceived by the Storage daemon. 
@@ -935,7 +958,7 @@ entering a ctl-d in column 1 of the last line.
 database, and optionally fix them. The {\bf dbcheck} program can be found in
 the {\bf \lt{}bacula-source\gt{}/src/tools} directory of the source
 distribution. Though it is built with the make process, it is not normally
-``installed''
+"installed"
 
 It is called: 
 
@@ -1004,7 +1027,7 @@ The inconsistencies examined are the following:
 database. If this is the case, you will receive  error messages during Jobs
 warning of duplicate database records.  If you are not getting these error
 messages, there is no reason  to run this check. 
-\item Repair bad Filename records. This checkes and corrects filenames  that
+\item Repair bad Filename records. This checks and corrects filenames  that
    have a trailing slash. They should not.  
 \item Repair bad Path records. This checks and corrects path names  that do
    not have a trailing slash. They should.  
@@ -1075,7 +1098,7 @@ was correct and to print some statistics on file name and path length.
 However, you may find it useful to see what bacula would do with a given {\bf
 Include} resource. The {\bf testfind} program can be found in the {\bf
 \lt{}bacula-source\gt{}/src/tools} directory of the source distribution.
-Though it is built with the make process, it is not normally ``installed''
+Though it is built with the make process, it is not normally "installed"
 
 It is called: 
 
@@ -1142,67 +1165,3 @@ cause {\bf testfind} to print the raw filenames without showing the Bacula
 internal file type, or the link (if any). Debug levels of 10 or greater cause
 the filename and the path to be separated using the same algorithm that is
 used when putting filenames into the Catalog database. 
-
-\subsection*{bimagemgr}
-\label{bimagemgr}
-\index[general]{Bimagemgr }
-\addcontentsline{toc}{subsection}{bimagemgr}
-
-{\bf bimagemgr} is a utility for those who backup to disk volumes in order to
-commit them to CDR disk, rather than tapes. It is a web based interface
-written in perl, used to monitor when a volume file needs to be burned to
-disk. It requires: 
-
-\begin{itemize}
-\item A web server running on the bacula server 
-\item A CD recorder installed and configured on the bacula server 
-\item The cdrtools package installed on the bacula server. 
-\item perl, perl-DBI module, and either DBD-MySQL or DBD-PostgreSQL modules 
-   \end{itemize}
-
-SQLite databases and DVD burning are not supported by {\bf bimagemgr} at this
-time, but both planned for future releases. 
-
-\subsubsection*{Installation}
-\index[general]{Installation }
-\addcontentsline{toc}{subsubsection}{Installation}
-
-Please see the README file in the bimagemgr directory of the distribution for
-instructions. 
-
-\subsubsection*{Usage}
-\index[general]{Usage }
-\addcontentsline{toc}{subsubsection}{Usage}
-
-Calling the program in your web browser, e.g. {\tt
-http://localhost/cgi-bin/bimagemgr.pl} will produce a display as shown below
-in Figure 1. The program will query the bacula database and display all volume
-files with the date last written and the date last burned to disk. If a volume
-needs to be burned (last written is newer than last burn date) a ``Burn''
-button will be displayed in the right most column. 
-
-\addcontentsline{lof}{figure}{Bacula CD Image Manager}
-\includegraphics{./bimagemgr1.eps} Figure 1 
-
-Place a blank CDR disk in your recorder and click a ``Burn'' button. This will
-cause a pop up window as shown in Figure 2 to display the burn progress. 
-
-\addcontentsline{lof}{figure}{Bacula CD Image Burn Progress Window}
-\includegraphics{./bimagemgr2.eps} Figure 2 
-
-When the burn finishes the pop up window will display the results of cdrecord
-as shown in Figure 3. Close the pop up window and refresh the main window. The
-last burn date will be updated and the ``Burn'' button for that volume will
-disappear. Should you have a failed burn you can reset the last burn date of
-that volume by clicking it's ``Reset'' link. 
-
-\addcontentsline{lof}{figure}{Bacula CD Image Burn Results}
-\includegraphics{./bimagemgr3.eps} Figure 3 
-
-In the bottom row of the main display window are two more buttons labeled
-``Burn Catalog'' and ``Blank CDRW''. ``Burn Catalog'' will place a copy of
-your bacula catalog on a disk. If you use CDRW disks rather than CDR then
-``Blank CDRW'' allows you to erase the disk before re-burning it. Regularly
-committing your backup volume files and your catalog to disk with {\bf
-bimagemgr} insures that you can rebuild easily in the event of some disaster
-on the bacula server itself.