Acer Revo R3600 als Server: Bacula Backup – Teil 2
Nachdem wir in Teil 1 unseres kleinen Tutorials Bacula installiert haben, wollen wir nun alles weitere konfigurieren.
1. SQLite-datenbank anlegen
Zuerst muss eine SQLite-Datenbank angelegt werden. Hierzu gibt es ein CMD-File, in welchem die Pfadangabe angepasst werden muss:
H:Baculabincreate_database.cmd
Zeile 5:
ECHO .databases | „H:Baculabinsqlite3″ %* „H:BaculaWorkbacula.db“
Nach dem speichern der Änderung kann das Batch-File aufgerufen werden und die Datenbank wird angelegt. Nun kann der Directory-Service gestartet werden.
Im Pfad Baculabin finden sich noch weitere CMD-Files, in denen die Pfadangaben zur Installation überarbeitet werden sollten.
2. Konfiguration der Services
bconsole.conf und bwx-console.conf
#
# Bacula User Agent (or Console) Configuration File
#Director {
Name = computername-dir
DIRport = 9101
address = dns-adresse oder ip
Password = „secret-key“
}
Name: Name wie im Setup angegeben. Muss nicht geändert werden
address: Adresse im TCP/IP-Netzwerk
Password: secret-key, wie im Setup angegeben. Muss nicht geändert werden
bacula-sd.conf
Storage {
Name = computername-sd
SDPort = 9103
WorkingDirectory = „H:\Bacula\Work“
Pid Directory = „H:\Bacula\Work“
Maximum Concurrent Jobs = 10
}Director {
Name = computername-dir
Password = „secret-key“
}
Director {
Name = computername-mon
Password = „secret-key“
Monitor = yes
}Device {
Name = FileStorage
Media Type = File
Archive Device = „H:\Backup“
LabelMedia = yes
Random Access = Yes
AutomaticMount = yes
RemovableMedia = no
AlwaysOpen = no
}
Messages {
Name = Standard
director = computername-dir = all
}
Name / director: Name wie im Setup angegeben. Muss nicht geändert werden
Password: secret-key, wie im Setup angegeben. Muss nicht geändert werden
bacula-fd.conf
#
# Default Bacula File Daemon Configuration file
##
# „Global“ File daemon configuration specifications
#
FileDaemon {
Name = computername-fd
FDport = 9102
WorkingDirectory = „H:\Bacula\Work“
Pid Directory = „H:\Bacula\Work“
Maximum Concurrent Jobs = 5
}#
# List Directors who are permitted to contact this File daemon
#
Director {
Name = computername-dir
Password = „@client_password@“
}#
# Restricted Director, used by tray-monitor to get the
# status of the file daemon
#
Director {
Name = computername-mon
Password = „secret-key“
Monitor = yes
}# Send all messages except skipped files back to Director
Messages {
Name = Standard
director = computername-dir = all, !skipped, !restored
}
Name / director: Name wie im Setup angegeben. Muss nicht geändert werden
Password: secret-key, wie im Setup angegeben. Muss nicht geändert werden
bacula-dir.conf
#
# Default Bacula Director Configuration file
#
# The only thing that MUST be changed is to add one or more
# file or directory names in the Include directive of the
# FileSet resource.
#Director {
Name = computername-dir
DIRport = 9101
QueryFile = „H:\Bacula\bin\query.sql“
WorkingDirectory = „H:\Bacula\Work“
PidDirectory = „H:\Bacula\Work“
Maximum Concurrent Jobs = 1
Password = „secret-key“
Messages = Daemon
}#
# Restricted console used by tray-monitor to get the status of the director
#
Console {
Name = computername-mon
Password = „secret-key“
CommandACL = status, .status
}# Client (File Services) to backup
Client {
Name = computername-fd
Address = ip / dns-adress
FDPort = 9102
Catalog = MyCatalog
Password = „@client_password@“ # password for FileDaemon
File Retention = 30 days # 30 days
Job Retention = 6 months # six months
AutoPrune = yes # Prune expired Jobs/Files
}# Definition of file storage device
Storage {
Name = File
# Do not use „localhost“ here
Address = dns-name
SDPort = 9103
Password = „secret-key“
Device = FileStorage
Media Type = File
}# Generic catalog service
Catalog {
Name = MyCatalog
dbname = bacula; user = bacula; password = „“
}#
# When to do the backups, full backup on first sunday of the month,
# differential (i.e. incremental since full) every other sunday,
# and incremental backups other days
Schedule {
Name = „WeeklyCycle“
Run = Level = Full sun at 20:00
Run = Level = Differential mon-sat at 20:00
}
Schedule {
Name = „WeeklyCycle-Daytime“
Run = Level = Full sun at 17:00
Run = Level = Differential mon-sat at 17:00
}
Schedule {
Name = „MonthlyCycle“
Run = Level = Full 1st sun at 20:15
Run = Level = Differential weekly sun at 20:15
}###################################################################################
#
# computername
#
JobDefs {
Name = „computername-Std“
Type = Backup
Level = Differential
Client = computername-fd
Storage = File
Messages = Standard
Priority = 10
}#
# computername – Users
#
Pool {
Name = computername-Users
Pool Type = Backup
Recycle = yes # Bacula can automatically recycle Volumes
AutoPrune = yes # Prune expired volumes
Volume Retention = 365 days # one year
}
Job {
Name = „computername – Users“
Pool = computername-Users
JobDefs = „computername-Std“
FileSet = „computername – Users“
Schedule = „WeeklyCycle-Daytime“
Write Bootstrap = „H:\Bacula\Work\computername – Users.bsr“
}
FileSet {
Name = „computername – Users“
Enable VSS = yes
Include {
Options {
signature = MD5
ignore case = yes
compression=GZIP
}
File = „C:/Users“
}
}# Reasonable message delivery — send most everything to email address
# and to the console
Messages {
Name = Standard
#
# NOTE! If you send to two email or more email addresses, you will need
# to replace the %r in the from field (-f part) with a single valid
# email address in both the mailcommand and the operatorcommand.
#
mailcommand = „“H:\Bacula\bin\bsmtp“ -h my.mailserver.com -f „(Bacula) %r“ -s „Bacula: %t %e of %c %l“ %r“
operatorcommand = „“H:\Bacula\bin\bsmtp“ -h my.mailserver.com -f „(Bacula) %r“ -s „Bacula: Intervention needed for %j“ %r“
mail = my.adress@domain.com = all, !skipped
operator = my.adress@domain.com = mount
console = all, !skipped, !saved
#
# WARNING! the following will create a file that you must cycle from
# time to time as it will grow indefinitely. However, it will
# also keep all your messages if they scroll off the console.
#
append = „H:\Bacula\Work\log“ = all, !skipped
}#
# Message delivery for daemon messages (no job).
Messages {
Name = Daemon
mailcommand = „“H:\Bacula\bin\bsmtp“ -h my.mailserver.com -f „(Bacula) %r“ -s „Bacula daemon message“ %r“
mail = my.adress@domain.com = all, !skipped
console = all, !skipped, !saved
append = „H:\Bacula\Work\log“ = all, !skipped
}
Das Konfig-File bacula-dir.conf ist, wie auch der entsprechende Daemon, sind die „Steuerzentrale“ von Bacula. Aus diesem Grund gehen wir ein wenig genauer auf die einzelnen Sections ein. Basis ist unsere Beispieldatei, die mit einigen Anpassungen lauffähig ist und die Userverzeichnisse auf C:Users unter Win Vista sichert.
Die Erläuterungen hierzu folgen in Teil 3 unseres kleinen Tutorials …
Neue Kommentare