Subsections


Console Konfiguration

Allgemein

Die Console-Konfigurations-Datei ist die einfachste Konfigurations-Datei von allen. Normalerweise müßen Sie in dieser Datei nicht außer dem Passwort ändern. Diese Datei enthält alle Informationen die nötig sind, damit sich das Console-Programm zu dem Director-Dienst verbinden kann und darf.

Für eine allgemeine Übersicht der Syntax der Konfigurations-Dateien, sowie der verschiedenen Einträge, einschließlich der Datentypen, sehen Sie sich bitte das Kapitel Konfiguration an.

Die folgenden Console-Konfigurations-Parameter müssen definiert werden:


Der Director-Eintrag

Der Director-Eintrag enthält die notwendigen Parameter, um über das Console-Programm Zugriff auf den Director-Dienst zu haben. Sie können mehrere Director-Dienste in dieser Datei angeben, in dem Fall werden Sie beim starten der Console gefragt, zu welchem Director-Dienst Sie sich verbinden wollen.

Director
Beginn des Director-Eintrags.

Name = <name>
Der Name des Directors, wird nur zur Unterscheidung benutzt, wenn Sie mehrere Director-Dienste konfiguriert haben.

DIRPort = <port-number>
gibt den Port an, auf dem der Director-Dienst läuft. Wenn Sie die ./configure Option --with-base-port angegeben haben, wird dieser Wert schon entsprechend gesetzt sein. Der Port muß mit dem in der Director-Konfiguration angegebenen DIRport identisch sein. Standardmäßig wird der Port 9101 verwendet, so dass dieser Parameter normalerweise nicht gesetzt ist.

Address = <address>
die Adresse ist ein Rechnername, eine absolute Adresse (FQDN) oder die IP-Adresse auf der der Director-Dienst läuft.

Password = <password>
das Passwort, dass benutzt wird um die Console beim Director-Dienst zu autorisieren. Das Passwort muss mit dem in der Director-Konfiguration gesetzten Passwort identisch sein.

Ein Beispiel eines Director-Eintrags in der Console-Konfigurations-Datei:

Director {
  Name = HeadMan
  address = rufus.cats.com
  password = xyz1erploit
}

Der ConsoleFont-Eintrag

Der ConsoleFont-Konfigurations-Eintrag ist nur in der GNOME-Version des Console-Programms verfügbar. Er erlaubt Ihnen, die im Hauptfenster verwendete Schriftart auszuwählen.

ConsoleFont
Beginn des ConsoleFont-Eintrags.

Name = <name>
Der Name des ConsoleFont-Eintrags.

Font = <Pango Font Name>
Dieser Wert gibt den Namen der Schriftart im Pango-Format an. Ein Beispiel:

Font = "LucidaTypewriter 9"

Vielen Dank an Phil Stracchino der diese Funktion in Bacula implementiert hat.

Hier noch ein zweites Beispiel:

ConsoleFont {
  Name = Default
  Font = "Monospace 10"
}


Der Console-Eintrag

Seit der Bacula-Version 1.33 gibt es drei verschiedene Console-Typen, die der Administrator oder Benutzer zur Verwaltung des Director-Dienstes verwenden kann. Diese drei verschiedenen Typen umfassen drei unterschiedliche Sicherheitslevel.

Der Consolen-Konfigurations-Eintrag ist optional, wenn er angegeben wird, haben Sie allerdings die Möglichkeit, Zugriffskontrolllisten anzulegen, um die entsprechende Console in ihren Rechten einzuschränken. Damit können Sie z.B. dem Benutzer nur Zugriff auf die Backup-Jobs seines Clients erlauben.

Sie können beliebig viele Console-Einträge in Ihrer Consolen-Konfiguration anlegen. Im allgemeinen wird dann immer der erste Eintrag verwendet. Wenn Sie allerdings mehrere Director-Dienste, mit entsprechenden Einträgen in Ihrer Consolen-Konfiguration, haben, müssen Sie beim starten der Console einen der Director-Dienste auswählen. Lesen Sie bitte auch die Beschreibung des "Director"-Parameters in der Console-Konfiguration, der weiter unten beschrieben wird.

Console
Beginn des Console-Eintrags.

Name = <name>
Der Name der Console. Er wird benutzt um dieser Console in der Director-Konfiguration eine Zugriffskontrollliste zuzuweisen.

Password = <password>
Wenn Sie hier ein Passwort angegeben, wird das Passwort aus dem Director-Eintrag ignoriert. Weiter unten finden Sie dazu Details.

Director = <director-resource-name>
Falls dieser Parameter angegeben wird, kann dieser Consolen-Eintrag über ein Auswahlmenü beim ersten starten der Console selektiert werden. Er bestimmt dann, mit welchen Namen und Passwort sich das Console-Programm bei welchen Director-Dienst anmeldet.

Heartbeat Interval = <time-interval>
Dieser Parameter ist optional. Falls Sie ihn angeben, wird im Abstand des konfigurierten Intervalls (in Sekunden) ein keepalive zum Director-Dienst geschickt. Es ist nur auf Betriebssystemen implementiert, die die setsockopt TCP_KEEPIDLE unterstützen (Linux, ...). Der Standardwert ist null, d.h. es werden keine keepalives gesendet.

Ein Beispiel, wenn Sie folgendes in Ihrer Consolen-Konfigurations-Datei, bconsole.conf oder bwx-console.conf, definieren:

Director {
   Name = MyDirector
   DIRport = 9101
   Address = myserver
   Password = "XXXXXXXXXXX"    # das dient hier nicht der Unkenntlichmachung.
}

 
Console {
   Name = restricted-user
   Password = "UntrustedUser"
}

wobei das Passwort im Director-Konfigurations-Eintrag bewußt falsch gesetzt ist und der Consolen-Eintrag einen Name besitzt, hier restricted-user. Danach erstellen Sie in der Konfiguration des Director-Dienstes, auf die der Benutzer keinen Zugriff hat, folgende Consolen:

Console {
  Name = restricted-user
  Password = "UntrustedUser"
  JobACL = "Restricted Client Save"
  ClientACL = restricted-client
  StorageACL = main-storage
  ScheduleACL = *all*
  PoolACL = *all*
  FileSetACL = "Restricted Client's FileSet"
  CatalogACL = DefaultCatalog
  CommandACL = run
}

dann wird der Benutzer beim Anmelden an den Director-Dienst als restricted-user angemeldet. Der Benutzer wird nur Zugriff auf Jobs mit dem Namen Restricted Client Save, auf den Client restricted-client, auf den Storage main-storage, auf jeden Zeitplan (Schedule) und auf jeden Pool, ein FileSet namens Restricted Client's FileSet, den Katalog DefaultCatalog, sowie einzig und allein das Kommando run haben. Mit anderen Worten, dieser Benutzer ist sehr eingeschränkt in dem, was er mit der Console sehen und tun kann.

Das folgende Beispiel zeigt eine bconsole.conf-Datei, in der mehrere Director-Dienste, sowie verschiedene Consolen-Einträge, abhängig vom Director, zu sehen sind:

Director {
   Name = MyDirector
   DIRport = 9101
   Address = myserver
   Password = "XXXXXXXXXXX"    # das dient hier nicht der Unkenntlichmachung.
}

Director {
   Name = SecondDirector
   DIRport = 9101
   Address = secondserver
   Password = "XXXXXXXXXXX"    # das dient hier nicht der Unkenntlichmachung.
}

Console {
   Name = restricted-user
   Password = "UntrustedUser"
   Director = MyDirector
}

Console {
   Name = restricted-user
   Password = "A different UntrustedUser"
   Director = SecondDirector
}

Der zweite Director-Dienst, benannt als "secondserver", könnte diese Konfiguration besitzen:

Console {
  Name = restricted-user
  Password = "A different UntrustedUser"
  JobACL = "Restricted Client Save"
  ClientACL = restricted-client
  StorageACL = second-storage
  ScheduleACL = *all*
  PoolACL = *all*
  FileSetACL = "Restricted Client's FileSet"might
  CatalogACL = RestrictedCatalog
  CommandACL = run, restore
  WhereACL = "/"
}

Im Unterschied zum ersten Director-Dienst, darf der Benutzer hier, neben einem anderem Storage, auch das Consolen-Kommando restore ausführen (wobei er als Where allerdings nur "/" angeben darf).

Console-Kommandos

Für mehr Details zum arbeiten mit der Console und ihrer Kommandos, lesen Sie bitte das Kapitel Bacula Console in diesem Handbuch.


Beispiel Console-Konfigurations-Datei

Dies könnte ein Beispiel für eine Console-Konfigurations-Datei sein:

#
# Bacula Console Configuration File
#
Director {
  Name = HeadMan
  address = "my_machine.my_domain.com"
  Password = Console_password
}


Monitor Configuration

General

The Monitor configuration file is a stripped down version of the Director configuration file, mixed with a Console configuration file. It simply contains the information necessary to contact Directors, Clients, and Storage daemons you want to monitor.

For a general discussion of configuration file and resources including the data types recognized by Bacula, please see the Configuration chapter of this manual.

The following Monitor Resource definition must be defined:


The Monitor Resource

The Monitor resource defines the attributes of the Monitor running on the network. The parameters you define here must be configured as a Director resource in Clients and Storages configuration files, and as a Console resource in Directors configuration files.

Monitor
Start of the Monitor records.

Name = <name>
Specify the Director name used to connect to Client and Storage, and the Console name used to connect to Director. This record is required.

Password = <password>
Where the password is the password needed for Directors to accept the Console connection. This password must be identical to the Password specified in the Console resource of the Director's configuration file. This record is required if you wish to monitor Directors.

Refresh Interval = <time>
Specifies the time to wait between status requests to each daemon. It can't be set to less than 1 second, or more than 10 minutes, and the default value is 5 seconds.


The Director Resource

The Director resource defines the attributes of the Directors that are monitored by this Monitor.

As you are not permitted to define a Password in this resource, to avoid obtaining full Director privileges, you must create a Console resource in the Director's configuration file, using the Console Name and Password defined in the Monitor resource. To avoid security problems, you should configure this Console resource to allow access to no other daemons, and permit the use of only two commands: status and .status (see below for an example).

You may have multiple Director resource specifications in a single Monitor configuration file.

Director
Start of the Director records.

Name = <name>
The Director name used to identify the Director in the list of monitored daemons. It is not required to be the same as the one defined in the Director's configuration file. This record is required.

DIRPort = <port-number>
Specify the port to use to connect to the Director. This value will most likely already be set to the value you specified on the --with-base-port option of the ./configure command. This port must be identical to the DIRport specified in the Director resource of the Director's configuration file. The default is 9101 so this record is not normally specified.

Address = <address>
Where the address is a host name, a fully qualified domain name, or a network address used to connect to the Director. This record is required.


The Client Resource

The Client resource defines the attributes of the Clients that are monitored by this Monitor.

You must create a Director resource in the Client's configuration file, using the Director Name defined in the Monitor resource. To avoid security problems, you should set the Monitor directive to Yes in this Director resource.

You may have multiple Director resource specifications in a single Monitor configuration file.

Client (or FileDaemon)
Start of the Client records.

Name = <name>
The Client name used to identify the Director in the list of monitored daemons. It is not required to be the same as the one defined in the Client's configuration file. This record is required.

Address = <address>
Where the address is a host name, a fully qualified domain name, or a network address in dotted quad notation for a Bacula File daemon. This record is required.

FD Port = <port-number>
Where the port is a port number at which the Bacula File daemon can be contacted. The default is 9102.

Password = <password>
This is the password to be used when establishing a connection with the File services, so the Client configuration file on the machine to be backed up must have the same password defined for this Director. This record is required.


The Storage Resource

The Storage resource defines the attributes of the Storages that are monitored by this Monitor.

You must create a Director resource in the Storage's configuration file, using the Director Name defined in the Monitor resource. To avoid security problems, you should set the Monitor directive to Yes in this Director resource.

You may have multiple Director resource specifications in a single Monitor configuration file.

Storage
Start of the Storage records.

Name = <name>
The Storage name used to identify the Director in the list of monitored daemons. It is not required to be the same as the one defined in the Storage's configuration file. This record is required.

Address = <address>
Where the address is a host name, a fully qualified domain name, or a network address in dotted quad notation for a Bacula Storage daemon. This record is required.

SD Port = <port>
Where port is the port to use to contact the storage daemon for information and to start jobs. This same port number must appear in the Storage resource of the Storage daemon's configuration file. The default is 9103.

Password = <password>
This is the password to be used when establishing a connection with the Storage services. This same password also must appear in the Director resource of the Storage daemon's configuration file. This record is required.

Tray Monitor Security

There is no security problem in relaxing the permissions on tray-monitor.conf as long as FD, SD and DIR are configured properly, so the passwords contained in this file only gives access to the status of the daemons. It could be a security problem if you consider the status information as potentially dangereous (I don't think it is the case).

Concerning Director's configuration:
In tray-monitor.conf, the password in the Monitor resource must point to a restricted console in bacula-dir.conf (see the documentation). So, if you use this password with bconsole, you'll only have access to the status of the director (commands status and .status). It could be a security problem if there is a bug in the ACL code of the director.

Concerning File and Storage Daemons' configuration:
In tray-monitor.conf, the Name in the Monitor resource must point to a Director resource in bacula-fd/sd.conf, with the Monitor directive set to Yes (once again, see the documentation). It could be a security problem if there is a bug in the code which check if a command is valid for a Monitor (this is very unlikely as the code is pretty simple).


Sample Tray Monitor configuration

An example Tray Monitor configuration file might be the following:

#
# Bacula Tray Monitor Configuration File
#
Monitor {
  Name = rufus-mon        # password for Directors
  Password = "GN0uRo7PTUmlMbqrJ2Gr1p0fk0HQJTxwnFyE4WSST3MWZseR"
  RefreshInterval = 10 seconds
}
   
Client {
  Name = rufus-fd
  Address = rufus
  FDPort = 9102           # password for FileDaemon
  Password = "FYpq4yyI1y562EMS35bA0J0QC0M2L3t5cZObxT3XQxgxppTn"
}
Storage {
  Name = rufus-sd
  Address = rufus
  SDPort = 9103           # password for StorageDaemon
  Password = "9usxgc307dMbe7jbD16v0PXlhD64UVasIDD0DH2WAujcDsc6"
}
Director {
  Name = rufus-dir
  DIRport = 9101
  address = rufus
}

Sample File daemon's Director record.

Click here to see the full example.

#
# Restricted Director, used by tray-monitor to get the
#   status of the file daemon
#
Director {
  Name = rufus-mon
  Password = "FYpq4yyI1y562EMS35bA0J0QC0M2L3t5cZObxT3XQxgxppTn"
  Monitor = yes
}

Sample Storage daemon's Director record.

Click here to see the full example.

#
# Restricted Director, used by tray-monitor to get the
#   status of the storage daemon
#
Director {
  Name = rufus-mon
  Password = "9usxgc307dMbe7jbD16v0PXlhD64UVasIDD0DH2WAujcDsc6"
  Monitor = yes
}

Sample Director's Console record.

Click here to see the full example.

#
# Restricted console used by tray-monitor to get the status of the director
#
Console {
  Name = Monitor
  Password = "GN0uRo7PTUmlMbqrJ2Gr1p0fk0HQJTxwnFyE4WSST3MWZseR"
  CommandACL = status, .status
}

Kern Sibbald 2008-01-31