| 1 |
\chapter{Console Configuration} |
| 2 |
\label{blb:ConsoleConfChapter} |
| 3 |
\index[general]{Configuration!Console} |
| 4 |
\index[general]{Console Configuration} |
| 5 |
|
| 6 |
\section{General} |
| 7 |
\index[general]{General} |
| 8 |
|
| 9 |
The Console configuration file is the simplest of all the configuration files, |
| 10 |
and in general, you should not need to change it except for the password. It |
| 11 |
simply contains the information necessary to contact the Director or |
| 12 |
Directors. |
| 13 |
|
| 14 |
For a general discussion of the syntax of configuration files and their |
| 15 |
resources including the data types recognized by \bacula{}, please see |
| 16 |
the \bilink{Configuration}{blb:ConfigureChapter} chapter of this manual. |
| 17 |
|
| 18 |
The following Console Resource definition must be defined: |
| 19 |
|
| 20 |
\section{The Director Resource} |
| 21 |
\label{blb:DirectorResource3} |
| 22 |
\index[general]{Director Resource} |
| 23 |
\index[general]{Resource!Director} |
| 24 |
|
| 25 |
The Director resource defines the attributes of the Director running on the |
| 26 |
network. You may have multiple Director resource specifications in a single |
| 27 |
Console configuration file. If you have more than one, you will be prompted to |
| 28 |
choose one when you start the \textbf{Console} program. |
| 29 |
|
| 30 |
\begin{bdescription} |
| 31 |
\item [Director] |
| 32 |
\index[console]{Director} |
| 33 |
Start of the Director directives. |
| 34 |
|
| 35 |
\bwebdoc{Console:Director:Name} |
| 36 |
\item [Name = \bbracket{name}] |
| 37 |
\index[console]{Name} |
| 38 |
The director name used to select among different Directors, otherwise, this |
| 39 |
name is not used. |
| 40 |
|
| 41 |
\bwebdoc{Console:Director:DirPort} |
| 42 |
\item [DIRPort = \bbracket{port-number}] |
| 43 |
\index[dir]{DIRPort} |
| 44 |
Specify the port to use to connect to the Director. This value will most |
| 45 |
likely already be set to the value you specified on the {\bf\verb:--:with-baseport} |
| 46 |
option of the \btool{./configure} command. This port must be |
| 47 |
identical to the \textbf{DIRport} specified in the \textbf{Director} resource of |
| 48 |
the \bilink{Director's configuration}{blb:DirectorChapter} file. The |
| 49 |
default is 9101 so this directive is not normally specified. |
| 50 |
|
| 51 |
\bwebdoc{Console:Director:Address} |
| 52 |
\item [Address = \bbracket{address}] |
| 53 |
\index[dir]{Address} |
| 54 |
Where the address is a host name, a fully qualified domain name, or a network |
| 55 |
address used to connect to the Director. |
| 56 |
|
| 57 |
\bwebdoc{Console:Director:Password} |
| 58 |
\item [Password = \bbracket{password}] |
| 59 |
\index[dir]{Password} |
| 60 |
Where the password is the password needed for the Director to accept the |
| 61 |
Console connection. This password must be identical to the \textbf{Password} |
| 62 |
specified in the \textbf{Director} resource of the |
| 63 |
\bilink{Director's configuration}{blb:DirectorChapter} file. This |
| 64 |
directive is required. |
| 65 |
|
| 66 |
\bwebdoc{Console:Director:HistoryFile} |
| 67 |
\item [HistoryFile = \bbracket{filename}] |
| 68 |
\index[console]{HistoryFile} |
| 69 |
Where the filename will be used to store the console command history. By default, the history file |
| 70 |
is set to \texttt{\$HOME/.bconsole\_history} |
| 71 |
|
| 72 |
\bwebdoc{Console:Director:HistoryFileSize} |
| 73 |
\item [HistoryFileSize = \bbracket{number-of-lines}] |
| 74 |
\index[console]{HistoryFileSize} |
| 75 |
Specify the history file size in lines. The default value is 100. |
| 76 |
|
| 77 |
\input{ConsoleDirectorTls} |
| 78 |
\bwebdoc{Console:Director:End2} |
| 79 |
\end{bdescription} |
| 80 |
|
| 81 |
An actual example might be: |
| 82 |
|
| 83 |
\begin{bVerbatim} |
| 84 |
Director { |
| 85 |
Name = HeadMan |
| 86 |
address = rufus.cats.com |
| 87 |
password = xyz1erploit |
| 88 |
} |
| 89 |
\end{bVerbatim} |
| 90 |
|
| 91 |
\section{The ConsoleFont Resource} |
| 92 |
\index[general]{Resource!ConsoleFont} |
| 93 |
\index[general]{ConsoleFont Resource} |
| 94 |
|
| 95 |
The ConsoleFont resource is available only in the GNOME version of the |
| 96 |
console. It permits you to define the font that you want used to display in |
| 97 |
the main listing window. |
| 98 |
|
| 99 |
\begin{bdescription} |
| 100 |
|
| 101 |
\item [ConsoleFont] |
| 102 |
\index[console]{ConsoleFont} |
| 103 |
Start of the ConsoleFont directives. |
| 104 |
|
| 105 |
\item [Name = \bbracket{name}] |
| 106 |
\index[console]{Name} |
| 107 |
The name of the font. |
| 108 |
|
| 109 |
\item [Font = \bbracket{Pango Font Name}] |
| 110 |
\index[console]{Font} |
| 111 |
The string value given here defines the desired font. It is specified in the |
| 112 |
Pango format. For example, the default specification is: |
| 113 |
|
| 114 |
\begin{bVerbatim} |
| 115 |
Font = "LucidaTypewriter 9" |
| 116 |
\end{bVerbatim} |
| 117 |
|
| 118 |
\end{bdescription} |
| 119 |
|
| 120 |
Thanks to Phil Stracchino for providing the code for this feature. |
| 121 |
|
| 122 |
An different example might be: |
| 123 |
|
| 124 |
\begin{bVerbatim} |
| 125 |
ConsoleFont { |
| 126 |
Name = Default |
| 127 |
Font = "Monospace 10" |
| 128 |
} |
| 129 |
\end{bVerbatim} |
| 130 |
|
| 131 |
\section{The Console Resource} |
| 132 |
\label{blb:ConsoleResource} |
| 133 |
\index[general]{Console Resource} |
| 134 |
\index[general]{Resource!Console} |
| 135 |
|
| 136 |
There are three different kinds of consoles, which the administrator or |
| 137 |
user can use to interact with the Director. These three kinds of consoles |
| 138 |
comprise three different security levels. |
| 139 |
|
| 140 |
\begin{bitemize} |
| 141 |
\item The first console type is an \textbf{anonymous} or \textbf{default} |
| 142 |
console, which has full privileges. There is no console resource |
| 143 |
necessary for this type since the password is specified in the Director |
| 144 |
resource. Typically you would use this \textbf{anonymous} console |
| 145 |
only for administrators. |
| 146 |
|
| 147 |
\item The second type of console is a |
| 148 |
"named" or "restricted" console defined within a Console resource in |
| 149 |
both the Director's configuration file and in the Console's |
| 150 |
configuration file. Both the names and the passwords in these two |
| 151 |
entries must match much as is the case for Client programs. |
| 152 |
|
| 153 |
This second type of console begins with absolutely no privileges except |
| 154 |
those explicitly specified in the Director's Console resource. Note, |
| 155 |
the definition of what these restricted consoles can do is determined |
| 156 |
by the Director's conf file. |
| 157 |
|
| 158 |
Thus you may define within the Director's conf file multiple Consoles |
| 159 |
with different names and passwords, sort of like multiple users, each |
| 160 |
with different privileges. As a default, these consoles can do |
| 161 |
absolutely nothing -- no commands what so ever. You give them |
| 162 |
privileges or rather access to commands and resources by specifying |
| 163 |
access control lists in the Director's Console resource. This gives the |
| 164 |
administrator fine grained control over what particular consoles (or |
| 165 |
users) can do. |
| 166 |
|
| 167 |
\item The third type of console is similar to the above mentioned |
| 168 |
restricted console in that it requires a Console resource definition in |
| 169 |
both the Director and the Console. In addition, if the console name, |
| 170 |
provided on the \textbf{Name =} directive, is the same as a Client name, |
| 171 |
the user of that console is permitted to use the \bcommandname{SetIP} command to |
| 172 |
change the Address directive in the Director's client resource to the IP |
| 173 |
address of the Console. This permits portables or other machines using |
| 174 |
DHCP (non-fixed IP addresses) to "notify" the Director of their current |
| 175 |
IP address. |
| 176 |
|
| 177 |
\end{bitemize} |
| 178 |
|
| 179 |
The Console resource is optional and need not be specified. However, if it is |
| 180 |
specified, you can use ACLs (Access Control Lists) in the Director's |
| 181 |
configuration file to restrict the particular console (or user) to see only |
| 182 |
information pertaining to his jobs or client machine. |
| 183 |
|
| 184 |
You may specify as many Console resources in the console's conf file. If |
| 185 |
you do so, generally the first Console resource will be used. However, if |
| 186 |
you have multiple Director resources (i.e. you want to connect to different |
| 187 |
directors), you can bind one of your Console resources to a particular |
| 188 |
Director resource, and thus when you choose a particular Director, the |
| 189 |
appropriate Console configuration resource will be used. See the "Director" |
| 190 |
directive in the Console resource described below for more information. |
| 191 |
|
| 192 |
Note, the Console resource is optional, but can be useful for |
| 193 |
restricted consoles as noted above. |
| 194 |
|
| 195 |
\begin{bdescription} |
| 196 |
\item [Console] |
| 197 |
\index[console]{Console} |
| 198 |
Start of the Console resource. |
| 199 |
|
| 200 |
\bwebdoc{Console:Console:Name} |
| 201 |
\item [Name = \bbracket{name}] |
| 202 |
\index[console]{Name} |
| 203 |
The Console name used to allow a restricted console to change |
| 204 |
its IP address using the SetIP command. The SetIP command must |
| 205 |
also be defined in the Director's conf CommandACL list. |
| 206 |
|
| 207 |
\bwebdoc{Console:Console:Password} |
| 208 |
\item [Password = \bbracket{password}] |
| 209 |
\index[console]{Password} |
| 210 |
If this password is supplied, then the password specified in the |
| 211 |
Director resource of you Console conf will be ignored. See below |
| 212 |
for more details. |
| 213 |
|
| 214 |
\bwebdoc{Console:Console:Director} |
| 215 |
\item [Director = \bbracket{director-resource-name}] |
| 216 |
If this directive is specified, this Console resource will be |
| 217 |
used by bconsole when that particular director is selected |
| 218 |
when first starting bconsole. I.e. it binds a particular console |
| 219 |
resource with its name and password to a particular director. |
| 220 |
|
| 221 |
\bwebdoc{Console:Console:HeartbeatInterval} |
| 222 |
\item [Heartbeat Interval = \bbracket{time-interval}] |
| 223 |
\index[console]{Heartbeat Interval} |
| 224 |
\index[console]{Directive!Heartbeat} |
| 225 |
This directive is optional and if specified will cause the Console to |
| 226 |
set a keepalive interval (heartbeat) in seconds on each of the sockets |
| 227 |
to communicate with the Director. It is implemented only on systems |
| 228 |
(Linux, ...) that provide the \textbf{setsockopt} \texttt{TCP\_KEEPIDLE} function. |
| 229 |
The default value is \bdefaultvalue{zero}, which means no change is made to the socket. |
| 230 |
|
| 231 |
\bwebdoc{Console:Console:CommCompression} |
| 232 |
\item[CommCompression = \byesorno{}] |
| 233 |
\index[console]{CommCompression} |
| 234 |
\index[console]{Directive!CommCompression} |
| 235 |
\index[console]{Compression} |
| 236 |
|
| 237 |
If the two \bacula{} components (DIR, FD, SD, bconsole) have the comm line |
| 238 |
compression enabled, the line compression will be enabled. The default value |
| 239 |
is yes. |
| 240 |
|
| 241 |
In many cases, the volume of data transmitted across the communications line |
| 242 |
can be reduced by a factor of three when this directive is |
| 243 |
\bdefaultvalue{enabled}. In the case that the compression is not effective, |
| 244 |
\bacula{} turns it off on a record by record basis. \smallskip |
| 245 |
|
| 246 |
If you are backing up data that is already compressed the comm line compression |
| 247 |
will not be effective, and you are likely to end up with an average compression |
| 248 |
ratio that is very small. In this case, \bacula{} reports \bvalue{None} in the |
| 249 |
Job report. |
| 250 |
|
| 251 |
\input{ConsoleConsoleTls} |
| 252 |
\bwebdoc{Console:Console:End1} |
| 253 |
\end{bdescription} |
| 254 |
|
| 255 |
|
| 256 |
The following configuration files were supplied by Phil Stracchino. For |
| 257 |
example, if we define the following in the user's \bfilename{bconsole.conf} file (or |
| 258 |
perhaps the \bfilename{bwx-console.conf} file): |
| 259 |
|
| 260 |
\begin{bVerbatim} |
| 261 |
Director { |
| 262 |
Name = MyDirector |
| 263 |
DIRport = 9101 |
| 264 |
Address = myserver |
| 265 |
Password = "XXXXXXXXXXX" # no, really. this is not obfuscation. |
| 266 |
} |
| 267 |
|
| 268 |
|
| 269 |
Console { |
| 270 |
Name = restricted-user |
| 271 |
Password = "UntrustedUser" |
| 272 |
} |
| 273 |
\end{bVerbatim} |
| 274 |
|
| 275 |
Where the Password in the Director section is deliberately incorrect, and the |
| 276 |
Console resource is given a name, in this case \textbf{restricted-user}. Then |
| 277 |
in the Director's \bfilename{bacula-dir.conf} file (not directly accessible by the user), |
| 278 |
we define: |
| 279 |
|
| 280 |
\begin{bVerbatim} |
| 281 |
Console { |
| 282 |
Name = restricted-user |
| 283 |
Password = "UntrustedUser" |
| 284 |
JobACL = "Restricted Client Save" |
| 285 |
ClientACL = restricted-client |
| 286 |
StorageACL = main-storage |
| 287 |
ScheduleACL = *all* |
| 288 |
PoolACL = *all* |
| 289 |
FileSetACL = "Restricted Client's FileSet" |
| 290 |
CatalogACL = DefaultCatalog |
| 291 |
CommandACL = run |
| 292 |
} |
| 293 |
\end{bVerbatim} |
| 294 |
|
| 295 |
the user logging into the Director from his Console will get logged in as |
| 296 |
\textbf{restricted-user}, and he will only be able to see or access a Job with the |
| 297 |
name \textbf{Restricted Client Save} a Client with the name |
| 298 |
\textbf{restricted-client}, a Storage device \textbf{main-storage}, any Schedule or Pool, |
| 299 |
a FileSet named \textbf{Restricted Client's FileSet}, a Catalog named |
| 300 |
\textbf{DefaultCatalog}, and the only command he can use in the Console is the |
| 301 |
\bcommandname{run} command. In other words, this user is rather limited in what he can see |
| 302 |
and do with Bacula. |
| 303 |
|
| 304 |
The following is an example of a bconsole conf file that can access |
| 305 |
several Directors and has different Consoles depending on the director: |
| 306 |
|
| 307 |
\begin{bVerbatim} |
| 308 |
Director { |
| 309 |
Name = MyDirector |
| 310 |
DIRport = 9101 |
| 311 |
Address = myserver |
| 312 |
Password = "XXXXXXXXXXX" # no, really. this is not obfuscation. |
| 313 |
} |
| 314 |
|
| 315 |
Director { |
| 316 |
Name = SecondDirector |
| 317 |
DIRport = 9101 |
| 318 |
Address = secondserver |
| 319 |
Password = "XXXXXXXXXXX" # no, really. this is not obfuscation. |
| 320 |
} |
| 321 |
|
| 322 |
Console { |
| 323 |
Name = restricted-user |
| 324 |
Password = "UntrustedUser" |
| 325 |
Director = MyDirector |
| 326 |
} |
| 327 |
|
| 328 |
Console { |
| 329 |
Name = restricted-user-2 |
| 330 |
Password = "A different UntrustedUser" |
| 331 |
Director = SecondDirector |
| 332 |
} |
| 333 |
\end{bVerbatim} |
| 334 |
|
| 335 |
The second Director referenced at "secondserver" might look |
| 336 |
like the following: |
| 337 |
|
| 338 |
\begin{bVerbatim} |
| 339 |
Console { |
| 340 |
Name = restricted-user-2 |
| 341 |
Password = "A different UntrustedUser" |
| 342 |
JobACL = "Restricted Client Save" |
| 343 |
ClientACL = restricted-client |
| 344 |
StorageACL = second-storage |
| 345 |
ScheduleACL = *all* |
| 346 |
PoolACL = *all* |
| 347 |
FileSetACL = "Restricted Client's FileSet" |
| 348 |
CatalogACL = RestrictedCatalog |
| 349 |
CommandACL = run, restore |
| 350 |
WhereACL = "/" |
| 351 |
} |
| 352 |
\end{bVerbatim} |
| 353 |
|
| 354 |
To use the same Console name on both Directors, you must create two |
| 355 |
\texttt{bconsole.conf} to store the two Director/Console groups. |
| 356 |
|
| 357 |
|
| 358 |
\section{Console Commands} |
| 359 |
\index[general]{Console Commands} |
| 360 |
\index[general]{Commands!Console} |
| 361 |
|
| 362 |
For more details on running the console and its commands, please see the |
| 363 |
\bxlink{Bacula Console}{blb:ConsoleChapter}{console}{chapter} of the \bconsoleman{}. |
| 364 |
|
| 365 |
\section{Sample Console Configuration File} |
| 366 |
\label{blb:SampleConfiguration2} |
| 367 |
\index[general]{File!Sample Console Configuration} |
| 368 |
\index[general]{Sample Console Configuration File} |
| 369 |
|
| 370 |
An example Console configuration file might be the following: |
| 371 |
|
| 372 |
\begin{bVerbatim} |
| 373 |
# |
| 374 |
# Bacula Console Configuration File |
| 375 |
# |
| 376 |
Director { |
| 377 |
Name = HeadMan |
| 378 |
address = "my_machine.my_domain.com" |
| 379 |
Password = Console_password |
| 380 |
} |
| 381 |
\end{bVerbatim} |