Thursday, February 28, 2008

Bacula Configurations

Server configs:

bconsole.conf:

Director {
Name = ubuntu-dir
DIRport = 9101
address = your.ip.is.here
Password = "pUypIMLMok5sn0W4nFHi9n6fAi2LTFBBqrOwxsMOPF5C"
}


bacula-dir.conf:


Director { # define myself
Name = ubuntu-dir
DIRport = 9101 # where we listen for UA connections
QueryFile = "/etc/bacula/query.sql"
WorkingDirectory = "/var/bacula/working"
PidDirectory = "/var/run"
Maximum Concurrent Jobs = 1
Password = "pUypIMLMok5sn0W4nFHi9n6fAi2LTFBBqrOwxsMOPF5C"
Messages = Daemon
}
JobDefs {
Name = "DefaultJob"
Type = Backup
Level = Incremental
Client = ubuntu-fd
FileSet = "Full Set"
Schedule = "WeeklyCycle"
Storage = File
Messages = Standard
Pool = Default
Priority = 10
}
Job {
Name = "Client1"
JobDefs = "DefaultJob"
Write Bootstrap = "/var/bacula/working/Client1.bsr"
}
# Backup the catalog database (after the nightly save)
Job {
Name = "BackupCatalog"
JobDefs = "DefaultJob"
Level = Full
FileSet="Catalog"
Schedule = "WeeklyCycleAfterBackup"
# This creates an ASCII copy of the catalog
RunBeforeJob = "/etc/bacula/make_catalog_backup bacula bacula"
# This deletes the copy of the catalog
RunAfterJob = "/etc/bacula/delete_catalog_backup"
Write Bootstrap = "/var/bacula/working/BackupCatalog.bsr"
Priority = 11 # run after main backup
}
Job {
Name = "RestoreFiles"
Type = Restore
Client=ubuntu-fd
FileSet="Full Set"
Storage = File
Pool = Default
Messages = Standard
Where = /bacula-restores
}

FileSet {
Name = "Full Set"
Include {
Options {
signature = MD5
}
File = /home/
}

Exclude {
File = /proc
File = /tmp
File = /.journal
File = /.fsck
}
}
Schedule {
Name = "WeeklyCycle"
Run = Full 1st sun at 23:05
Run = Differential 2nd-5th sun at 23:05
Run = Incremental mon-sat at 23:05
}
Schedule {
Name = "WeeklyCycleAfterBackup"
Run = Full sun-sat at 23:10
}
FileSet {
Name = "Catalog"
Include {
Options {
signature = MD5
}
File = /var/bacula/working/bacula.sql
}
}

# Client (File Services) to backup. This Client is in server!!
Client {
Name = ubuntu-fd
Address = 10.66.66.31
FDPort = 9102
Catalog = MyCatalog
Password = "iBtT8iPwJUvgQDzx9NXYCgqpYqVJSZpfJaSPys2OFaUO" # 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 = 10.66.66.31 # N.B. Use a fully qualified name here
SDPort = 9103
Password = "GXbfLMxsWxQbhCQyYW5IZoDEISB/VEq6fdmNgR4AaTQh"
Device = FileStorage
Media Type = File
}
# Generic catalog service
Catalog {
Name = MyCatalog
dbname = bacula; user = bacula; password = ""
}

# Reasonable message delivery -- send most everything to email address
# and to the console
Messages {
Name = Standard

mailcommand = "/sbin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: %t %e of %c %l\" %r"
operatorcommand = "/sbin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: Intervention needed for %j\" %r"
mail = root@localhost = all, !skipped
operator = root@localhost = mount
console = all, !skipped, !saved
append = "/var/bacula/working/log" = all, !skipped
}

# Message delivery for daemon messages (no job).
Messages {
Name = Daemon
mailcommand = "/sbin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula daemon message\" %r"
mail = root@localhost = all, !skipped
console = all, !skipped, !saved
append = "/var/bacula/working/log" = all, !skipped
}
# Default pool definition
Pool {
Name = Default
Pool Type = Backup
Recycle = yes # Bacula can automatically recycle Volumes
AutoPrune = yes # Prune expired volumes
Volume Retention = 365 days # one year
}

# Scratch pool definition
Pool {
Name = Scratch
Pool Type = Backup
}Console {
Name = ubuntu-mon
Password = "sHa1X/38oyCYM/oGkjW/WL4yY/fQF2vie/1dSm9HuuvD"
CommandACL = status, .status
}

#Ubuntu Client

Job {
Name = "Aspirin"
Type = Backup
Client = aspirin-fd
FileSet = "Full Set"
Schedule = "WeeklyCycle"
Storage = File
Messages = Standard
Pool = Default
Write Bootstrap = "/var/bacula/working/aspirin.bsr"
}

# Client (File Services) to backup
Client {
Name = aspirin-fd
Address = 10.66.66.41
FDPort = 9102
Catalog = MyCatalog
Password = "iBtT8iPwJUvgQDzx9NXYCgqpYqVJSZpfJaSPys2OFaUO" # password for
File Retention = 30d # 30 days
Job Retention = 180d # six months
AutoPrune = yes # Prune expired Jobs/Files
}

#Windows Client
Job {
Name = WinClient
Type = Backup
Client = winclient-fd
FileSet = WindowsFileSet
Schedule = WeeklyCycle
Storage = File
Messages = Standard
Pool = Default
Write Bootstrap = "/var/bacula/working/winclient.bsr"
}
# Client (File Services) to backup
Client {
Name = winclient-fd
Address = 10.66.66.50
FDPort = 9102
Catalog = MyCatalog
Password = "iBtT8iPwJUvgQDzx9NXYCgqpYqVJSZpfJaSPys2OFaUO"
File Retention = 30d # 30 days
Job Retention = 180d # six months
AutoPrune = yes # Prune expired Jobs/Files
}

#File set for WINDOWS
FileSet {
Name = WindowsFileSet
Enable VSS = yes
Include {
File = c:/programme/openvpn/config
Options {
}
}
}

bacula-sd.conf:

Storage { # definition of myself
Name = ubuntu-sd
SDPort = 9103 # Director's port
WorkingDirectory = "/var/bacula/working"
Pid Directory = "/var/run"
Maximum Concurrent Jobs = 20
}

Director {
Name = ubuntu-dir
Password = "GXbfLMxsWxQbhCQyYW5IZoDEISB/VEq6fdmNgR4AaTQh"
}

Director {

Name = ubuntu-mon
Password = "oazZu/8Zt0VL8W8SmfmdOAfp1fZcalzKgLyFXP8tCIQQ"
Monitor = yes
}

Device {
Name = FileStorage
Media Type = File
Archive Device = /backup #Target Directory or Device
LabelMedia = yes; # lets Bacula label unlabeled media
Random Access = Yes;
AutomaticMount = yes; # when device opened, read it
RemovableMedia = no;
AlwaysOpen = no;
}

Messages {
Name = Standard
director = ubuntu-dir = all
}

###########################
Configuration for windows Client:

bacula-fd.conf:

FileDaemon { # this is me
Name = winclient-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 = ubuntu-dir
Password = "iBtT8iPwJUvgQDzx9NXYCgqpYqVJSZpfJaSPys2OFaUO"
}


# Send all messages except skipped files back to Director
Messages {
Name = Standard
director = ubuntu-dir = all, !skipped, !restored
}

#######################
Configuration for Ubuntu Client:

bacula-fd.conf:

# List Directors who are permitted to contact this File daemon
#
Director {
Name = ubuntu-dir
Password = "iBtT8iPwJUvgQDzx9NXYCgqpYqVJSZpfJaSPys2OFaUO"
}

#
# "Global" File daemon configuration specifications
#
FileDaemon { # this is me
Name = aspirin-fd
FDport = 9102 # where we listen for the director
WorkingDirectory = /var/bacula/working
Pid Directory = /var/run
Maximum Concurrent Jobs = 20
}

# Send all messages except skipped files back to Director
Messages {
Name = Standard
director = ubuntu-dir = all, !skipped, !restored
}

No comments: