From: Philippe Chauvat Date: Wed, 3 Oct 2012 08:59:20 +0000 (+0200) Subject: integrate external links X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=067e1a06598d6655b8fc1e5d1f52b52d0a877a4c;p=bacula%2Fdocs integrate external links --- diff --git a/docs/manuals/bacula.sty.in b/docs/manuals/bacula.sty.in index a580b198..b106e225 100644 --- a/docs/manuals/bacula.sty.in +++ b/docs/manuals/bacula.sty.in @@ -44,8 +44,17 @@ \def\mainman{Main \mbacula{} Manual} \def\devman{Developers \mbacula{} Manual} %%% +%%% #1: Text to display +%%% #2: Label defined +%%% #3: manual: main, console, misc, developers +%%% #4: text as reference level. will be displayed ``as is'' +%%% +%%% Example: +%%% \bsysxrlink{Console Configuration}{ConsoleConfChapter}{main}{chapter} +%%% will display +%%% Console Configuration chapter (chapter 30 on page 269) \newcommand*{\bsysxrlink}[4]{% - \href{\url{../#3/#3}}{#1 #4 (#4 \vref{#3-#2})} + \href{../#3/#3}{#1 #4 (#4 \vref{#3-#2})} } %%% %%% --- PCT diff --git a/docs/manuals/en/console/bconsole.tex b/docs/manuals/en/console/bconsole.tex index 8861a22c..511bbde6 100644 --- a/docs/manuals/en/console/bconsole.tex +++ b/docs/manuals/en/console/bconsole.tex @@ -1,57 +1,51 @@ %% %% -\chapter{Bacula Console} +\chapter{\mbacula{} Console} \label{_ConsoleChapter} -\index[general]{Console!Bacula} -\index[general]{Bacula Console} -\index[general]{Console!Bacula} -\index[general]{Bacula Console} - -The {\bf Bacula Console} (sometimes called the User Agent) is a program that -allows the user or the System Administrator, to interact with the Bacula -Director daemon while the daemon is running. - -The current Bacula Console comes in two versions: a shell interface (TTY -style), and a QT GUI interface (Bat). Both permit the administrator or -authorized users to interact with Bacula. You can determine the status of a +\index[general]{Console!\mbacula{}} +\index[general]{\mbacula{} Console} + +The {\bf \mbacula{} Console} (sometimes called the User Agent) is a program +that allows the user or the System Administrator, to interact with the + \mbacula{} \director{} daemon while the daemon is running. + +The current \mbacula{} Console comes in two versions: a shell interface (TTY +style), and a QT GUI interface (\bat{}). Both permit the administrator or +authorized users to interact with \mbacula{}. You can determine the status of a particular job, examine the contents of the Catalog as well as perform certain tape manipulations with the Console program. -Since the Console program interacts with the Director through the network, your -Console and Director programs do not necessarily need to run on the same -machine. +Since the Console program interacts with the \director{} through the network, + your Console and \director{} programs do not necessarily need to run on the + same machine. In fact, a certain minimal knowledge of the Console program is needed in order -for Bacula to be able to write on more than one tape, because when Bacula +for \mbacula{} to be able to write on more than one tape, because when \mbacula{} requests a new tape, it waits until the user, via the Console program, -indicates that the new tape is mounted. +indicates that the new tape is mounted. \section{Console Configuration} \index[general]{Console Configuration} \index[general]{Configuration!Console} -\index[general]{Console Configuration} -\index[general]{Configuration!Console} -When the Console starts, it reads a standard Bacula configuration file +When the Console starts, it reads a standard \mbacula{} configuration file named {\bf bconsole.conf} or {\bf bat.conf} in the case of the Bat QT Console version from the current directory unless you specify the {\bf {-}c} -command line option (see below). This file allows default configuration +command line option (see below). This file allows default 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 \bsysxrlink{Console Configuration}{ConsoleConfChapter} +{main}{chapter} of the \mainman{}. \section{Running the Console Program} \index[general]{Running the Console Program} \index[general]{Program!Running the Console} -\index[general]{Running the Console Program} -\index[general]{Program!Running the Console} The console program can be run with the following options: -\footnotesize -\begin{verbatim} +%%%\footnotesize +\begin{lstlisting} Usage: bconsole [-s] [-c config_file] [-d debug_level] -c set configuration file to file -dnn set debug level to nn @@ -60,7 +54,7 @@ Usage: bconsole [-s] [-c config_file] [-d debug_level] -u set command execution timeout to seconds -t test - read configuration and exit -? print this message. -\end{verbatim} +\end{lstlisting} \normalsize @@ -70,10 +64,10 @@ enter the command name and the Console program will prompt you for the necessary arguments. Alternatively, in most cases, you may enter the command followed by arguments. The general format is: -\footnotesize -\begin{verbatim} +%%%\footnotesize +\begin{lstlisting} [=] [=] ... -\end{verbatim} +\end{lstlisting} \normalsize where {\bf command} is one of the commands listed below; {\bf keyword} is one @@ -82,25 +76,25 @@ argument} is the value. The command may be abbreviated to the shortest unique form. If two commands have the same starting letters, the one that will be selected is the one that appears first in the {\bf help} listing. If you want the second command, simply spell out the full command. None of the keywords -following the command may be abbreviated. +following the command may be abbreviated. -For example: +For example: -\footnotesize -\begin{verbatim} +%%%\footnotesize +\begin{lstlisting} list files jobid=23 -\end{verbatim} +\end{lstlisting} \normalsize -will list all files saved for JobId 23. Or: +will list all files saved for JobId 23. Or: -\footnotesize -\begin{verbatim} +%%%\footnotesize +\begin{lstlisting} show pools -\end{verbatim} +\end{lstlisting} \normalsize -will display all the Pool resource records. +will display all the Pool resource records. The maximum command line length is limited to 511 characters, so if you are scripting the console, you may need to take some care to limit the @@ -109,14 +103,12 @@ line length. \section{Stopping the Console Program} \index[general]{Program!Stopping the Console} \index[general]{Stopping the Console Program} -\index[general]{Program!Stopping the Console} -\index[general]{Stopping the Console Program} Normally, you simply enter {\bf quit} or {\bf exit} and the Console program will terminate. However, it waits until the Director acknowledges the command. If the Director is already doing a lengthy command (e.g. prune), it may take some time. If you want to immediately terminate the Console program, enter the -{\bf .quit} command. +{\bf .quit} command. There is currently no way to interrupt a Console command once issued (i.e. Ctrl-C does not work). However, if you are at a prompt that is asking you to @@ -125,30 +117,28 @@ you can enter a period ({\bf .}), and in most cases, you will either be 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. +will most likely be able to cancel at the next prompt. \label{keywords} \section{Alphabetic List of Console Keywords} \index[general]{Keywords!Alphabetic List of Console} \index[general]{Alphabetic List of Console Keywords} -\index[general]{Keywords!Alphabetic List of Console} -\index[general]{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} +\begin{lstlisting} jobid=536 -\end{verbatim} +\end{lstlisting} Please note, this list is incomplete as it is currently in -the process of being created and is not currently totally 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 + 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 @@ -187,10 +177,10 @@ order ... Used in the show command. Takes no arguments. \item [directory] Used in the restore command. Its argument specifies the directory - to be restored. + to be restored. \item [enabled] This keyword can appear on the {\bf update volume} as well - as the {\bf update slots} commands, and can + as the {\bf update slots} commands, and can allows one of the following arguments: yes, true, no, false, archived, 0, 1, 2. Where 0 corresponds to no or false, 1 corresponds to yes or true, and 2 corresponds to archived. Archived volumes will not be used, nor will @@ -273,7 +263,7 @@ order ... \index[general]{Commands!Alphabetic List of Console} \index[general]{Alphabetic List of Console Commands} -The following commands are currently implemented: +The following commands are currently implemented: \begin{description} \item [{add [pool=\lt{}pool-name\gt{} storage=\lt{}storage\gt{} @@ -283,8 +273,8 @@ The following commands are currently implemented: it creates the Volume name in the catalog and inserts into the Pool in the catalog, but does not attempt to access the physical Volume. Once - added, Bacula expects that Volume to exist and to be labeled. - This command is not normally used since Bacula will + added, \mbacula{} expects that Volume to exist and to be labeled. + This command is not normally used since \mbacula{} will automatically do the equivalent when Volumes are labeled. However, there may be times when you have removed a Volume from the catalog and want to later add it back. @@ -329,7 +319,7 @@ The following commands are currently implemented: you to choose one. Once a Job is marked to be canceled, it may take a bit of time - (generally within a minute but up to two hours) before the Job actually + (generally within a minute but up to two hours) before the Job actually terminates, depending on what operations it is doing. Don't be surprised that you receive a Job not found message. That just means that one of the three daemons had already canceled the job. @@ -341,7 +331,7 @@ The following commands are currently implemented: \index[general]{create pool} This command is not normally used as the Pool records are automatically created by the Director when it starts based on what it finds in - the conf file. If needed, this command can be + the conf file. If needed, this command can be to create a Pool record in the database using the Pool resource record defined in the Director's configuration file. So in a sense, this command simply transfers the information from the Pool @@ -353,7 +343,7 @@ The following commands are currently implemented: will most likely use the {\bf label} command to label one or more volumes and add their names to the Media database. - When starting a Job, if Bacula determines that there is no Pool record + When starting a Job, if \mbacula{} determines that there is no Pool record in the database, but there is a Pool resource of the appropriate name, it will create it for you. If you want the Pool record to appear in the database immediately, simply use this command to force it to be created. @@ -375,23 +365,23 @@ The following commands are currently implemented: records (File and JobMedia) will be deleted from the catalog. The full form of this command is: -\begin{verbatim} +\begin{lstlisting} delete pool= -\end{verbatim} +\end{lstlisting} - or + or -\begin{verbatim} -delete volume= pool= or -\end{verbatim} +\begin{lstlisting} +delete volume= pool= or +\end{lstlisting} -\begin{verbatim} -delete JobId= JobId= ... or -\end{verbatim} +\begin{lstlisting} +delete JobId= JobId= ... or +\end{lstlisting} -\begin{verbatim} -delete Job JobId=n,m,o-r,t ... -\end{verbatim} +\begin{lstlisting} +delete Job JobId=n,m,o-r,t ... +\end{lstlisting} The first form deletes a Pool record from the catalog database. The second form deletes a Volume record from the specified pool in the @@ -403,8 +393,8 @@ delete Job JobId=n,m,o-r,t ... \item [disable job\lt{}job-name\gt{}] \index[general]{disable} - This command permits you to disable a Job for automatic scheduling. - The job may have been previously enabled with the Job resource + 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 @@ -412,8 +402,8 @@ delete Job JobId=n,m,o-r,t ... \item [enable job\lt{}job-name\gt{}] \index[general]{enable} - This command permits you to enable a Job for automatic scheduling. - The job may have been previously disabled with the Job resource + 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 @@ -433,7 +423,7 @@ delete Job JobId=n,m,o-r,t ... that would be backed up. Please note that this is an estimate calculated from the number of blocks in the file rather than by reading the actual bytes. As such, the estimated backup size will generally be - larger than an actual backup. + larger than an actual backup. The \texttt{estimate} command can use the accurate code to detect changes and give a better estimation. You can set the accurate behavior on command @@ -441,66 +431,64 @@ delete Job JobId=n,m,o-r,t ... Optionally you may specify the keyword {\bf listing} in which case, all the files to be backed up will be listed. Note, it could take quite some time to - display them if the backup is large. The full form is: + display them if the backup is large. The full form is: -\begin{verbatim} +\begin{lstlisting} estimate job= listing client= accurate= - fileset= level= -\end{verbatim} + fileset= level= +\end{lstlisting} Specification of the {\bf job} is sufficient, but you can also override the client, fileset, accurate and/or level by specifying them on the estimate command line. - -As an example, you might do: -\footnotesize -\begin{verbatim} +As an example, you might do: + +%%%\footnotesize +\begin{lstlisting} @output /tmp/listing estimate job=NightlySave listing level=Incremental @output -\end{verbatim} +\end{lstlisting} \normalsize which will do a full listing of all files to be backed up for the Job {\bf NightlySave} during an Incremental save and put it in the file {\bf - /tmp/listing}. Note, the byte estimate provided by this command is + /tmp/listing}. Note, the byte estimate provided by this command is based on the file size contained in the directory item. This can give wildly incorrect estimates of the actual storage used if there are - sparse files on your systems. Sparse files are often found on 64 bit + sparse files on your systems. Sparse files are often found on 64 bit systems for certain system files. The size that is returned is the size - Bacula will backup if the sparse option is not specified in the FileSet. - There is currently no way to get an estimate of the real file size that + \mbacula{} will backup if the sparse option is not specified in the FileSet. + There is currently no way to get an estimate of the real file size that would be found should the sparse option be enabled. - + \item [exit] \index[general]{exit} - This command terminates the console program. + This command terminates the console program. \item [gui] \index[general]{gui} Invoke the non-interactive gui mode. -\begin{verbatim} +\begin{lstlisting} gui [on|off] -\end{verbatim} +\end{lstlisting} \item [help] \index[general]{help} - This command displays the list of commands available. + This command displays the list of commands available. \item [label] - \index[general]{label} - \index[general]{relabel} \index[general]{label} \index[general]{relabel} This command is used to label physical volumes. The full form of this command is: -\begin{verbatim} +\begin{lstlisting} label storage= volume= - slot= -\end{verbatim} + slot= +\end{lstlisting} If you leave out any part, you will be prompted for it. The media type is automatically taken from the Storage resource definition that you @@ -515,58 +503,58 @@ label storage= volume= This restriction is to ensure good readability of Volume names to reduce operator errors. - Please note, when labeling a blank tape, Bacula will get {\bf read I/O + Please note, when labeling a blank tape, \mbacula{} will get {\bf read I/O error} when it attempts to ensure that the tape is not already labeled. If you wish to avoid getting these messages, please write an EOF mark on your tape before attempting to label it: -\footnotesize -\begin{verbatim} +%%%\footnotesize +\begin{lstlisting} mt rewind mt weof - -\end{verbatim} + +\end{lstlisting} \normalsize -The label command can fail for a number of reasons: +The label command can fail for a number of reasons: \begin{enumerate} -\item The Volume name you specify is already in the Volume database. +\item The Volume name you specify is already in the Volume database. \item The Storage daemon has a tape or other Volume already mounted on the device, in which case you must {\bf unmount} the device, insert a blank tape, then do the {\bf label} command. -\item The Volume in the device is already a Bacula labeled Volume. (Bacula will - never relabel a Bacula labeled Volume unless it is recycled and you use the - {\bf relabel} command). +\item The Volume in the device is already a \mbacula{} labeled Volume. (\mbacula{} will + never relabel a \mbacula{} labeled Volume unless it is recycled and you use the + {\bf relabel} command). -\item There is no Volume in the drive. +\item There is no Volume in the drive. \end{enumerate} -There are two ways to relabel a volume that already has a Bacula label. The +There are two ways to relabel a volume that already has a \mbacula{} label. The brute force method is to write an end of file mark on the tape using the -system {\bf mt} program, something like the following: +system {\bf mt} program, something like the following: -\footnotesize -\begin{verbatim} +%%%\footnotesize +\begin{lstlisting} mt -f /dev/st0 rewind mt -f /dev/st0 weof -\end{verbatim} +\end{lstlisting} \normalsize For a disk volume, you would manually delete the Volume. Then you use the {\bf label} command to add a new label. However, this could -leave traces of the old volume in the catalog. +leave traces of the old volume in the catalog. The preferable method to relabel a Volume is to first {\bf purge} the volume, either automatically, or explicitly with the {\bf purge} command, then use -the {\bf relabel} command described below. +the {\bf relabel} command described below. If your autochanger has barcode labels, you can label all the Volumes in your autochanger one after another by using the {\bf label barcodes} -command. For each tape in the changer containing a barcode, Bacula will +command. For each tape in the changer containing a barcode, \mbacula{} will mount the tape and then label it with the same name as the barcode. An appropriate Media record will also be created in the catalog. Any barcode that begins with the same characters as specified on the @@ -574,23 +562,23 @@ that begins with the same characters as specified on the treated as a cleaning tape, and will not be labeled. However, an entry for the cleaning tape will be created in the catalog. For example with: -\footnotesize -\begin{verbatim} +%%%\footnotesize +\begin{lstlisting} Pool { Name ... Cleaning Prefix = "CLN" } - -\end{verbatim} + +\end{lstlisting} \normalsize Any slot containing a barcode of CLNxxxx will be treated as a cleaning tape and will not be mounted. Note, the full form of the command is: -\footnotesize -\begin{verbatim} +%%%\footnotesize +\begin{lstlisting} label storage=xxx pool=yyy slots=1-5,10 barcodes -\end{verbatim} +\end{lstlisting} \normalsize \item [list] @@ -598,56 +586,56 @@ label storage=xxx pool=yyy slots=1-5,10 barcodes The list command lists the requested contents of the Catalog. The various fields of each record are listed on a single line. The various forms of the list command are: -\footnotesize -\begin{verbatim} +%%%\footnotesize +\begin{lstlisting} list jobs - + list jobid= (list jobid id) list ujobid= (list job with unique name) - + 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 joblog jobid= (list job output if recorded in the catalog) list jobmedia - + list jobmedia jobid= - + list jobmedia job= - + list files jobid= - + list files job= - + list pools - + list clients - + list jobtotals - + list volumes - + list volumes jobid= - + list volumes pool= - + list volumes job= - - list volume= + + list volume= list nextvolume job= - + list nextvol job= list nextvol job= days=nnn -\end{verbatim} +\end{lstlisting} \normalsize What most of the above commands do should be more or less obvious. In @@ -662,7 +650,7 @@ label 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. By default, the job specified must run within the + 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, @@ -676,25 +664,25 @@ label storage=xxx pool=yyy slots=1-5,10 barcodes command. As an example, the command {\bf list pools} might produce the following - output: + output: -\footnotesize -\begin{verbatim} +%%%\footnotesize +\begin{lstlisting} +------+---------+---------+---------+----------+-------------+ | PoId | Name | NumVols | MaxVols | PoolType | LabelFormat | +------+---------+---------+---------+----------+-------------+ | 1 | Default | 0 | 0 | Backup | * | | 2 | Recycle | 0 | 8 | Backup | File | +------+---------+---------+---------+----------+-------------+ -\end{verbatim} +\end{lstlisting} \normalsize As mentioned above, the {\bf list} command lists what is in the - database. Some things are put into the database immediately when Bacula + database. Some things are put into the database immediately when \mbacula{} starts up, but in general, most things are put in only when they are first used, which is the case for a Client as with Job records, etc. - Bacula should create a client record in the database the first time you + \mbacula{} should create a client record in the database the first time you run a job for that client. Doing a {\bf status} will not cause a database record to be created. The client database record will be created whether or not the job fails, but it must at least start. When @@ -716,8 +704,8 @@ label storage=xxx pool=yyy slots=1-5,10 barcodes If instead of the {\bf list pools} as in the example above, you enter {\bf llist pools} you might get the following output: -\footnotesize -\begin{verbatim} +%%%\footnotesize +\begin{lstlisting} PoolId: 1 Name: Default NumVols: 0 @@ -749,8 +737,8 @@ label storage=xxx pool=yyy slots=1-5,10 barcodes Recycle: 1 PoolType: Backup LabelFormat: File - -\end{verbatim} + +\end{lstlisting} \normalsize \item [messages] @@ -760,29 +748,32 @@ label storage=xxx pool=yyy slots=1-5,10 barcodes \item [memory] \index[general]{memory} Print current memory usage. - + \item [mount] \index[general]{mount} - The mount command is used to get Bacula to read a volume on a physical - device. It is a way to tell Bacula that you have mounted a tape and - that Bacula should examine the tape. This command is normally - used only after there was no Volume in a drive and Bacula requests you to mount a new + The mount command is used to get \mbacula{} to read a volume on a physical + device. It is a way to tell \mbacula{} that you have mounted a tape and + that \mbacula{} should examine the tape. This command is normally + used only after there was no Volume in a drive and \mbacula{} requests you to mount a new Volume or when you have specifically unmounted a Volume with the {\bf - unmount} console command, which causes Bacula to close the drive. If - you have an autoloader, the mount command will not cause Bacula to + unmount} console command, which causes \mbacula{} to close the drive. If + you have an autoloader, the mount command will not cause \mbacula{} to operate the autoloader unless you specify a {\bf slot} and possibly a {\bf drive}. The various forms of the mount command are: +\begin{lstlisting} +mount storage= [ slot= ] [ + drive= ] +\end{lstlisting} -mount storage=\lt{}storage-name\gt{} [ slot=\lt{}num\gt{} ] [ - drive=\lt{}num\gt{} ] - -mount [ jobid=\lt{}id\gt{} | job=\lt{}job-name\gt{} ] +\begin{lstlisting} +mount [ jobid= | job= ] +\end{lstlisting} If you have specified {\bf Automatic Mount = yes} in the Storage daemon's - Device resource, under most circumstances, Bacula will automatically access + Device resource, under most circumstances, \mbacula{} will automatically access the Volume unless you have explicitly {\bf unmount}ed it in the Console - program. + program. \label{ManualPruning} \item [prune] @@ -794,10 +785,10 @@ mount [ jobid=\lt{}id\gt{} | job=\lt{}job-name\gt{} ] Prune expired File entries from Job records; you can Prune expired Job records from the database, and you can Prune both expired Job and File records from specified Volumes. - -prune files|jobs|volume|stats client=\lt{}client-name\gt{} -volume=\lt{}volume-name\gt{} - +\begin{lstlisting} +prune files|jobs|volume|stats client= +volume= +\end{lstlisting} For a Volume to be pruned, the {\bf VolStatus} must be Full, Used, or Append, otherwise the pruning will not take place. @@ -810,26 +801,28 @@ volume=\lt{}volume-name\gt{} records associated with current backups of files, and we recommend that you do not use it unless you know what you are doing. The permitted forms of {\bf purge} are: - -purge files jobid=\lt{}jobid\gt{}|job=\lt{}job-name\gt{}|client=\lt{}client-name\gt{} - -purge jobs client=\lt{}client-name\gt{} (of all jobs) - -purge volume|volume=\lt{}vol-name\gt{} (of all jobs) - +\begin{lstlisting} +purge files jobid=|job=|client= +\end{lstlisting} +\begin{lstlisting} +purge jobs client= (of all jobs) +\end{lstlisting} +\begin{lstlisting} +purge volume|volume= (of all jobs) +\end{lstlisting} For the {\bf purge} command to work on Volume Catalog database records the -{\bf VolStatus} must be Append, Full, Used, or Error. +{\bf VolStatus} must be Append, Full, Used, or Error. The actual data written to the Volume will be unaffected by this command unless you are using the \texttt{ActionOnPurge=Truncate} option on those Media. -To ask Bacula to truncate your \texttt{Purged} volumes, you need to use the +To ask \mbacula{} to truncate your \texttt{Purged} volumes, you need to use the following command in interactive mode or in a RunScript: -\begin{verbatim} +\begin{lstlisting} *purge volume action=truncate storage=File allpools # or by default, action=all *purge volume action storage=File pool=Default -\end{verbatim} +\end{lstlisting} This is possible to specify the volume name, the media type, the pool, the storage, etc\dots (see \texttt{help purge}) Be sure that your storage device is @@ -845,21 +838,21 @@ python restart This can be helpful for testing because once the Director starts and the Python interpreter is initialized, there is no other way to make it accept any changes to the startup script {\bf DirStartUp.py}. For more - details on Python scripting, please see the \ilink{Python - Scripting}{PythonChapter} chapter of this manual. + details on Python scripting, please see the \bsysxrlink{Python Scripting} + {PythonChapter}{misc}{chapter} of the \miscman{}. \item [query] \index[general]{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 + 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 the file, and possibly enter one or more parameters, then the command is - submitted to the Catalog database SQL engine. + submitted to the Catalog database SQL engine. -The following queries are currently available (version 2.2.7): +The following queries are currently available (version 2.2.7): -\footnotesize -\begin{verbatim} +%%%\footnotesize +\begin{lstlisting} Available queries: 1: List up to 20 places where a File is saved regardless of the directory 2: List where the most recent copies of a file are saved @@ -878,7 +871,7 @@ Available queries: 15: List Volumes Bacula thinks are in changer 16: List Volumes likely to need replacement from age or errors Choose a query (1-16): -\end{verbatim} +\end{lstlisting} \normalsize \item [quit] @@ -887,17 +880,16 @@ Choose a query (1-16): {\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 may take some time. You may quit immediately by issuing the {\bf .quit} - command (i.e. quit preceded by a period). + command (i.e. quit preceded by a period). \item [relabel] - \index[general]{relabel} \index[general]{relabel} This command is used to label physical volumes. The full form of this command is: - -relabel storage=\lt{}storage-name\gt{} oldvolume=\lt{}old-volume-name\gt{} - volume=\lt{}newvolume-name\gt{} - +\begin{lstlisting} +relabel storage= oldvolume= + volume= +\end{lstlisting} If you leave out any part, you will be prompted for it. In order for the Volume (old-volume-name) to be relabeled, it must be in the catalog, and the volume status must be marked {\bf Purged} or {\bf Recycle}. @@ -912,40 +904,40 @@ relabel storage=\lt{}storage-name\gt{} oldvolume=\lt{}old-volume-name\gt{} This command is used to cause the Storage daemon to rewind (release) the current tape in the drive, and to re-read the Volume label the next time the tape is used. - -release storage=\lt{}storage-name\gt{} - - After a release command, the device is still kept open by Bacula (unless +\begin{lstlisting} +release storage= +\end{lstlisting} + After a release command, the device is still kept open by \mbacula{} (unless Always Open is set to No in the Storage Daemon's configuration) so it cannot be used by another program. However, with some tape drives, the operator can remove the current tape and to insert a different one, and - when the next Job starts, Bacula will know to re-read the tape label to + when the next Job starts, \mbacula{} will know to re-read the tape label to find out what tape is mounted. If you want to be able to use the drive with another program (e.g. {\bf mt}), you must use the {\bf unmount} - command to cause Bacula to completely release (close) the device. + command to cause \mbacula{} to completely release (close) the device. \item [reload] \index[general]{reload} The reload command causes the Director to re-read its configuration - file and apply the new values. The new values will take effect + file and apply the new values. The new values will take effect immediately for all new jobs. However, if you change schedules, be aware that the scheduler pre-schedules jobs up to two hours in advance, so any changes that are to take place during the next two hours may be delayed. Jobs that have already been scheduled to run (i.e. surpassed their requested start time) will continue with the old values. New jobs will use the new values. Each time you issue - a reload command while jobs are running, the prior config values + a reload command while jobs are running, the prior config values will queued until all jobs that were running before issuing the reload terminate, at which time the old config values will be released from memory. The Directory permits keeping up to ten prior set of configurations before it will refuse a reload command. Once at least one old set of config values has been - released it will again accept new reload commands. + released it will again accept new reload commands. While it is possible to reload the Director's configuration on the fly, even while jobs are executing, this is a complex operation and not without side effects. Accordingly, if you have to reload the Director's - configuration while Bacula is running, it is advisable to restart the + configuration while \mbacula{} is running, it is advisable to restart the Director at the next convenient opportunity. \label{restore_command} @@ -953,24 +945,21 @@ release storage=\lt{}storage-name\gt{} \index[general]{restore} The restore command allows you to select one or more Jobs (JobIds) to be restored using various methods. Once the JobIds are selected, the File - records for those Jobs are placed in an internal Bacula directory tree, + records for those Jobs are placed in an internal \mbacula{} directory tree, and the restore enters a file selection mode that allows you to interactively walk up and down the file tree selecting individual files to be restored. This mode is somewhat similar to the standard Unix {\bf restore} program's interactive file selection mode. - -restore storage=\lt{}storage-name\gt{} client=\lt{}backup-client-name\gt{} - where=\lt{}path\gt{} pool=\lt{}pool-name\gt{} fileset=\lt{}fileset-name\gt{} - restoreclient=\lt{}restore-client-name\gt{} - select current all done - +\begin{lstlisting} +restore storage= client= where= pool= fileset= restoreclient= select current all done +\end{lstlisting} Where {\bf current}, if specified, tells the restore command to automatically select a restore to the most current backup. If not specified, you will be prompted. The {\bf all} specification tells the restore command to restore all files. If it is not specified, you will be prompted for the files to restore. For details of the {\bf restore} - command, please see the \ilink{Restore Chapter}{RestoreChapter} of this - manual. + command, please see the \bsysxrlink{Restore}{RestoreChapter}{main}{chapter} + of the \mainman{}. The client keyword initially specifies the client from which the backup was made and the client to which the restore will be make. However, @@ -981,22 +970,22 @@ restore storage=\lt{}storage-name\gt{} client=\lt{}backup-client-name\gt{} \index[general]{run} This command allows you to schedule jobs to be run immediately. The full form of the command is: - -run job=\lt{}job-name\gt{} client=\lt{}client-name\gt{} - fileset=\lt{}FileSet-name\gt{} level=\lt{}level-keyword\gt{} - storage=\lt{}storage-name\gt{} where=\lt{}directory-prefix\gt{} - when=\lt{}universal-time-specification\gt{} spooldata=yes|no yes - +\begin{lstlisting} +run job= client= + fileset= level= + storage= where= + when= spooldata=yes|no yes +\end{lstlisting} Any information that is needed but not specified will be listed for selection, and before starting the job, you will be prompted to accept, reject, or modify the parameters of the job to be run, unless you have specified {\bf yes}, in which case the job will be immediately sent to the scheduler. - On my system, when I enter a run command, I get the following prompt: + On my system, when I enter a run command, I get the following prompt: -\footnotesize -\begin{verbatim} +%%%\footnotesize +\begin{lstlisting} A job name must be specified. The defined Job resources are: 1: Matou @@ -1009,14 +998,14 @@ The defined Job resources are: 8: RufusVerify 9: Watchdog Select Job resource (1-9): - -\end{verbatim} + +\end{lstlisting} \normalsize -If I then select number 5, I am prompted with: +If I then select number 5, I am prompted with: -\footnotesize -\begin{verbatim} +%%%\footnotesize +\begin{lstlisting} Run Backup job JobName: Minou FileSet: Minou Full Set @@ -1026,15 +1015,15 @@ Storage: DLTDrive Pool: Default When: 2003-04-23 17:08:18 OK to run? (yes/mod/no): - -\end{verbatim} + +\end{lstlisting} \normalsize If I now enter {\bf yes}, the Job will be run. If I enter {\bf mod}, I will -be presented with the following prompt. +be presented with the following prompt. -\footnotesize -\begin{verbatim} +%%%\footnotesize +\begin{lstlisting} Parameters to modify: 1: Level 2: Storage @@ -1044,37 +1033,36 @@ Parameters to modify: 6: When 7: Pool Select parameter to modify (1-7): - -\end{verbatim} + +\end{lstlisting} \normalsize If you wish to start a job at a later time, you can do so by setting the When time. Use the {\bf mod} option and select {\bf When} (no. 6). Then enter the -desired start time in YYYY-MM-DD HH:MM:SS format. +desired start time in \texttt{YYYY-MM-DD HH:MM:SS} format. The spooldata argument of the run command cannot be modified through the menu and is only accessible by setting its value on the intial command line. If no spooldata flag is set, the job, storage or schedule flag is used. -\item[setbandwidth] +\item[setbandwidth] \index[general]{setbandwidth} This command is used to limit the bandwidth of a running job or a client. - +\begin{lstlisting} setbandwidth limit= [ jobid= | client= ] - +\end{lstlisting} \item [setdebug] \index[general]{setdebug} - \index[general]{setdebug} - \index[general]{debugging} - \index[general]{debugging Win32} + \index[general]{Debugging} + \index[general]{Debugging Win32} \index[general]{Windows!debugging} This command is used to set the debug level in each daemon. The form of this command is: - -setdebug level=nn [trace=0/1 client=\lt{}client-name\gt{} | dir | director | - storage=\lt{}storage-name\gt{} | all] - - If trace=1 is set, then tracing will be enabled, and the daemon will be +\begin{lstlisting} +setdebug level=nn [trace=0/1 client= | dir | director | + storage= | all] +\end{lstlisting} + If \texttt{trace=1} is set, then tracing will be enabled, and the daemon will be placed in trace mode, which means that all debug output as set by the debug level will be directed to the file {\bf bacula.trace} in the current directory of the daemon. Normally, tracing is needed only for @@ -1099,11 +1087,10 @@ setdebug level=nn [trace=0/1 client=\lt{}client-name\gt{} | dir | director | \item [show] - \index[general]{show} \index[general]{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. + 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. @@ -1139,10 +1126,10 @@ setdebug level=nn [trace=0/1 client=\lt{}client-name\gt{} | dir | director | will have drive status or autochanger content. The File Daemon will give you information about current jobs like average speed or file accounting. The full form of this command is: - -status [all | dir=\lt{}dir-name\gt{} | director [days=nnn] | - client=\lt{}client-name\gt{} | [slots] storage=\lt{}storage-name\gt{}] - +\begin{lstlisting} +status [all | dir= | director [days=nnn] | + client= | [slots] storage=] +\end{lstlisting} 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 hours, and a listing of the last ten terminated jobs with their statuses. @@ -1158,14 +1145,14 @@ status [all | dir=\lt{}dir-name\gt{} | director [days=nnn] | information: -\footnotesize -\begin{verbatim} +%%%\footnotesize +\begin{lstlisting} 2507 Catalog MatouVerify.2004-03-13_05.05.02 is waiting execution 5349 Full CatalogBackup.2004-03-13_01.10.00 is waiting for higher priority jobs to finish 5348 Differe Minou.2004-03-13_01.05.09 is waiting on max Storage jobs 5343 Full Rufus.2004-03-13_01.05.04 is running -\end{verbatim} +\end{lstlisting} \normalsize Looking at the above listing from bottom to top, obviously JobId 5343 @@ -1187,12 +1174,12 @@ status [all | dir=\lt{}dir-name\gt{} | director [days=nnn] | 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 + 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} + {\bf \texttt{status storage=xxx}}. For example, on an idle test system, when + I do {\bf \texttt{status storage=File}}, I get: +%%%\footnotesize +\begin{lstlisting} status storage=File Connecting to Storage daemon File at 192.168.68.112:8103 @@ -1207,7 +1194,7 @@ Jobs waiting to reserve a drive: ==== Terminated Jobs: - JobId Level Files Bytes Status Finished Name + JobId Level Files Bytes Status Finished Name ====================================================================== 59 Full 234 4,417,599 OK 15-Jan-06 11:54 kernsave ==== @@ -1227,7 +1214,7 @@ Device "File" (/tmp) is not open. In Use Volume status: ==== -\end{verbatim} +\end{lstlisting} \normalsize Now, what this tells me is that no jobs are running and that none of @@ -1236,8 +1223,8 @@ 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} +%%%\footnotesize +\begin{lstlisting} status storage=File ... Device status: @@ -1252,14 +1239,14 @@ Device "File" (/tmp) is not open. Device is BLOCKED waiting for media. ==== ... -\end{verbatim} +\end{lstlisting} \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. +media -- that is \mbacula{} needs you to label a Volume. \item [time] \index[general]{time} @@ -1270,28 +1257,28 @@ media -- that is Bacula needs you to label a Volume. Turn on/off trace to file. \item [umount] - \index[general]{umount} + \index[general]{umount|see{unmount}} For old-time Unix guys. See the unmount command for full details. \item [unmount] \index[general]{unmount} - This command causes the indicated Bacula Storage daemon to unmount the + This command causes the indicated \mbacula{} Storage daemon to unmount the specified device. The forms of the command are the same as the mount command: -\footnotesize -\begin{verbatim} +%%%\footnotesize +\begin{lstlisting} unmount storage= [ drive= ] unmount [ jobid= | job= ] -\end{verbatim} +\end{lstlisting} \normalsize - Once you unmount a storage device, Bacula will no longer be able to use - it until you issue a mount command for that device. If Bacula needs to + Once you unmount a storage device, \mbacula{} will no longer be able to use + it until you issue a mount command for that device. If \mbacula{} needs to access that device, it will block and issue mount requests periodically to the operator. If the device you are unmounting is an autochanger, it will unload - the drive you have specified on the command line. If no drive is + the drive you have specified on the command line. If no drive is specified, it will assume drive 1. \label{UpdateCommand} @@ -1302,19 +1289,19 @@ unmount [ jobid= | job= ] of updating a Pool record, the new information will be automatically taken from the corresponding Director's configuration resource record. It can be used to increase the maximum number of volumes permitted or to set a maximum - number of volumes. The following main keywords may be specified: -\footnotesize -\begin{verbatim} + number of volumes. The following main keywords may be specified: +%%%\footnotesize +\begin{lstlisting} media, volume, pool, slots, stats -\end{verbatim} +\end{lstlisting} \normalsize In the case of updating a Volume, you will be prompted for which value you -wish to change. The following Volume parameters may be changed: +wish to change. The following Volume parameters may be changed: + +%%%\footnotesize +\begin{lstlisting} -\footnotesize -\begin{verbatim} - Volume Status Volume Retention Period Volume Use Duration @@ -1330,11 +1317,11 @@ wish to change. The following Volume parameters may be changed: Volume from Pool All Volumes from Pool All Volumes from all Pools - -\end{verbatim} + +\end{lstlisting} \normalsize - For slots {\bf update slots}, Bacula will obtain a list of slots and + For slots {\bf update slots}, \mbacula{} will obtain a list of slots and their barcodes from the Storage daemon, and for each barcode found, it will automatically update the slot in the catalog Media record to correspond to the new value. This is very useful if you have moved @@ -1343,32 +1330,32 @@ wish to change. The following Volume parameters may be changed: InChanger flag for that Volume will also be set, and any other Volumes 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 + \mbacula{} to know what magazine (tape holder) is currently in the autochanger. If you do not have barcodes, you can accomplish the same thing in version 1.33 and later by using the {\bf update slots scan} command. - The {\bf scan} keyword tells Bacula to physically mount each tape and to + The {\bf scan} keyword tells \mbacula{} to physically mount each tape and to read its VolumeName. - For Pool {\bf update pool}, Bacula will move the Volume record from its + For Pool {\bf update pool}, \mbacula{} will move the Volume record from its existing pool to the pool specified. For {\bf Volume from Pool}, {\bf All Volumes from Pool} and {\bf All Volumes from all Pools}, the following values are updated from the Pool record: Recycle, RecyclePool, VolRetention, VolUseDuration, MaxVolJobs, MaxVolFiles, - and MaxVolBytes. (RecyclePool feature is available with bacula 2.1.4 or + and MaxVolBytes. (RecyclePool feature is available with \mbacula{} 2.1.4 or higher.) The full form of the update command with all command line arguments is: -\footnotesize -\begin{verbatim} +%%%\footnotesize +\begin{lstlisting} update volume=xxx pool=yyy slots volstatus=xxx VolRetention=ddd VolUse=ddd MaxVolJobs=nnn MaxVolBytes=nnn Recycle=yes|no slot=nnn enabled=n recyclepool=zzz - -\end{verbatim} + +\end{lstlisting} \normalsize \item [use] @@ -1376,12 +1363,12 @@ wish to change. The following Volume parameters may be changed: 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 -to switch from one to another. +to switch from one to another. -\footnotesize -\begin{verbatim} +%%%\footnotesize +\begin{lstlisting} use [catalog=name-of-catalog] -\end{verbatim} +\end{lstlisting} \normalsize @@ -1391,25 +1378,25 @@ to switch from one to another. 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 - difference between the {\bf var} command and the actual LabelFormat process + difference between the {\bf var} command and the actual LabelFormat process is that during the var command, no job is running so "dummy" values are used in place of Job specific variables. Generally, however, you will get a - good idea of what is going to happen in the real case. + good idea of what is going to happen in the real case. \item [version] \index[general]{version} - The command prints the Director's version. + The command prints the Director's version. \item [wait] \index[general]{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 + testing where you wish to start a job and wait until that job completes before continuing. This command now has the following options: -\footnotesize -\begin{verbatim} +%%%\footnotesize +\begin{lstlisting} wait [jobid=nn] [jobuid=unique id] [job=job name] -\end{verbatim} +\end{lstlisting} \normalsize If specified with a specific JobId, ... the wait command will wait for that particular job to terminate before continuing. @@ -1418,17 +1405,18 @@ to switch from one to another. \label{dotcommands} \section{Special dot Commands} -\index[general]{Commands!Special dot} -\index[general]{Special dot Commands} +\index[general]{Commands!Special dot (.)} +\index[general]{Special dot (.) Commands} +\index[general]{. commands} There is a list of commands that are prefixed with a period (.). These commands are intended to be used either by batch programs or graphical user interface front-ends. They are not normally used by interactive users. Once GUI development begins, this list will be considerably expanded. The following -is the list of dot commands: +is the list of dot commands: -\footnotesize -\begin{verbatim} +%%%\footnotesize +\begin{lstlisting} .backups job=xxx list backups for specified job .clients list all client names .defaults client=xxx fileset=yyy list defaults for specified client @@ -1447,89 +1435,90 @@ is the list of dot commands: .status get status output .storage return storage resource names .types list job types -\end{verbatim} +\end{lstlisting} \normalsize \label{atcommands} \section{Special At (@) Commands} -\index[general]{Commands!Special At @} -\index[general]{Special At (@) Commands} +\index[general]{Commands!Special At (\symbol{64})} +\index[general]{Special At (\symbol{64}) Commands} +\index[general]{\symbol{64} commands} Normally, all commands entered to the Console program are immediately forwarded to the Director, which may be on another machine, to be executed. However, there is a small list of {\bf at} commands, all beginning with an at character (@), that will not be sent to the Director, but rather interpreted by the Console program directly. Note, these commands are implemented only in -the tty console program and not in the Bat Console. These commands are: +the tty console program and not in the Bat Console. These commands are: \begin{description} \item [@input \lt{}filename\gt{}] - \index[general]{@input \lt{}filename\gt{}} - Read and execute the commands contained in the file specified. + \index[general]{\symbol{64}input \lt{}filename\gt{}} + Read and execute the commands contained in the file specified. \item [@output \lt{}filename\gt{} w/a] - \index[general]{@output \lt{}filename\gt{} w/a} + \index[general]{\symbol{64}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. WARNING: be careful not to overwrite a valid file. A typical example during a -regression test might be: +regression test might be: -\footnotesize -\begin{verbatim} +%%%\footnotesize +\begin{lstlisting} @output /dev/null commands ... @output - -\end{verbatim} + +\end{lstlisting} \normalsize \item [@tee \lt{}filename\gt{} w/a] - \index[general]{@tee \lt{}filename\gt{} w/a} + \index[general]{\symbol{64}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. + turned off by specifying {\bf @tee} or {\bf @output} without a filename. \item [@sleep \lt{}seconds\gt{}] - \index[general]{@sleep \lt{}seconds\gt{}} - Sleep the specified number of seconds. + \index[general]{\symbol{64}sleep \lt{}seconds\gt{}} + Sleep the specified number of seconds. \item [@time] - \index[general]{@time} - Print the current time and date. + \index[general]{\symbol{64}time} + Print the current time and date. \item [@version] - \index[general]{@version} - Print the console's version. + \index[general]{\symbol{64}version} + Print the console's version. \item [@quit] - \index[general]{@quit} - quit + \index[general]{\symbol{64}quit} + quit \item [@exit] - \index[general]{@exit} - quit + \index[general]{\symbol{64}exit} + quite \item [@\# anything] \index[general]{anything} - Comment + Comment \item [@help] - \index[general]{@help} + \index[general]{\symbol{64}help} Get the list of every special @ commands. \item [@separator \lt{}char\gt{}] -\index[general]{@separator} +\index[general]{\symbol{64}separator} When using bconsole with readline, you can set the command separator to one of those characters to write commands who require multiple input on one line, or to put multiple commands on a single line. -\begin{verbatim} +\begin{lstlisting} !$%&'()*+,-/:;<>?[]^`{|}~ -\end{verbatim} +\end{lstlisting} Note, if you use a semicolon (;) as a separator character, which is - common, you will not be able to use the {\bf sql} command, which + common, you will not be able to use the {\bf sql} command, which requires each command to be terminated by a semicolon. \end{description} @@ -1541,38 +1530,38 @@ regression test might be: 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: +commands: -\footnotesize -\begin{verbatim} +%%%\footnotesize +\begin{lstlisting} ./bconsole -c ./bconsole.conf <