From: Ludovic Strappazon Date: Tue, 1 Aug 2006 20:44:06 +0000 (+0000) Subject: Debut de autochangers.tex. X-Git-Tag: Release-2.0.0~681 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=dd65ad7d125e58a70be6f132a9a43868ad832ca0;p=bacula%2Fdocs Debut de autochangers.tex. --- diff --git a/docs/manual-fr/autochangers.tex b/docs/manual-fr/autochangers.tex index fd239f17..51238ae5 100644 --- a/docs/manual-fr/autochangers.tex +++ b/docs/manual-fr/autochangers.tex @@ -1,92 +1,100 @@ %% %% -\section*{Autochanger Support} +\section*{Support des librairies} \label{_ChapterStart18} -\index[general]{Support!Autochanger } +\index[general]{Support!Librairies} \index[general]{Autochanger Support } -\addcontentsline{toc}{section}{Autochanger Support} +\addcontentsline{toc}{section}{Support des librairies} -\subsection*{Autochangers -- General} -\index[general]{General!Autochangers -- } -\index[general]{Autochangers -- General } -\addcontentsline{toc}{subsection}{Autochangers -- General} +\subsection*{G\'en\'eralit\'es sur les librairies} +\index[general]{G\'en\'eralit\'es!Librairies} +\index[general]{G\'en\'eralit\'es sur les librairies} +\addcontentsline{toc}{subsection}{G\'en\'eralit\'es sur les librairies} -Bacula provides autochanger support for reading and writing tapes. In -order to work with an autochanger, Bacula requires a number of things, each of -which is explained in more detail after this list: +Bacula supporte les librairies pour les op\'erations de lecture et \'ecriture. +Plusieurs conditions sont requises pour que Bacula puisse utiliser une librairie. +Celles-ci sont expliqu\'ees en d\'etail ci-dessous. +Mais voyons d'abord la liste de ces conditions : \begin{itemize} -\item A script that actually controls the autochanger according to commands - sent by Bacula. We furnish such a script that works with {\bf mtx} found in - the {\bf depkgs} distribution. This script works only with single drive - autochangers. -\item That each Volume (tape) to be used must be defined in the Catalog and - have a Slot number assigned to it so that Bacula knows where the Volume is in - the autochanger. This is generally done with the {\bf label} command. See - below for more details. You must pre-label the tapes manually before - using them. -\item Modifications to your Storage daemon's Device configuration resource to - identify that the device is a changer, as well as a few other parameters. -\item You should also modify your Storage resource definition in the - Director's configuration file so that you are automatically prompted for the - Slot when labeling a Volume. -\item You need to ensure that your Storage daemon (if not running as root) - has access permissions to both the tape drive and the control device. -\item You need to have {\bf Autochanger = yes} in your Storage resource - in your bacula-dir.conf file so that you will be prompted for the - slot number when you label Volumes. +\item Un script charg\'e de piloter la librairie en accord avec les commandes + envoy\'ees par Bacula est requis. Nous fournissons un tel script pr\'evu pour fonctionner + avec le programme {\bf mtx} disponible dans les paquets {\bf depkgs}. +\item Chaque volume \`a utiliser doit \^etre d\'efini dans le catalogue et avoir + un num\'ero de slot (NDT : emplacement dans la librairie) assign\'e, de sorte + que Bacula puisse savoir o\`u se trouve le volume dans la librairie. Cet + enregistrement se fait la plupart du temps gr\^ace \`a la commande {\bf label}. + Voyez ci-dessous pour plus de d\'etails. Vous devez \'etiqueter manuellement + vos cartouches avant de pouvoir les utiliser. +\item Vous devez avoir modifi\'e le fichier de configuration de votre Storage + Daemon afin que la ressource Device identifie votre p\'eriph\'erique en tant + que librairie. Quelques autres param\`etres doivent \^etre d\'efinis. +\item Si vous n'ex\'ecutez pas le Storage Daemon en tant que root, vous devez + vous assurer qu'il d\'etient les droits requis pour acc\'eder au lecteur et au + bras robotis\'e de la librairie. +\item Vous devez placer la directive {\bf Autochanger = yes} dans la + ressource Storage de votre fichier bacula-dir.conf, de sorte que vous soyez + interrog\'e au sujet du slot \`a chaque \'etiquetage de cartouche. \end{itemize} -In version 1.37 and later, there is a new \ilink{Autochanger -resource}{AutochangerRes} that permits you to group Device resources thus -creating a multi-drive autochanger. If you have an autochanger, -you must use this new resource. - -Bacula uses its own {\bf mtx-changer} script to interface with a program -that actually does the tape changing. Thus in principle, {\bf mtx-changer} -can be adapted to function with any autochanger program. The current -version of {\bf mtx-changer} works with the {\bf mtx} program. However, -FreeBSD users have provided a script in the {\bf examples/autochangers} -directory that allows Bacula to use the {\bf chio} program. - -Bacula also supports autochangers with barcode -readers. This support includes two Console commands: {\bf label barcodes} -and {\bf update slots}. For more details on these commands, see the "Barcode -Support" section below. - +Dans les versions ult\'erieures \`a 1.37, la nouvelle directive +\ilink{Autochanger resource}{AutochangerRes} permet de grouper les ressources +Device pour cr\'eer des librairies avec plusieurs lecteurs. Si vous avez une +librairie, vous devez utiliser cette ressource. + +Bacula utilise son propre script {\bf mtx-changer} pour interagir avec un +programme qui effectue r\'eellement les changement de cartouches. Ainsi, +{\bf mtx-changer} peut \^etre adapt\'e pour fonctionner avec n'importe quel +programme de prise en chgarge de librairie. La version actuelle de +{\bf mtx-changer} fonctionne avec le programme {\bf mtx} . Cependant, +des utilisateurs de FreeBSD ont r\'ealis\'e un script, disponible dans +le r\'epertoire {\bf examples/autochangers}, qui permet \`a Bacula de fonctionner +avec le programme {\bf chio}. + +Bacula supporte aussi les librairies \'equip\'ees de lecteurs de codes barres. +Ce support inclut deux commandes de la console Bacula : {\bf label barcodes} +et {\bf update slots}. Pour plus de d\'etails au sujet de ces commandes, +voyez la section "Support des lecteurs de codes barres" plus loin. + +Le support des librairies dans Bacula n'inclue pas, pour le moment, la gestion +du nettoyage des lecteurs, ni celle des bacs de cartouches ou des silos. +Cependant, sous certaines conditions, vous pouvez parvenir \`a le faire +fonctionner avec des stackers (tels que gravity feed et apparent\'es). +(NDT : le dernier paragraphe n'est pas clair. Voici la vo : Current Bacula autochanger support does not include cleaning, stackers, or silos. However, under certain conditions, you may be able to make Bacula -work with stackers (gravity feed and such). Support for multi-drive -autochangers requires the \ilink{Autochanger resource}{AutochangerRes} -introduced in version 1.37. This resource is also recommended for single -drive autochangers. - -In principle, if {\bf mtx} will operate your changer correctly, then it is -just a question of adapting the {\bf mtx-changer} script (or selecting one -already adapted) for proper interfacing. You can find a list of autochangers -supported by {\bf mtx} at the following link: -\elink{http://mtx.badtux.net/compatibility.php} -{http://mtx.badtux.net/compatibility.php}. -The home page for the {\bf mtx} project can be found at: -\elink{http://mtx.badtux.net/}{http://mtx.badtux.net/}. - -If you are having troubles, please use the {\bf auto} command in the {\bf -btape} program to test the functioning of your autochanger with Bacula. When -Bacula is running, please remember that for many distributions (e.g. FreeBSD, -Debian, ...) the Storage daemon runs as {\bf bacula.tape} rather than {\bf -root.root}, so you will need to ensure that the Storage daemon has sufficient -permissions to access the autochanger. +work with stackers (gravity feed and such).) + +Le support des librairies \`a plusieurs lecteurs requiert la ressource +\ilink{Autochanger resource}{AutochangerRes}, qui est aussi recommand\'ee +pour les librairies \`a un seul lecteur. + +En principe, si {\bf mtx} fonctionne correctement avec votre librairie, ce +n'est qu'une question d'avaptation du script {\bf mtx-changer} pour que +Bacula s'interface correctement avec la librairie. Vous pouvez trouver une +liste des librairies support\'ees par {\bf mtx} en suivant le lien suivant : +\elink{http://mtx.badtux.net/compatibility.php}{http://mtx.badtux.net/compatibility.php}. +Le sit officiel du projet {\bf mtx} se trouve ici : +\elink{http://mtx.badtux.net/}{http://mtx.badtux.net/}. + +Si vous avez des difficult\'es, veuillez utiliser la commande {\bf auto} du +programme {\bf btape} pour tester le fonctionnement de votre librairie +avec Bacula. Lorsque Bacula fonctionne, souvenez vous que pour beaucoup de +distributions (par exemple FreeBSD, Debian,...), le Storage Daemon est +ex\'ecut\'e en tant que {\bf bacula.tape} plut\^ot que {\bf root.root}, aussi +vous devrez vous assurer que le Storage Daemon dispose de droits suffisants pour +acc\'eder \`a la librairie. \label{SCSI devices} -\subsection*{Knowing What SCSI Devices You Have} -\index[general]{Have!Knowing What SCSI Devices You } -\index[general]{Knowing What SCSI Devices You Have } -\index[general]{SCSI devices} -\index[general]{devices!SCSI} -\addcontentsline{toc}{subsection}{Knowing What SCSI Devices You Have} +\subsection*{D\'eterminer vos p\'eriph\'eriques SCSI} +\index[general]{D\'eterminer!p\'eriph\'eriques SCSI} +\index[general]{D\'eterminer vos p\'eriph\'eriques SCSI} +\index[general]{P\'eriph\'eriques} +\index[general]{p\'eriph\'eriques!SCSI} +\addcontentsline{toc}{subsection}{D\'eterminer vos p\'eriph\'eriques SCSI} -Under Linux, you can +Sous Linux, vous pouvez lire le fichier /proc/scsi/scsi : \footnotesize \begin{verbatim} @@ -94,19 +102,20 @@ cat /proc/scsi/scsi \end{verbatim} \normalsize -to see what SCSI devices you have available. You can also: +pour conna\^itre vos p\'eriph\'eriques SCSI. Vous pouvez aussi examiner les fichiers +/proc/scsi/sg/device_hdr et /proc/scsi/sg/devices : -\footnotesize +footnotesize \begin{verbatim} cat /proc/scsi/sg/device_hdr /proc/scsi/sg/devices \end{verbatim} \normalsize -to find out how to specify their control address ({\bf /dev/sg0} for the -first, {\bf /dev/sg1} for the second, ...) on the {\bf Changer Device = } -Bacula directive. +pour d\'eterminer comment sp\'ecifier leur nom de p\'eriph\'erique ({\bf /dev/sg0} +pour le premier, {\bf /dev/sg1} pour le second, ...) au niveau de +la directive {\bf Changer Device} -Under FreeBSD, you can use: +Sous FreeBSD, vous disposez de la commande : \footnotesize \begin{verbatim} @@ -114,17 +123,18 @@ camcontrol devlist \end{verbatim} \normalsize -To list the SCSI devices as well as the {\bf /dev/passn} that you will use on -the Bacula {\bf Changer Device = } directive. +pour afficher la liste des p\'eriph\'eriques SCSI ainsi que le {\bf /dev/passn} +que vous utiliserez pour renseigner la directive {\bf Changer Device} + +Assurez-vous que votre Storage Daemon dispose bien des privil\`eges requis +pour acc\'eder \`a ce p\'eriph\'erique. -Please check that your Storage daemon has permission to access this -device. +L'astuce suivante, destin\'ee aux utilisateurs de FreeBSD, provient de +Danny Butroyd. Au red\'emarrage, Bacula n'aura PLUS les permissions +requises pour contr\^oler le p\'eriph\'erique /dev/pass0. Pour vous +affanchir de cette difficult\'e, \'editez le fichier /etc/devfs.conf et +ajoutez lui ceci : -The following tip for FreeBSD users comes from Danny Butroyd: -n reboot bacula will NOT have permissions to -control the device /dev/pass0 (assuming this is your changer device). -To get around this just edit the /etc/devfs.conf file and add the -following to the bottom of the config file: \footnotesize \begin{verbatim} own pass0 root:bacula @@ -133,30 +143,30 @@ own nsa0.0 root:bacula perm nsa0.0 0666 \end{verbatim} \normalsize -I have given the bacula group permission to write to the nsa0.0 device -too just to be on the safe side. To bring these changes into effect -just run:- +Nous avons ainsi donn\'e au groupe Bacula la permission d'\'ecrire +sur le p\'eriph\'erique nsa0.0. Pour activer ces modifications, ex\'ecutez : /etc/rc.d/devfs restart -Basically this will stop you having to change permissions on these -devices to make bacula work when operating the AutoChanger after a reboot. +Vous n'aurez plus \`a modifier les permissions sur ces p\'eriph\'eriques +pour que Bacula continue d'utiliser la librairie apr\`es un red\'emarrage. \label{scripts} -\subsection*{Example Scripts} -\index[general]{Scripts!Example } -\index[general]{Example Scripts } -\addcontentsline{toc}{subsection}{Example Scripts} - -Please read the sections below so that you understand how autochangers work -with Bacula. Although we supply a default {\bf mtx-changer} script, your -autochanger may require some additional changes. If you want to see examples -of configuration files and scripts, please look in the {\bf -\lt{}bacula-src\gt{}/examples/devices} directory where you will find an -example {\bf HP-autoloader.conf} Bacula Device resource, and several {\bf -mtx-changer} scripts that have been modified to work with different -autochangers. +\subsection*{Exemples de scripts} +\index[general]{Scripts!Exemples } +\index[general]{Exemples de scripts } +\addcontentsline{toc}{subsection}{Exemples de scripts} + +Veuillez lire les sections ci-dessous pour bien comprendre comment +les librairies fonctionnent avec Bacula. Bien que nous fournissions +un script {\bf mtx-changer} par d\'efaut, il se peut que votre librairie +n\'ecessite quelques am\'enagements de ce script. Si vous voulez voir des +exemples de fichiers de configuration et de scripts, jetez un oeil +au r\'epertoire \lt{}bacula-src\gt{}/examples/devices} o\`u vous +trouverez un exemple de ressource Device Bacula : {\bf HP-autoloader.conf} +ainsi que plusieurs scripts {\bf mtx-changer} modifi\'es pour fonctionner +avec diverses librairies. \label{Slots} @@ -164,108 +174,108 @@ autochangers. \index[general]{Slots } \addcontentsline{toc}{subsection}{Slots} -To properly address autochangers, Bacula must know which Volume is in each -{\bf slot} of the autochanger. Slots are where the changer cartridges reside -when not loaded into the drive. Bacula numbers these slots from one to the -number of cartridges contained in the autochanger. - -Bacula will not automatically use a Volume in your autochanger unless it is -labeled and the slot number is stored in the catalog and the Volume is marked -as InChanger. For each Volume in your -changer, you will, using the Console program, assign a slot. This information -is kept in {\bf Bacula's} catalog database along with the other data for the -volume. If no slot is given, or the slot is set to zero, Bacula will not -attempt to use the autochanger even if all the necessary configuration records -are present. In addition, the console {\bf mount} command does not cause -Bacula to operate the autochanger, it only tells Bacula to read any tape that -may be in the drive. - -You can check if the Slot number and InChanger flag are set by doing a: +Pour utiliser convenablement une librairie, Bacula doit savoir quel volume +se trouve dans quel {\bf slot} de la librairie. LE slots sont les +emplacements o\`u sont rang\'ees les cartouches lorsqu'elles ne sont pas dans un +lecteur. Bacula num\'erote ces slots de un jusqu'au nombre de cartouches +contenues dans la librairie. + +Bacula n'utilisera pas automatiquement une cartouche pr\'esente dans la librairie +si elle ne porte pas d'\'etiquette (label) Bacula et si son num\'ero de slot n'est pas +r\'ef\'erenc\'e dans le catalogue. Vous devez, \`a l'aide de la console, assigner un +slot \`a chaque cartouche pr\'esente dans la librairie. Cette information est +conserv\'ee dans le catalogue avec les autres donn\'ees relatives au volume. +Si le slot n'est pas pr\'ecis\'e, ou s'il est \'egal \`a z\'ero, alors Bacula ne tentera +pas d'utiliser la librairie, m\^eme si tous les enregistrements de configuration +sont pr\'esents. De m\^eme, la commande {\bf mount} de la console Bacula ne +provoque pas non plus l'utilisation de la librairie, mais se contente d'ordonner +\`a Bacula de lire toute cartouche \'eventuellement pr\'esente dans le lecteur. + +Vous pouvez contr\^oler le num\'ero de slot et le drapeau InChanger avec la commande : + \begin{verbatim} list Volumes \end{verbatim} -in the Console program. +dans la console. \label{mult} -\subsection*{Multiple Devices} -\index[general]{Devices!Multiple } -\index[general]{Multiple Devices } -\addcontentsline{toc}{subsection}{Multiple Devices} - -Some autochangers have more than one read/write device (drive). The -new -\ilink{Autochanger resource}{AutochangerRes} introduced in version -1.37 permits you to group Device resources, where each device -represents a drive. The Director may still reference the Devices (drives) -directly, but doing so, bypasses the proper functioning of the -drives together. Instead, the Director (in the Storage resource) -should reference the Autochanger resource name. Doing so permits -the Storage daemon to ensure that only one drive uses the mtx-changer -script at a time, and also that two drives don't reference the -same Volume. - -Multi-drive requires the use of the {\bf -Drive Index} directive in the Device resource of the Storage daemon's -configuration file. Drive numbers or the Device Index are numbered beginning -at zero, which is the default. To use the second Drive in an autochanger, you -need to define a second Device resource and set the Drive Index to 1 for -that device. In general, the second device will have the same {\bf Changer -Device} (control channel) as the first drive, but a different {\bf Archive -Device}. +\subsection*{Lecteurs multiples} +\index[general]{Lecteurs!Multiples } +\index[general]{Lecteurs ultiples} +\addcontentsline{toc}{subsection}{Lecteurs multiple} + +Certaines librairies comportent plusieurs p\'eriph\'eriques de lecture/\'ectriture +(lecteurs). La nouvelle \ilink{ressource Autochanger}{AutochangerRes} +apparue avec la version 1.37 vous permet de grouper des ressources Devices +(repr\'esentant chacune un lecteur). Le Director est toujours en mesure +d'adresser directement un lecteur, mais ce faisant, il outrepasse +le fonctionnement propre aux groupements de lecteurs. Il est pr\'ef\'erable +que la Ressource Storage du Director d\'efinisse une ressource +Autochanger, permettant ainsi au Storage Daemon de s'assurer qu'un seul +lecteur \`a la fois utilise le script mtx-changer, et que deux lecteurs ne tentent +pas de lire le m\^eme volume. + +Les librairies \`a lecteurs multiples n\'ecessitent d'utiliser la directive +{\bf Drive Index} dans la ressource Device du Storage Daemon. Les +lecteurs sont num\'erot\'es \`a partir de z\'ero, ce qui constitue la valeur par +d\'efaut. Pour utiliser un deuxi\`eme lecteur dans une librairie, vous devez +d\'efinir une seconde ressource Device et lui attribuer le Drive Index 1. +En g\'en\'eral, le second p\'eriph\'erique aura le m\^eme {\bf Changer Device} +(canal de contr\^ole) que le premier, mais une {\bf Archive Device} diff\'erente. \label{ConfigRecords} -\subsection*{Device Configuration Records} -\index[general]{Records!Device Configuration } -\index[general]{Device Configuration Records } -\addcontentsline{toc}{subsection}{Device Configuration Records} +\subsection*{Directives de la ressource Device} +\index[general]{Directives!ressource Device} +\index[general]{Directives de la ressource Device} +\addcontentsline{toc}{subsection}{Directives de la ressource Device} -Configuration of autochangers within Bacula is done in the Device resource of -the Storage daemon. Four records: {\bf Autochanger}, {\bf Changer Device}, -{\bf Changer Command}, and {\bf Maximum Changer Wait} control how Bacula uses -the autochanger. +La configuration des librairies s'effectue dans Bacula au niveau de le ressource +Device du Storage Daemon. Quatre directives permettent de d\'efinir l'usage de +la librairie par Bacula : {\bf Autochanger}, {\bf Changer Device}, +{\bf Changer Command} et {\bf Maximum Changer Wait -These four records, permitted in {\bf Device} resources, are described in -detail below. Note, however, that the {\bf Changer Device} and the -{\bf Changer Command} directives are not needed in the Device resource -if they are present in the {\bf Autochanger} resource. +Ces quatre directives sont d\'ecrites en d\'etail ci-dessous. Notez cependant +que les directives {\bf Changer Device} et {\bf Changer Command} ne sont pas +requises dans la ressource Device si elles figurent dans la ressource +{\bf Autochanger}. \begin{description} \item [Autochanger = {\it Yes|No} ] - \index[sd]{Autochanger } - The {\bf Autochanger} record specifies that the current device is or is not -an autochanger. The default is {\bf no}. + \index[sd]{Autochanger} + La directive {\bf Autochanger} stipule que le p\'eriph\'erique ainsi d\'efini est, ou + n'est pas, une librairie. La valeur par d\'efaut est {\bf no}. \item [Changer Device = \lt{}device-name\gt{}] - \index[sd]{Changer Device } - In addition to the Archive Device name, you must specify a {\bf Changer -Device} name. This is because most autochangers are controlled through a -different device than is used for reading and writing the cartridges. For -example, on Linux, one normally uses the generic SCSI interface for -controlling the autochanger, but the standard SCSI interface for reading and -writing the tapes. On Linux, for the {\bf Archive Device = /dev/nst0}, you -would typically have {\bf Changer Device = /dev/sg0}. Note, some of the more -advanced autochangers will locate the changer device on {\bf /dev/sg1}. Such -devices typically have several drives and a large number of tapes. - -On FreeBSD systems, the changer device will typically be on {\bf /dev/pass0} -through {\bf /dev/passn}. - -On Solaris, the changer device will typically be some file under {\bf -/dev/rdsk}. - -Please ensure that your Storage daemon has permission to access this -device. + \index[sd]{Changer Device} + En plus du nom d'Archive Device, vous devez sp\'ecifier un nom de + librairie {\bf Changer Device}, ceci parce que la plupart des librairies + sont control\'ees via un pseudo-fichier diff\'erent de celui utilis\'e pour + lire et \'ecrire sur les cartouches. Par exemple, sur les syst\`emes Linux, + on utilise g\'en\'eralement l'interface SCSI g\'en\'erique pour contr\^oler le bras + de la librairie, soit {\bf Changer Device = /dev/sg0} et l'interface SCSI + standard pour lire et \'ecrire sur les bandes, soit {\bf Archive Device = /dev/nst0}. + Notez que certaines librairies \'evolu\'ees localiseront le bras sur + {\bf /dev/sg1}. De telles librairies ont souvent plusieurs lecteurs et un + nombre important de cartouches. + + Sur FreeBSD, on sp\'ecifiera typiquement {\bf Changer Device = /dev/pass0} ou + {\bf Changer Device = /dev/passn}. + + Sur Solaris, ce sera {\bf Changer Device = /dev/rdsk}. + + Assurez vous que votre Storage Daemon poss\`ede les permissions d'acc\'eder \`a + ce p\'eriph\'erique. \item [Changer Command = \lt{}command\gt{}] \index[sd]{Changer Command } - This record is used to specify the external program to call and what -arguments to pass to it. The command is assumed to be a standard program or -shell script that can be executed by the operating system. This command is -invoked each time that Bacula wishes to manipulate the autochanger. The -following substitutions are made in the {\bf command} before it is sent to -the operating system for execution: + Cette directive est utilis\'ee pour sp\'ecifier le programme externe \`a appeler + et les arguments \`a lui fournir. La commande est suppos\'ee \^etre un programme + ou un script shell standard qui peut \^etre ex\'ecut\'e par le syst\`eme. cette + commande est invoqu\'ee chaque fois que Bacula manipule le bras de la librairie. + Les substitutions suivantes sont effectu\'ees dans la ligne {\bf command} + avant qu'elle ne soit envoy\'ee au syst\`eme d'exploitation pour ex\'ecution. \footnotesize \begin{verbatim} @@ -282,8 +292,7 @@ the operating system for execution: \end{verbatim} \normalsize -An actual example for using {\bf mtx} with the {\bf mtx-changer} script (part -of the Bacula distribution) is: +Voici un exemple d'utilisation de {\bf mtx} avec le script {\bf mtx-changer} : \footnotesize \begin{verbatim} @@ -291,51 +300,52 @@ Changer Command = "/etc/bacula/mtx-changer %c %o %S %a %d" \end{verbatim} \normalsize -Where you will need to adapt the {\bf /etc/bacula} to be the actual path on -your system where the mtx-changer script resides. Details of the three -commands currently used by Bacula (loaded, load, unload) as well as the -output expected by Bacula are give in the {\bf Bacula Autochanger Interface} -section below. +O\`u vous devrez adapter le chemin {\bf /etc/bacula} pour qu'il co\''incide \`a +la r\'ealit\'e de votre installation. Les d\'etails des trois commandes (loaded, +load, unload) utilis\'ees par Bacula ainsi que la sortie qui en est attendue +sont donn\'es dans la section {\bf Interface entre Bacula et les librairies} +ci-dessous. \item [Maximum Changer Wait = \lt{}time\gt{}] - \index[sd]{Maximum Changer Wait } - This record is used to define the maximum amount of time that Bacula - will wait for an autoloader to respond to a command (e.g. load). The - default is set to 120 seconds. If you have a slow autoloader you may - want to set it longer. - -If the autoloader program fails to respond in this time, it will be killed -and Bacula will request operator intervention. + \index[sd]{Maximum Changer Wait} + Cet enregistrement sert \`a d\'efinir le d\'elai maximal durant lequel Bacula + attendra la r\'eponse d'une librairie \`a une commande (par exemple, load). + La valeur par d\'efaut est 120 secondes. Si votre librairie est lente, vous + pouvez avoir int\'er\^et \`a allonger ce d\'elai. + + Au del\`a de ce d\'elai, le programme de chargement est tu\'e et Bacula + sollicite l'intervention d'un op\'erateur. \item [Drive Index = \lt{}number\gt{}] - \index[sd]{Drive Index } - This record allows you to tell Bacula to use the second or subsequent - drive in an autochanger with multiple drives. Since the drives are - numbered from zero, the second drive is defined by + \index[sd]{Drive Index} + Cette directive vous permet d'indiquer \`a Bacula d'utiliser le second + lecteur et les \'eventuels suivants dans une librairie qui en contient + plusieurs. Etant donn\'e que les lecteurs sont num\'erot\'es \`a partir de + z\'ero, le second est d\'efini par : \footnotesize \begin{verbatim} Device Index = 1 - \end{verbatim} \normalsize -To use the second drive, you need a second Device resource definition in the -Bacula configuration file. See the Multiple Drive section above in this -chapter for more information. +Pour utiliser le second lecteur, vous devez avoir une seconde d\'efinition +de ressource Device dans le fichier bacula-sd.conf. Voyez la section +concernant les lecteurs multiples plus haut dans ce chapitre pour plus +de plus amples informations. \end{description} -In addition, for proper functioning of the Autochanger, you must -define an Autochanger resource. +De plus, pour un fonctionnement correct de la librairie, vous devez d\'efinir +une ressource Autochanger. \input{autochangerres} \label{example} -\subsection*{An Example Configuration File} -\index[general]{Example Configuration File } -\index[general]{File!Example Configuration } -\addcontentsline{toc}{subsection}{Example Configuration File} +\subsection*{Un exemple de fichier de configuration} +\index[general]{exemple fichier configuration} +\index[general]{fichier!exemple configuration} +\addcontentsline{toc}{subsection}{Un exemple de fichier de configuration} -The following two resources implement an autochanger: +Les deux ressource suivantes impl\'ementent une librairie : \footnotesize \begin{verbatim} diff --git a/docs/manual-fr/console.tex b/docs/manual-fr/console.tex index 6b68dfc6..b595041c 100644 --- a/docs/manual-fr/console.tex +++ b/docs/manual-fr/console.tex @@ -3,10 +3,10 @@ \section*{Bacula Console} \label{_ConsoleChapter} -\index[general]{Console!Bacula } -\index[general]{Bacula Console } -\index[console]{Console!Bacula } -\index[console]{Bacula Console } +\index[general]{Console!Bacula} +\index[general]{Bacula Console} +\index[console]{Console!Bacula} +\index[console]{Bacula Console} \addcontentsline{toc}{section}{Bacula Console} \subsection*{General} @@ -53,10 +53,10 @@ information on configuration of the Console program, please see the this document. \subsection*{Running the Console Program} -\index[general]{Running the Console Program } -\index[general]{Program!Running the Console } -\index[console]{Running the Console Program } -\index[console]{Program!Running the Console } +\index[general]{Running the Console Program} +\index[general]{Program!Running the Console} +\index[console]{Running the Console Program} +\index[console]{Program!Running the Console} \addcontentsline{toc}{subsection}{Running the Console Program} After launching the Console program (bconsole), it will prompt you for the @@ -100,10 +100,10 @@ show pools will display all the Pool resource records. \subsection*{Stopping the Console Program} -\index[general]{Program!Stopping the Console } -\index[general]{Stopping the Console Program } -\index[console]{Program!Stopping the Console } -\index[console]{Stopping the Console Program } +\index[general]{Program!Stopping the Console} +\index[general]{Stopping the Console Program} +\index[console]{Program!Stopping the Console} +\index[console]{Stopping the Console Program} \addcontentsline{toc}{subsection}{Stopping the Console Program} Normally, you simply enter {\bf quit} or {\bf exit} and the Console program @@ -120,13 +120,132 @@ returned to the main command prompt or if appropriate the previous prompt (in the case of nested prompts). In a few places such as where it is asking for a 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. -\label{list} +\label{keywords} +\subsection*{Alphabetic List of Console Keywords} +\index[general]{Keywords!Alphabetic List of Console} +\index[general]{Alphabetic List of Console Keywords} +\index[console]{Keywords!Alphabetic List of Console} +\index[console]{Alphabetic List of Console Keywords} +\addcontentsline{toc}{subsection}{Alphabetic List of Console Keywords} +Unless otherwise specified, each of the following keywords +takes an argument, which is specified after the keyword following +an equal sign. For example: + +\begin{verbatim} +jobid=536 +\end{verbatim} + +Please note, this list is incomplete as it is currently in +the process of being created and is not currently totally in +alphabetic +order ... + +\begin{description} +\item [restart] + Permitted on the python command, and causes the Python + interpreter to be restarted. Takes no argument. +\item [all] + Permitted on the status and show commands to specify all components or + resources respectively. +\item [before] + Used in the restore command. +\item [bootstrap] + Used in the restore command. +\item [catalog] + Allowed in the use command to specify the catalog name + to be used. +\item [catalogs] + Used in the show command. Takes no arguments. +\item [client | fd] +\item [clients] + Used in the show, list, and llist commands. Takes no arguments. +\item [counters] + Used in the show command. Takes no arguments. +\item [current] + Used in the restore command. Takes no argument. +\item [days] +\item [devices] + Used in the show command. Takes no arguments. +\item [dir | director] +\item [directors] + Used in the show command. Takes no arguments. +\item [directory] + Used in the restore command. +\item [done] + Used in the restore command. Takes no argument. +\item [file] + Used in the restore command. +\item [files] + Used in the list and llist commands. Takes no arguments. +\item [fileset] +\item [filesets] + Used in the show command. Takes no arguments. +\item [help] + Used in the show command. Takes no arguments. +\item [jobs] + Used in the show, list and llist commands. Takes no arguments. +\item [jobmedia] + Used in the list and llist commands. Takes no arguments. +\item [jobtotals] + Used in the list and llist commands. Takes no arguments. +\item [jobid] + The JobId is the numeric jobid that is printed in the Job + Report output. It is the index of the database record for the + given job. While it is unique for all the existing Job records + in the catalog database, the same JobId can be reused once a + Job is removed from the catalog. Probably you will refer + specific Jobs that ran using their numeric JobId. +\item [job | jobname] + The Job or Jobname keyword refers to the name you specified + in the Job resource, and hence it refers to any number of + Jobs that ran. It is typically useful if you want to list + all jobs of a particular name. +\item [level] +\item [listing] + Permitted on the estimate command. Takes no argument. +\item [limit] +\item [messages] + Used in the show command. Takes no arguments. +\item [media] + Used in the list and llist commands. Takes no arguments. +\item [nextvol | nextvolume] + Used in the list and llist commands. Takes no arguments. +\item [on] + Takes no keyword. +\item [off] + Takes no keyword. +\item [pool] +\item [pools] + Used in the show, list, and llist commands. Takes no arguments. +\item [select] + Used in the restore command. Takes no argument. +\item [storages] + Used in the show command. Takes no arguments. +\item [schedules] + Used in the show command. Takes no arguments. +\item [sd | store | storage] +\item [ujobid] + The ujobid is a unique job identification that is printed + in the Job Report output. At the current time, it consists + of the Job name (from the Name directive for the job) appended + with the date and time the job was run. This keyword is useful + if you want to completely identify the Job instance run. +\item [volume] +\item [volumes] + Used in the list and llist commands. Takes no arguments. +\item [where] + Used in the restore command. +\item [yes] + Used in the restore command. Takes no argument. +\end{description} + +\label{list} \subsection*{Alphabetic List of Console Commands} -\index[general]{Commands!Alphabetic List of Console } -\index[general]{Alphabetic List of Console Commands } -\index[console]{Commands!Alphabetic List of Console } -\index[console]{Alphabetic List of Console Commands } +\index[general]{Commands!Alphabetic List of Console} +\index[general]{Alphabetic List of Console Commands} +\index[console]{Commands!Alphabetic List of Console} +\index[console]{Alphabetic List of Console Commands} \addcontentsline{toc}{subsection}{Alphabetic List of Console Commands} The following commands are currently implemented: @@ -169,7 +288,7 @@ command below for the list of legal characters in a Volume name. off, you must explicitly {\bf mount} the tape after a label command to use it. -\item [{cancel [jobid=\lt{}number\gt{} job=\lt{}job-name\gt{}]}] +\item [{cancel [jobid=\lt{}number\gt{} job=\lt{}job-name\gt{} ujobid=\lt{}unique-jobid\gt{}]}] \index[console]{cancel jobid} This command is used to cancel a job and accepts {\bf jobid=nnn} or {\bf job=xxx} as an argument where nnn is replaced by the JobId and xxx is @@ -200,7 +319,7 @@ command below for the list of legal characters in a Volume name. database immediately, simply use this command to force it to be created. \item [{ delete [volume=\lt{}vol-name\gt{} pool=\lt{}pool-name\gt{} job - jobid=\lt{}id\gt{}] }] + jobid=\lt{}id\gt{}]}] \index[console]{delete} The delete command is used to delete a Volume, Pool or Job record from the Catalog as well as all associated catalog Volume records that were @@ -230,8 +349,27 @@ delete Job JobId=n,m,o-r,t ... second form deletes a Volume record from the specified pool in the catalog database. The third form deletes the specified Job record from the catalog database. The last form deletes JobId records for JobIds - n,m,o,p, q,r, and t. Where each one of the n,m,... is, of course, a - number. + n, m, o, p, q, r, and t. Where each one of the n,m,... is, of course, a + number. That is a "delete jobid" accepts lists and ranges of + jobids. + +\item [disable job\lt{}job-name\gt{}] + \index[console]{enable} + This command permits you to disable a Job for automatic scheduling. + The job may have been previously enabled with the Job resource + {\bf Enabled} directive or using the console {\bf enable} command. + The next time the Director is restarted or the conf file is reloaded, + the Enable/Disable state will be set to the value in the Job resource + (default enabled). + +\item [enable job\lt{}job-name\gt{}] + \index[console]{enable} + This command permits you to enable a Job for automatic scheduling. + The job may have been previously disabled with the Job resource + {\bf Enabled} directive or using the console {\bf disable} command. + The next time the Director is restarted or the conf file is reloaded, + the Enable/Disable state will be set to the value in the Job resource + (default enabled). \label{estimate} \item [estimate] @@ -363,7 +501,7 @@ the catalog. For example with: Pool { Name ... Cleaning Prefix = "CLN" - } + } \end{verbatim} \normalsize @@ -386,19 +524,26 @@ update storage=xxx pool=yyy slots=1-5,10 barcodes \begin{verbatim} list jobs - list jobid=\lt{}id\gt{} + list jobid= (list jobid id) + + list ujobid (list job with unique name) - list job=\lt{}job-name\gt{} + list job= (list all jobs with "job-name") + + list jobname= (same as above) + + In the above, you can add "limit=nn" to limit the output to + nn jobs. list jobmedia - list jobmedia jobid=\lt{}id\gt{} + list jobmedia jobid= - list jobmedia job=\lt{}job-name\gt{} + list jobmedia job= - list files jobid=\lt{}id\gt{} + list files jobid= - list files job=\lt{}job-name\gt{} + list files job= list pools @@ -408,17 +553,21 @@ update storage=xxx pool=yyy slots=1-5,10 barcodes list volumes - list volumes jobid=\lt{}id\gt{} + list volumes jobid= - list volumes pool=\lt{}pool-name\gt{} + list volumes pool= - list volumes job=\lt{}job-name\gt{} + list volumes job= - list volume=\lt{}volume-name\gt{} + list volume= - list nextvolume job=\lt{}job-name\gt{} + list nextvolume job= - list nextvol job=\lt{}job-name\gt{} + list nextvol job= + + list nextvol job= days=nnn + + \end{verbatim} \normalsize @@ -435,7 +584,11 @@ update storage=xxx pool=yyy slots=1-5,10 barcodes of what Volume will be used but not a definitive answer. In addition, this command may have certain side effect because it runs through the same algorithm as a job, which means it may automatically purge or - recycle a Volume. + recycle a Volume. By default, the job specified must run within the + next two days or no volume will be found. You can, however, use the + {\bf days=nnn} specification to specify up to 50 days. For example, + if on Friday, you want to see what Volume will be needed on Monday, + for job MyJob, you would use {\bf list nextvol job=MyJob days=3}. If you wish to add specialized commands that list the contents of the catalog, you can do so by adding them to the {\bf query.sql} file. @@ -502,6 +655,7 @@ update storage=xxx pool=yyy slots=1-5,10 barcodes Recycle: 1 PoolType: Backup LabelFormat: * + PoolId: 2 Name: Recycle NumVols: 0 @@ -656,7 +810,7 @@ release storage=\lt{}storage-name\gt{} configuration while Bacula is running, it is advisable to restart the Director at the next convenient opportunity. - +\label{restore_command} \item [restore] \index[console]{restore} The restore command allows you to select one or more Jobs (JobIds) to be @@ -774,10 +928,11 @@ setdebug level=nn [trace=0/1 client=\lt{}client-name\gt{} | dir | director | \index[console]{show} The show command will list the Director's resource records as defined in the Director's configuration file (normally {\bf bacula-dir.conf}). - This command is used mainly for debugging purposes by developers. The - following keywords are accepted on the show command line: directors, - clients, counters, jobs, storages, catalogs, schedules, filesets, - groups, pools, messages, all, help. Please don't confuse this command + This command is used mainly for debugging purposes by developers. + The following keywords are accepted on the + show command line: catalogs, clients, counters, devices, directors, + filesets, jobs, messages, pools, schedules, storages, all, help. + Please don't confuse this command with the {\bf list}, which displays the contents of the catalog. \item [sqlquery] @@ -807,7 +962,8 @@ setdebug level=nn [trace=0/1 client=\lt{}client-name\gt{} | dir | director | running jobs. The full form of this command is: status [all | dir=\lt{}dir-name\gt{} | director | - client=\lt{}client-name\gt{} | storage=\lt{}storage-name\gt{}] + client=\lt{}client-name\gt{} | storage=\lt{}storage-name\gt{} | + days=nnn] If you do a {\bf status dir}, the console will list any currently running jobs, a summary of all jobs scheduled to be run in the next 24 @@ -842,15 +998,104 @@ status [all | dir=\lt{}dir-name\gt{} | director | JobId 2508 (MatouVerify) is waiting because only one job can run at a time, hence it is simply "waiting execution" + If you do a {\bf status dir}, it will by default list the first + occurrence of all jobs that are scheduled today and tomorrow. If you + wish to see the jobs that are scheduled in the next 3 days (e.g. on + Friday you want to see the first occurrence of what tapes are scheduled + to be used on Friday, the weekend, and Monday), you can add the {\bf + days=3} option. Note, a {\bf days=0} shows the first occurrence of jobs + scheduled today only. If you have multiple run statements, the first + occurrence of each run statement for the job will be displayed for the + period specified. + + If your job seems to be blocked, you can get a general idea of the + problem by doing a {\bf status dir}, but you can most often get a + much more specific indication of the problem by doing a + {\bf status storage=xxx}. For example, on an idle test system, when + I do {\bf status storage=File}, I get: +\footnotesize +\begin{verbatim} +status storage=File +Connecting to Storage daemon File at 192.168.68.112:8103 + +rufus-sd Version: 1.39.6 (24 March 2006) i686-pc-linux-gnu redhat (Stentz) +Daemon started 26-Mar-06 11:06, 0 Jobs run since started. + +Running Jobs: +No Jobs running. +==== + +Jobs waiting to reserve a drive: +==== + +Terminated Jobs: + JobId Level Files Bytes Status Finished Name +====================================================================== + 59 Full 234 4,417,599 OK 15-Jan-06 11:54 kernsave +==== + +Device status: +utochanger "DDS-4-changer" with devices: + "DDS-4" (/dev/nst0) +Device "DDS-4" (/dev/nst0) is mounted with Volume="TestVolume002" +Pool="*unknown*" + Slot 2 is loaded in drive 0. + Total Bytes Read=0 Blocks Read=0 Bytes/block=0 + Positioned at File=0 Block=0 +Device "Dummy" is not open or does not exist. +No DEVICE structure. + +Device "DVD-Writer" (/dev/hdc) is not open. +Device "File" (/tmp) is not open. +==== + +In Use Volume status: +==== +\end{verbatim} +\normalsize + +Now, what this tells me is that no jobs are running and that none of +the devices are in use. Now, if I {\bf unmount} the autochanger, which +will not be used in this example, and then start a Job that uses the +File device, the job will block. When I re-issue the status storage +command, I get for the Device status: + +\footnotesize +\begin{verbatim} +status storage=File +... +Device status: +Autochanger "DDS-4-changer" with devices: + "DDS-4" (/dev/nst0) +Device "DDS-4" (/dev/nst0) is not open. + Device is BLOCKED. User unmounted. + Drive 0 is not loaded. +Device "Dummy" is not open or does not exist. +No DEVICE structure. + +Device "DVD-Writer" (/dev/hdc) is not open. +Device "File" (/tmp) is not open. + Device is BLOCKED waiting for media. +==== +... +\end{verbatim} +\normalsize + +Now, here it should be clear that if a job were running that wanted +to use the Autochanger (with two devices), it would block because +the user unmounted the device. The real problem for the Job I started +using the "File" device is that the device is blocked waiting for +media -- that is Bacula needs you to label a Volume. + \item [unmount] \index[console]{unmount} This command causes the indicated Bacula Storage daemon to unmount the specified device. The forms of the command are the same as the mount command: \footnotesize \begin{verbatim} -unmount storage=\lt{}storage-name\gt{} +unmount storage= -unmount [ jobid=\lt{}id\gt{} | job=\lt{}job-name\gt{} ] +unmount [ jobid= | job= ] \end{verbatim} \normalsize @@ -899,7 +1144,8 @@ wish to change. The following Volume parameters may be changed: cassettes in the magazine, or if you have removed the magazine and inserted a different one. As the slot of each Volume is updated, the InChanger flag for that Volume will also be set, and any other Volumes - in the Pool will have their InChanger flag turned off. This permits + in the Pool that were last mounted on the same Storage device + will have their InChanger flag turned off. This permits Bacula to know what magazine (tape holder) is currently in the autochanger. @@ -927,7 +1173,7 @@ wish to change. The following Volume parameters may be changed: \normalsize \item [use] - \index[console]{use } + \index[console]{use} This command allows you to specify which Catalog database to use. Normally, you will be using only one database so this will be done automatically. In the case that you are using more than one database, you can use this command @@ -937,7 +1183,7 @@ use \lt{}database-name\gt{} \item [var] \label{var} - \index[console]{var name } + \index[console]{var name} This command takes a string or quoted string and does variable expansion on it the same way variable expansion is done on the {\bf LabelFormat} string. Thus, for the most part, you can test your LabelFormat strings. The @@ -947,11 +1193,11 @@ use \lt{}database-name\gt{} good idea of what is going to happen in the real case. \item [version] - \index[console]{version } + \index[console]{version} The command prints the Director's version. \item [quit] - \index[console]{quit } + \index[console]{quit} This command terminates the console program. The console program sends the {\bf quit} request to the Director and waits for acknowledgment. If the Director is busy doing a previous command for you that has not terminated, it @@ -959,7 +1205,7 @@ may take some time. You may quit immediately by issuing the {\bf .quit} command (i.e. quit preceded by a period). \item [query] - \index[console]{query } + \index[console]{query} This command reads a predefined SQL query from the query file (the name and location of the query file is defined with the QueryFile resource record in the Director's configuration file). You are prompted to select a query from @@ -986,11 +1232,11 @@ Choose a query (1-9): \normalsize \item [exit] - \index[console]{exit } + \index[console]{exit} This command terminates the console program. \item [wait] - \index[console]{wait } + \index[console]{wait} The wait command causes the Director to pause until there are no jobs running. This command is useful in a batch situation such as regression testing where you wish to start a job and wait until that job completes @@ -1000,8 +1246,8 @@ before continuing. \label{dotcommands} \subsection*{Special dot Commands} -\index[general]{Commands!Special dot } -\index[general]{Special dot Commands } +\index[general]{Commands!Special dot} +\index[general]{Special dot Commands} \addcontentsline{toc}{subsection}{Special dot Commands} There is a list of commands that are prefixed with a period (.). These @@ -1035,8 +1281,8 @@ is the list of dot commands: \label{atcommands} \subsection*{Special At (@) Commands} -\index[general]{Commands!Special At @ } -\index[general]{Special At (@) Commands } +\index[general]{Commands!Special At @} +\index[general]{Special At (@) Commands} \addcontentsline{toc}{subsection}{Special At (@) Commands} Normally, all commands entered to the Console program are immediately @@ -1049,11 +1295,11 @@ the tty console program and not in the GNOME Console. These commands are: \begin{description} \item [@input \lt{}filename\gt{}] - \index[console]{@input \lt{}filename\gt{} } + \index[console]{@input \lt{}filename\gt{}} Read and execute the commands contained in the file specified. \item [@output \lt{}filename\gt{} w/a] - \index[console]{@output \lt{}filename\gt{} w/a } + \index[console]{@output \lt{}filename\gt{} w/a} Send all following output to the filename specified either overwriting the file (w) or appending to the file (a). To redirect the output to the terminal, simply enter {\bf @output} without a filename specification. @@ -1070,40 +1316,40 @@ regression test might be: \normalsize \item [@tee \lt{}filename\gt{} w/a] - \index[console]{@tee \lt{}filename\gt{} w/a } + \index[console]{@tee \lt{}filename\gt{} w/a} Send all subsequent output to both the specified file and the terminal. It is turned off by specifying {\bf @tee} or {\bf @output} without a filename. \item [@sleep \lt{}seconds\gt{}] - \index[console]{@sleep \lt{}seconds\gt{} } + \index[console]{@sleep \lt{}seconds\gt{}} Sleep the specified number of seconds. \item [@time] - \index[console]{@time } + \index[console]{@time} Print the current time and date. \item [@version] - \index[console]{@version } + \index[console]{@version} Print the console's version. \item [@quit] - \index[console]{@quit } + \index[console]{@quit} quit \item [@exit] - \index[console]{@exit } + \index[console]{@exit} quit \item [@\# anything] - \index[console]{anything } + \index[console]{anything} Comment \end{description} \label{scripting} \subsection*{Running the Console Program from a Shell Script} -\index[general]{Script!Running the Console Program from a Shell } -\index[general]{Running the Console Program from a Shell Script } +\index[general]{Script!Running the Console Program from a Shell} +\index[general]{Running the Console Program from a Shell Script} \addcontentsline{toc}{subsection}{Running the Console Program from a Shell Script} @@ -1177,8 +1423,8 @@ restorestat=$? \normalsize \subsection*{Adding Volumes to a Pool} -\index[general]{Adding Volumes to a Pool } -\index[general]{Pool!Adding Volumes to a } +\index[general]{Adding Volumes to a Pool} +\index[general]{Pool!Adding Volumes to a} \addcontentsline{toc}{subsection}{Adding Volumes to a Pool} If you have used the {\bf label} command to label a Volume, it will be