Bacula ist ein Satz von Computer-Programmen die es ermöglichen, Daten in einem heterogenen Netzwerk zu sichern, wiederherzustellen oder zu überprüfen. Technisch gesehen ist es ein netzwerkfähiges Datensicherungsprogramm mit Client/Server-Architektur.
Bacula unterstützt Linux-, Unix- und Windows-Backup-Clients, und eine Reihe von professionellen Backup-Geräte einschließlich Tape-Libraries. Administratoren und Betreiber können das System über eine Konsole, grafische Benutzeroberfläche oder Web-Schnittstelle konfigurieren. Als Backend werden MySQL, PostgreSQL oder SQLite für die Speicherung von Informationen verwendet.
Quelle: Wikipedia.
libdbi ermöglicht Anbindung von weiteren Backends wie Firebird oder FreeTDS (damit Anbindung an Microsoft SQL Server and Sybase)bpipe dient als Vorlage für eigene EntwicklungenTLS Authenticate = yes) hier findet aber keine Nutzdatenverschlüsselung stattbacula-director-mysql), PostgreSQL (bacula-director-pgsql) und SQLite (bacula-director-sqlite / bacula-director-sqlite3 )bacula-console,bacula-console-gnome, bacula-console-qt oder bacula-console-wxDirector und Catalog gibts einmal, die anderen Komponenten lassen sich beliebig (oft) verteilen.
Siehe auch: Bacula Konfiguration
Wenn ein Job den Status „is waiting for an appendable Volume“ anzeigt, muss auf der Console der Befehl „label“ eingeben werden. Bacula schickt auch eine eMail mit dem Betreff “ Bacula: Intervention needed for …“. Die Backup-Datei bekommt den Namen des Labels.
Eine Anbindung von Backupquellen (mit installiertem bacula-fd) im Internet ist mit Bacula möglich. Vorrausssetzung ist, das die Backupquellen den Storage-daemon (bacula-sd) erreichen können (in der Konfiguration Address und SDPort). Falls dieser im internen LAN steht und nur einen intern erreichbaren DNS-Hostnamen hat, muss dieser mit hosts-Datei umgebogen werden und eine Freigabe in der Firewall eingerichtet werden. Zu beachten ist, dass z. B. der Download beim Vollbackup sehr lange dauern kann und auch ein Restore durch einen kleine Uploadgeschwindigkeit sehr lange dauern kann.
Es stehen aktuell 11 verschiedene Möglichkeiten von Verfügung:
Wenn die bacula-console richtig konfiguriert ist kommt bei der Verbindung folgenden Meldung:
Connecting to Director bacula.pi4:9101 1000 OK: bacula-dir Version: 1.38.11 (28 June 2006)
Die möglichen Kommandos bekommt man nach Eingabe von „help“:
Command Description ======= =========== add add media to a pool autodisplay autodisplay [on|off] -- console messages automount automount [on|off] -- after label cancel cancel [
Die grafische Konsole aus dem Ubuntu-Paket (bacula-console-qt) ist sehr zähflüssig in der Bedienung. Starten kann man sie mit dme Aufruf von bat, es muss im Aufrufverzeichnis eine Konfigurationsdatei unter dem Namen bat.conf existieren, diese kann man von der bconsole (/etc/bacula/bconsole.conf) nehmen.
Der Traymonitor wird als „Restricted Director“ konfiguriert. Dazu vergibt man ein eigenes Passwort.
Achtung: Falls die Standard-ports (TCP 5901 bis 5903) geändert werden, solltes dieses in der /etc/services auch eingetragen werden! Ansonsten finden die Init-scripte das PID-file (dort steht die aktuelle Prozess-ID drin) nicht und man wundert sich warum Konfigurationsänderungen nicht übernommen werden. Grund ist das die Prozess gar nicht gefunden werden und somit auch nicht neu starten, deshalb werden Konfigurationsänderungen auch nicht übernommen.
bacula-dir.conf übereinstimmenÖffnen /etc/bacula/bconsole.confDies geht über Client Run Before/After Jobs.
In der Standardeinstellung wird anhand des Passwort-hashes (per CRAM-MD5) überprüft ob eine Kommunikation erlaubt wird. Ansonsten wird die Kommunikation unverschlüsselt geführt.
Ab Bacula version 2.5.x ist SSL/TLS-Verschlüsselung möglich:
Nur Authentifizierung der Partner (keine Verschlüsselung der Nutzdaten!):
TLS Authenticate = yes
Vollständige Verschlüsselung (Authentifizierung + Nutzdaten), siehe auch: Bacula TLS - Communications Encryption
TLS Enable = yes TLS Require = yes # enforce encrypted communication
Verify Peer = yes
Die Kommunikationspartner werden überprüft (Einstellung nur auf im Server-kontext möglich, also beim dir
). Wenn nicht per TLS Allowed CN bestimmte Common-Names eingeschränkt sind, dann werden alle gültigen Zertifikate der im System bekannten Root-CAs akzeptiert.
</file> TLS Allowed CN =
Schränkt auf bestimmte Common-Names ein, die Direktive kann mehrfach angegeben werden. <file> TLS CA Certificate File = /etc/bacula/ca.pem # This is a server certificate, used for incoming console connections TLS Certificate = /etc/bacula/host.crt.pem # public Certificate TLS Key = /etc/bacula/host.key.pem # private key
Der file-Daemon (Bezeichnung als „Client“ auf Windows).
# Default Bacula File Daemon Configuration file
#
# For Bacula release 2.4.3 (10/10/08) -- Windows MVS
#
# There is not much to change here except perhaps the
# File daemon Name
#
#
# "Global" File daemon configuration specifications
#
FileDaemon { # this is me
Name = comp2000server-fd
FDport = 9102 # where we listen for the director
WorkingDirectory = "C:/Dokumente und Einstellungen/All Users/Anwendungsdaten/Bacula/Work"
Pid Directory = "C:/Dokumente und Einstellungen/All Users/Anwendungsdaten/Bacula/Work"
Maximum Concurrent Jobs = 2
}
#
# List Directors who are permitted to contact this File daemon
#
Director {
Name = bacula-dir
Password = "Passwort_ändern!"
}
#
# Restricted Director, used by tray-monitor to get the
# status of the file daemon
#
Director {
Name = bacula-mon
Password = "Passwort_ändern!"
Monitor = yes
}
# Send all messages except skipped files back to Director
Messages {
Name = Standard
director = bacula-dir = all, !skipped, !restored
}
#
# Default Bacula File Daemon Configuration file
#
# For Bacula release 1.38.11 (28 June 2006) -- debian 4.0
#
# There is not much to change here except perhaps the
# File daemon Name to
#
#
# List Directors who are permitted to contact this File daemon
#
Director {
Name = bacula-dir
Password = "Passwort_ändern!"
}
#
# Restricted Director, used by tray-monitor to get the
# status of the file daemon
#
Director {
Name = bacula-mon
Password = "Passwort_ändern!"
Monitor = yes
}
#
# "Global" File daemon configuration specifications
#
FileDaemon { # this is me
Name = bacula-fd
FDport = 9102 # where we listen for the director
WorkingDirectory = /var/lib/bacula
Pid Directory = /var/run/bacula
Maximum Concurrent Jobs = 20
FDAddress = 127.0.0.1 # change!
}
# Send all messages except skipped files back to Director
Messages {
Name = Standard
director = bacula-dir = all, !skipped, !restored
}
#
# Bacula User Agent (or Console) Configuration File
#
Director {
Name = bacula.pi4-director
DIRport = 9101
address = bacula.pi4
Password = "Passwort_ändern!"
}
Gründe
/etc/services eintragen)lsof -i)siehe auch: I'm Getting Authorization Errors. What is Going On? (Bacula-FAQ)
Diese Fehlermeldung entsteht wenn die Komponenten von Bacula von der Versionsnummer her inkompatibel sind. Z.B. dann wenn der Director eine ältere Versionsnummer als der File-daemon hat. Wenn man den FD auf die gleiche Versionsnummer wie den Director bringt ist man auf der sicheren Seite. Wenn der file-daemon eine ältere Versionnummer als der Director hat sollte es trotzdem funktionieren. Siehe auch Kapiel DB-Upgrade.
Während der großen Versionssprünge kommt es zu Änderungen im Datenbank-layout. Die Tabelle Version zeigt die aktuelle Version des Layouts.
Die folgenden SQL-Befehle befinden sich u.a. im bacula-director-mysql-Paket von Debian wenn es entpackt wurde in der data.tar.gz im Verzeichnis /usr/share/dbconfig-common/data/bacula-director-mysql/upgrade/mysql bei anderen DB-Versionen analog.
DB-Upgrade auf Bacula 3.x , mir ist nicht bekannt welche minimale Version nötig ist, es funktioniert von Version 10 (z. B. Bacula 2.4.4) auf 11:
-- Fix bad index on Media table DROP INDEX inx8 ON Media; CREATE UNIQUE INDEX inx8 ON Media (VolumeName(128)); ALTER TABLE File CHANGE FileId FileId BIGINT UNSIGNED NOT NULL AUTO_INCREMENT; ALTER TABLE BaseFiles CHANGE FileId FileId BIGINT UNSIGNED NOT NULL; ALTER TABLE Job ADD ReadBytes BIGINT UNSIGNED DEFAULT 0 AFTER JobBytes; ALTER TABLE Media ADD ActionOnPurge TINYINT DEFAULT 0 AFTER Recycle; ALTER TABLE Pool ADD ActionOnPurge TINYINT DEFAULT 0 AFTER Recycle; DELETE FROM Version; INSERT INTO Version (VersionId) VALUES (11); -- If you have already this table, you can remove it with: -- DROP TABLE JobHistory; -- Create a table like Job for long term statistics CREATE TABLE JobHisto ( JobId INTEGER UNSIGNED NOT NULL, Job TINYBLOB NOT NULL, Name TINYBLOB NOT NULL, Type BINARY(1) NOT NULL, Level BINARY(1) NOT NULL, ClientId INTEGER DEFAULT 0, JobStatus BINARY(1) NOT NULL, SchedTime DATETIME DEFAULT 0, StartTime DATETIME DEFAULT 0, EndTime DATETIME DEFAULT 0, RealEndTime DATETIME DEFAULT 0, JobTDate BIGINT UNSIGNED DEFAULT 0, VolSessionId INTEGER UNSIGNED DEFAULT 0, VolSessionTime INTEGER UNSIGNED DEFAULT 0, JobFiles INTEGER UNSIGNED DEFAULT 0, JobBytes BIGINT UNSIGNED DEFAULT 0, ReadBytes BIGINT UNSIGNED DEFAULT 0, JobErrors INTEGER UNSIGNED DEFAULT 0, JobMissingFiles INTEGER UNSIGNED DEFAULT 0, PoolId INTEGER UNSIGNED DEFAULT 0, FileSetId INTEGER UNSIGNED DEFAULT 0, PriorJobId INTEGER UNSIGNED DEFAULT 0, PurgedFiles TINYINT DEFAULT 0, HasBase TINYINT DEFAULT 0, INDEX (StartTime) );
DB-Upgrade von Bacula 3.x auf 5.x (Version 11 auf 12):
ALTER TABLE JobMedia DROP Copy ;
ALTER TABLE Job ADD COLUMN HasCache tinyint default 0 after HasBase;
ALTER TABLE Job ADD COLUMN Reviewed tinyint default 0 after HasCache;
ALTER TABLE Job ADD COLUMN Comment BLOB AFTER Reviewed;
ALTER TABLE JobHisto ADD COLUMN HasCache tinyint default 0 after HasBase;
ALTER TABLE JobHisto ADD COLUMN Reviewed tinyint default 0 after HasCache;
ALTER TABLE JobHisto ADD COLUMN Comment BLOB AFTER Reviewed;
ALTER TABLE Status ADD COLUMN Severity int;
UPDATE Status SET Severity = 15;
UPDATE Status SET Severity = 100 where JobStatus = 'f';
UPDATE Status SET Severity = 90 where JobStatus = 'A';
UPDATE Status SET Severity = 10 where JobStatus = 'T';
UPDATE Status SET Severity = 20 where JobStatus = 'e';
UPDATE Status SET Severity = 25 where JobStatus = 'E';
CREATE TABLE PathHierarchy
(
PathId integer NOT NULL,
PPathId integer NOT NULL,
CONSTRAINT pathhierarchy_pkey PRIMARY KEY (PathId)
);
CREATE INDEX pathhierarchy_ppathid
ON PathHierarchy (PPathId);
CREATE TABLE PathVisibility
(
PathId integer NOT NULL,
JobId integer NOT NULL,
Size int8 DEFAULT 0,
Files int4 DEFAULT 0,
CONSTRAINT pathvisibility_pkey PRIMARY KEY (JobId, PathId)
);
CREATE INDEX pathvisibility_jobid
ON PathVisibility (JobId);
CREATE INDEX basefiles_jobid_idx ON BaseFiles ( JobId );
DELETE FROM Version;
INSERT INTO Version (VersionId) VALUES (12);
News
Navigation