]> git.sur5r.net Git - bacula/docs/blobdiff - docs/manual/console.tex
Update licenses
[bacula/docs] / docs / manual / console.tex
index 7c331d6dfb078823fd0daed9a98d8bf064a8e0cb..1417cb5d2adf4c9eea34d7eac25e082895f612e2 100644 (file)
@@ -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
@@ -121,9 +121,74 @@ 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. 
 
-There are three keywords used to refer to Jobs that must be clearly
-understood. They are the following:
+\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
@@ -131,25 +196,56 @@ understood. They are the following:
   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 [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 [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: 
@@ -223,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
@@ -257,6 +353,24 @@ delete Job JobId=n,m,o-r,t ...
    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]
    \index[console]{estimate}
@@ -387,7 +501,7 @@ the catalog. For example with:
         Pool {
           Name ...
           Cleaning Prefix = "CLN"
-        }
+       }
         
 \end{verbatim}
 \normalsize
@@ -813,10 +927,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]
@@ -892,6 +1007,85 @@ status [all | dir=\lt{}dir-name\gt{} | director |
    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
@@ -978,7 +1172,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
@@ -988,7 +1182,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
@@ -998,11 +1192,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
@@ -1010,7 +1204,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
@@ -1037,11 +1231,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 
@@ -1051,8 +1245,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
@@ -1086,8 +1280,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
@@ -1100,11 +1294,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.
@@ -1121,40 +1315,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}
 
@@ -1228,8 +1422,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