]> git.sur5r.net Git - bacula/docs/blobdiff - docs/manuals/en/console/bconsole.tex
Tweak SetIP command
[bacula/docs] / docs / manuals / en / console / bconsole.tex
index 008d12d8ca0fffb4ca455c3386c041c30da6670c..fee60ce72f92b661e11de5f27c8209a084f40ee0 100644 (file)
@@ -13,15 +13,10 @@ 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 GNOME GUI interface. Both permit the administrator or authorized
-users to interact with Bacula. 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. 
-
-In addition, there is a bwx-console built with wxWidgets that allows a graphic
-restore of files. As of version 1.34.1 it is in an early stage of development,
-but it already is quite useful. Unfortunately, it has not been enhanced for
-some time now.
+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
+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
@@ -38,14 +33,15 @@ indicates that the new tape is mounted.
 \index[general]{Console Configuration}
 \index[general]{Configuration!Console}
 
-When the Console starts, it reads a standard Bacula configuration file named
-{\bf bconsole.conf} or {\bf bgnome-console.conf} in the case of the GNOME
-Console version. 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. 
+When the Console starts, it reads a standard Bacula 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 
+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.
 
 \section{Running the Console Program}
 \index[general]{Running the Console Program}
@@ -61,19 +57,18 @@ Usage: bconsole [-s] [-c config_file] [-d debug_level]
        -dnn        set debug level to nn
        -n          no conio
        -s          no signals
+       -u <nn>     set command execution timeout to <nn> seconds
        -t          test - read configuration and exit
        -?          print this message.
 \end{verbatim}
 \normalsize
 
 
-After launching the Console program (bconsole), it will prompt you for the
-next command with an asterisk (*). (Note, in the GNOME version, the prompt is
-not present; you simply enter the commands you want in the command text box at
-the bottom of the screen.) Generally, for all commands, you can simply 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: 
+After launching the Console program (bconsole), it will prompt you for the next
+command with an asterisk (*).  Generally, for all commands, you can simply
+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}
@@ -309,9 +304,7 @@ The following commands are currently implemented:
    auto-display of messages on or off respectively.  The default for the
    console program is {\bf off}, which means that you will be notified when
    there are console messages pending, but they will not automatically be
-   displayed.  The default for the bgnome-console program is {\bf on}, which
-   means that messages will be displayed when they are received (usually
-   within five seconds of them being generated).
+   displayed.
 
    When autodisplay is turned off, you must explicitly retrieve the
    messages with the {\bf messages} command.  When autodisplay is turned
@@ -438,20 +431,23 @@ 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
+   line using \texttt{accurate=yes/no} or use the Job setting as default value.
 
    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:  
 
-
 \begin{verbatim}
-estimate job=<job-name> listing client=<client-name> 
+estimate job=<job-name> listing client=<client-name> accurate=<yes/no>
        fileset=<fileset-name> level=<level-name>  
 \end{verbatim}
 
-   Specification of the {\bf job} is sufficient, but you can also override
-   the client, fileset and/or level by specifying them on the estimate
+   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.
  
 
@@ -476,6 +472,16 @@ As an example, you might do:
    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.  
+
+\item [gui]
+   \index[general]{gui}
+   Invoke the non-interactive gui mode.
+\begin{verbatim}
+gui [on|off]
+\end{verbatim}
 
 \item [help]
    \index[general]{help}
@@ -746,6 +752,10 @@ label storage=xxx pool=yyy slots=1-5,10 barcodes
 \item [messages]
    \index[general]{messages}
    This command causes any pending  console messages to be immediately displayed.
+
+\item [memory]
+   \index[general]{memory}
+   Print current memory usage.
  
 
 \item [mount]
@@ -770,19 +780,6 @@ mount [ jobid=\lt{}id\gt{} |  job=\lt{}job-name\gt{} ]
    the Volume unless you have explicitly {\bf unmount}ed it in  the Console
    program. 
 
-\item[python]
-   \index[general]{python}
-  The python command takes a single argument {\bf restart}:
-
-python restart
-
-   This causes the Python interpreter in the Director to be reinitialized.
-   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.
-
 \label{ManualPruning}
 \item [prune]
    \index[general]{prune}
@@ -819,7 +816,74 @@ purge volume|volume=\lt{}vol-name\gt{} (of all jobs)
 For the {\bf purge} command to work on Volume Catalog database  records the
 {\bf VolStatus}  must be Append, Full, Used, or Error.  
 
-The actual data written to the Volume will be unaffected by  this command.  
+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
+following command in interactive mode or in a RunScript:
+\begin{verbatim}
+*purge volume action=truncate storage=File allpools
+# or by default, action=all
+*purge volume action storage=File pool=Default
+\end{verbatim}
+
+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
+idle when you decide to run this command.
+
+\item[python]
+   \index[general]{python}
+  The python command takes a single argument {\bf restart}:
+
+python restart
+
+   This causes the Python interpreter in the Director to be reinitialized.
+   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.
+
+\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 
+   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.  
+
+The following queries are currently available (version 2.2.7):  
+
+\footnotesize
+\begin{verbatim}
+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
+3: List last 20 Full Backups for a Client
+4: List all backups for a Client after a specified time
+5: List all backups for a Client
+6: List Volume Attributes for a selected Volume
+7: List Volumes used by selected JobId
+8: List Volumes to Restore All Files
+9: List Pool Attributes for a selected Pool
+10: List total files/bytes by Job
+11: List total files/bytes by Volume
+12: List Files for a selected JobId
+13: List Jobs stored on a selected MediaId
+14: List Jobs stored for a given Volume name
+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}
+\normalsize
+
+\item [quit]
+   \index[general]{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
+   may  take some time. You may quit immediately by issuing the  {\bf .quit}
+   command (i.e. quit preceded by a period).  
 
 \item [relabel]
    \index[general]{relabel}
@@ -917,7 +981,7 @@ restore storage=\lt{}storage-name\gt{} client=\lt{}backup-client-name\gt{}
 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{}  yes  
+  when=\lt{}universal-time-specification\gt{} spooldata=yes|no yes
 
    Any information that is needed but not specified will be listed for
    selection, and before starting the job, you will be prompted to accept,
@@ -982,7 +1046,11 @@ Select parameter to modify (1-7):
 
 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 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 [setdebug]
    \index[general]{setdebug}
@@ -1005,6 +1073,21 @@ setdebug level=nn [trace=0/1 client=\lt{}client-name\gt{} | dir | director |
    appended to the trace file.  You must explicitly delete the file when
    you are done.
 
+\item [setip]
+   \index[general]{setip}
+   Sets new client address -- if authorized.
+
+   A console is authorized to use the {\bf SetIP} command only if it has a
+   Console resource definition in both the Director and the Console.  In
+   addition, if the console name, provided on the {\bf Name =} directive,
+   must be the same as a Client name, the user of that console is permitted
+   to use the {\bf SetIP} command to change the Address directive in the
+   Director's client resource to the IP address of the Console.  This
+   permits portables or other machines using DHCP (non-fixed IP addresses)
+   to "notify" the Director of their current IP address.
+
+
+
 \item [show]
    \index[general]{show}
    \index[general]{show}
@@ -1168,6 +1251,18 @@ 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 [time]
+   \index[general]{time}
+   Prints the current time.
+
+\item [trace]
+   \index[general]{trace}
+   Turn on/off trace to file.
+
+\item [umount]
+   \index[general]{umount}
+   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
@@ -1290,51 +1385,6 @@ use \lt{}database-name\gt{}
    \index[general]{version}
    The command prints the Director's version.  
 
-\item [quit]
-   \index[general]{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
-   may  take some time. You may quit immediately by issuing the  {\bf .quit}
-   command (i.e. quit preceded by a period).  
-
-\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 
-   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.  
-
-The following queries are currently available (version 2.2.7):  
-
-\footnotesize
-\begin{verbatim}
-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
-3: List last 20 Full Backups for a Client
-4: List all backups for a Client after a specified time
-5: List all backups for a Client
-6: List Volume Attributes for a selected Volume
-7: List Volumes used by selected JobId
-8: List Volumes to Restore All Files
-9: List Pool Attributes for a selected Pool
-10: List total files/bytes by Job
-11: List total files/bytes by Volume
-12: List Files for a selected JobId
-13: List Jobs stored on a selected MediaId
-14: List Jobs stored for a given Volume name
-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}
-\normalsize
-
-\item [exit]
-   \index[general]{exit}
-   This command terminates the console program.  
-
 \item [wait]
    \index[general]{wait}
    The wait command causes the Director to pause  until there are no jobs
@@ -1396,7 +1446,7 @@ 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 GNOME Console. These commands are: 
+the tty console program and not in the Bat Console. These commands are: 
 
 \begin{description}
 
@@ -1449,10 +1499,27 @@ regression  test might be:
 \item [@\# anything]
    \index[general]{anything}
    Comment 
+
+\item [@help]
+   \index[general]{@help}
+   Get the list of every special @ commands.
+
+\item [@separator \lt{}char\gt{}]
+\index[general]{@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}
+  !$%&'()*+,-/:;<>?[]^`{|}~
+\end{verbatim}
+
+  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 
+  requires each command to be terminated by a semicolon.
+
 \end{description}
 
 \label{scripting}
-
 \section{Running the Console from a Shell Script}
 \index[general]{Script!Running the Console Program from a Shell}
 \index[general]{Running the Console Program from a Shell Script}
@@ -1519,9 +1586,9 @@ restore ran correctly, the output files are checked with:
 
 \footnotesize
 \begin{verbatim}
-grep "^Termination: *Backup OK" /tmp/log1.out
+grep "^ *Termination: *Backup OK" /tmp/log1.out
 backupstat=$?
-grep "^Termination: *Restore OK" /tmp/log2.out
+grep "^ *Termination: *Restore OK" /tmp/log2.out
 restorestat=$?
 \end{verbatim}
 \normalsize