Commit e9c01101 authored by glucas's avatar glucas

Add Bacula configurations.

parent 25a45649
#
# 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.
#
# For Bacula release 5.2.6 (21 February 2012) -- debian 7.0
#
# You might also want to change the default email address
# from root to your address. See the "mail" and "operator"
# directives in the Messages resource.
#
# define myself
Director {
Name = <hostname>-dir
DIRport = 9101
# Console password
Password = ""
# Provided by Debian Package
QueryFile = "/etc/bacula/scripts/query.sql"
WorkingDirectory = "/var/lib/bacula"
PidDirectory = "/var/run/bacula"
Maximum Concurrent Jobs = 1
Messages = Daemon
DirAddress = 127.0.0.1
}
# Restricted console used by tray-monitor to get the status of the director
Console {
Name = <hostname>-mon
Password = ""
CommandACL = status, .status
}
# all the configuration splitted into small pieces
@|"sh -c 'for f in /etc/bacula/bacula.d/*.conf ; do echo @${f} ; done'"
# Generic catalog service
Catalog {
Name = MyCatalog
dbname = "bacula"; dbuser = ""; dbpassword = ""
}
# Clients (File Services) to backup
# Save the file-daemon catalog
Client {
Name = <hostname>-fd
Address = <FQDN>
FDPort = 9102
Catalog = MyCatalog
Password = "" # password for FileDaemon
File Retention = 30 days # 30 days
Job Retention = 6 months # six months
AutoPrune = yes # Prune expired Jobs/Files
}
# ARN
Client {
Name = ext.arn-fai.net-fd
Address = ext.arn-fai.net
FDPort = 9102
Catalog = MyCatalog
Password = "" # password for FileDaemon
File Retention = 30 days # 30 days
Job Retention = 6 months # six months
AutoPrune = yes # Prune expired Jobs/Files
}
Client {
Name = mail.arn-fai.net-fd
Address = mail.arn-fai.net
FDPort = 9102
Catalog = MyCatalog
Password = ""
File Retention = 30 days
Job Retention = 6 months
AutoPrune = yes
}
Client {
Name = ns0.arn-fai.net-fd
Address = ns0.arn-fai.net
FDPort = 9102
Catalog = MyCatalog
Password = ""
File Retention = 30 days
Job Retention = 6 months
AutoPrune = yes
}
Client {
Name = recursif.arn-fai.net-fd
Address = recursif.arn-fai.net
FDPort = 9102
Catalog = MyCatalog
Password = ""
File Retention = 30 days
Job Retention = 6 months
AutoPrune = yes
}
Client {
Name = web.arn-fai.net-fd
Address = web.arn-fai.net
FDPort = 9102
Catalog = MyCatalog
Password = ""
File Retention = 30 days
Job Retention = 6 months
AutoPrune = yes
}
Client {
Name = int.arn-fai.net-fd
Address = int.arn-fai.net
FDPort = 9102
Catalog = MyCatalog
Password = ""
File Retention = 30 days
Job Retention = 6 months
AutoPrune = yes
}
Client {
Name = adh.arn-fai.net-fd
Address = adh.arn-fai.net
FDPort = 9102
Catalog = MyCatalog
Password = ""
File Retention = 30 days
Job Retention = 6 months
AutoPrune = yes
}
Client {
Name = puppet.arn-fai.net-fd
Address = puppet.arn-fai.net
FDPort = 9102
Catalog = MyCatalog
Password = ""
File Retention = 30 days
Job Retention = 6 months
AutoPrune = yes
}
Client {
Name = radius.arn-fai.net-fd
Address = radius.arn-fai.net
FDPort = 9102
Catalog = MyCatalog
Password = ""
File Retention = 12 months # one year because of french law about logs
Job Retention = 12 months # one year because of french law about logs
AutoPrune = yes
}
Client {
Name = voip.arn-fai.net-fd
Address = voip.arn-fai.net
FDPort = 9102
Catalog = MyCatalog
Password = ""
File Retention = 30 days
Job Retention = 6 months
AutoPrune = yes
}
Client {
Name = zabbix.arn-fai.net-fd
Address = zabbix.arn-fai.net
FDPort = 9102
Catalog = MyCatalog
Password = ""
File Retention = 30 days
Job Retention = 6 months
AutoPrune = yes
}
Client {
Name = vpn.arn-fai.net-fd
Address = vpn.arn-fai.net
FDPort = 9102
Catalog = MyCatalog
Password = ""
File Retention = 12 months # one year because of french law about logs
Job Retention = 12 months # one year because of french law about logs
AutoPrune = yes
}
Client {
Name = alsace.tetaneutral.net-fd
Address = alsace.tetaneutral.net
FDPort = 9102
Catalog = MyCatalog
Password = ""
File Retention = 30 days
Job Retention = 6 months
AutoPrune = yes
}
# This is the backup of the catalog
FileSet {
Name = "CatalogFS"
Include {
Options {
signature = MD5
compression = GZIP
}
File = "/var/lib/bacula/bacula.sql"
}
}
FileSet {
Name = "EtcAndLogRepFS"
Include {
Options {
signature = MD5
compression = GZIP
}
File = /srv/
File = /etc/
File = /var/log/
File = /var/local/mysql_backups
}
}
FileSet {
Name = "DNSEtcLogRepFS"
Include {
Options {
signature = MD5
compression = GZIP
}
File = /etc/
File = /var/log/
File = /var/named/
File = /var/nsd3/
File = /var/local/mysql_backups
}
}
FileSet {
Name = "AlsaceFS"
Include {
Options {
signature = MD5
compression = GZIP
}
File = /etc/
File = /var/log/
File = /var/named/
File = /var/nsd3/
File = /var/local/mysql_backups
File = /usr/local/etc/
}
}
# List of files to be backed up
FileSet {
Name = "Full Set"
Include {
Options {
signature = MD5
compression = GZIP
}
# File = <file-name
}
}
JobDefs {
Name = "DefaultJob"
Type = Backup
Level = Incremental
FileSet = "Full Set"
Client = <hostname>-fd
Schedule = "WeeklyCycle"
Storage = <hostname>-sd
Messages = Standard
Pool = File
Priority = 10
Write Bootstrap = "/var/lib/bacula/%c.bsr"
}
JobDefs {
Name = "MyDefaultJob"
Type = Backup
Level = Incremental
Schedule = "WeeklyCycle"
Storage = <hostname>-sd
Messages = Standard
Pool = File
Priority = 10
Write Bootstrap = "/var/lib/bacula/%c.bsr"
}
JobDefs {
Name = "ARNBackupJobDefs"
Type = Backup
Level = Incremental
FileSet = "EtcAndLogRepFS"
Schedule = "WeeklyCycle"
Storage = <hostname>-sd
Messages = Standard
Pool = File
Priority = 10
Write Bootstrap = "/var/lib/bacula/%c.bsr"
}
# Backup the catalog database (after the nightly save)
Job {
Name = "BackupCatalog"
JobDefs = "DefaultJob"
Level = Full
FileSet="CatalogFS"
Schedule = "WeeklyCycleAfterBackup"
# make_catalog_backup.pl <catalog-name>
RunBeforeJob = "/etc/bacula/scripts/make_catalog_backup.pl MyCatalog"
# This deletes the copy of the catalog
RunAfterJob = "/etc/bacula/scripts/delete_catalog_backup"
Write Bootstrap = "/var/lib/bacula/%n.bsr"
Priority = 11 # run after main backup
Storage = <hostname>-sd
}
# Standard Restore template, to be changed by Console program
# Only one such job is needed for all Jobs/Clients/Storage ...
Job {
Name = "RestoreFiles"
Type = Restore
Client = <hostname>-fd
FileSet="Full Set"
Storage = <hostname>-sd
Pool = Default
Messages = Standard
Where = /nonexistant/path/to/file/archive/dir/bacula-restores
}
Job {
Name = "ARNextBackup"
JobDefs = "ARNBackupJobDefs"
Client = ext.arn-fai.net-fd
}
Job {
Name = "ARNmailBackup"
JobDefs = "ARNBackupJobDefs"
Client = mail.arn-fai.net-fd
}
Job {
Name = "ARNns0Backup"
JobDefs = "ARNBackupJobDefs"
FileSet = "DNSEtcLogRepFS"
Client = ns0.arn-fai.net-fd
}
Job {
Name = "ARNrecursifBackup"
JobDefs = "ARNBackupJobDefs"
Client = recursif.arn-fai.net-fd
}
Job {
Name = "ARNwebBackup"
JobDefs = "ARNBackupJobDefs"
ClientRunBeforeJob = "/etc/bacula/scripts/backup_db"
Client = web.arn-fai.net-fd
}
Job {
Name = "ARNintBackup"
JobDefs = "ARNBackupJobDefs"
Client = int.arn-fai.net-fd
}
Job {
Name = "ARNadhBackup"
JobDefs = "ARNBackupJobDefs"
Client = adh.arn-fai.net-fd
}
Job {
Name = "ARNpuppetBackup"
JobDefs = "ARNBackupJobDefs"
Client = puppet.arn-fai.net-fd
}
Job {
Name = "ARNradiusBackup"
JobDefs = "ARNBackupJobDefs"
Client = radius.arn-fai.net-fd
}
Job {
Name = "ARNvoipBackup"
JobDefs = "ARNBackupJobDefs"
Client = voip.arn-fai.net-fd
}
Job {
Name = "ARNzabbixBackup"
JobDefs = "ARNBackupJobDefs"
ClientRunBeforeJob = "/etc/bacula/scripts/backup_db"
Client = zabbix.arn-fai.net-fd
}
Job {
Name = "ARNvpnBackup"
JobDefs = "ARNBackupJobDefs"
Client = vpn.arn-fai.net-fd
}
Job {
Name = "ARNttnnBackup"
JobDefs = "ARNBackupJobDefs"
FileSet = "AlsaceFS"
Client = alsace.tetaneutral.net-fd
}
# 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.
# What this does is, it sets the email address that emails would display
# in the FROM field, which is by default the same email as they're being
# sent to. However, if you send email to more than one address, then
# you'll have to set the FROM address manually, to a single address.
# for example, a 'no-reply@mydomain.com', is better since that tends to
# tell (most) people that its coming from an automated source.
#
mailcommand = "/usr/sbin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: %t %e of %c %l\" %r"
operatorcommand = "/usr/sbin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: Intervention needed for %j\" %r"
mail = root = all, !skipped
operator = root = 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.
#
# On Debian, this is done by logrotate script in bacula-common package
append = "/var/log/bacula/bacula.log" = all, !skipped
catalog = all
}
#
# Message delivery for daemon messages (no job).
Messages {
Name = Daemon
mailcommand = "/usr/sbin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula daemon message\" %r"
mail = root = all, !skipped
console = all, !skipped, !saved
append = "/var/log/bacula/bacula.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
}
# File Pool definition
Pool {
Name = File
Pool Type = Backup
Recycle = yes # Bacula can automatically recycle Volumes
AutoPrune = yes # Prune expired volumes
Volume Retention = 365 days # one year
Maximum Volume Bytes = 50G # Limit Volume size to something reasonable
Maximum Volumes = 100 # Limit number of Volumes in Pool
}
# Scratch pool definition
Pool {
Name = Scratch
Pool Type = Backup
}
# 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 = Full 1st sun at 23:05
Run = Differential 2nd-5th sun at 23:05
Run = Incremental mon-sat at 23:05
}
# This schedule does the catalog. It starts after the WeeklyCycle
Schedule {
Name = "WeeklyCycleAfterBackup"
Run = Full sun-sat at 23:10
}
# Definition of file storage devices
Storage {
Name = <hostname>-sd
Address = <FQDN>
SDPort = 9103
Password = ""
Device = FileStorage
Media Type = File
}
#
# Bacula User Agent (or Console) Configuration File
#
Director {
Name = the-dir
DIRport = 9101
address = localhost
Password = ""
}
# On each server to backup
# Directors who are permitted to contact this File daemon.
Director {
Name = "<hostname>-dir"
Password = ""
}
# Restricted Director, used by tray-monitor for File daemon status.
Director {
Name = "<hostname>-mon"
Password = ""
Monitor = Yes
}
# "Global" File daemon configuration specifications.
FileDaemon {
Name = "<hostname>-fd"
FDport = 9102
WorkingDirectory = /var/spool/bacula
PidDirectory = /var/run/bacula
FDAddress = <fqdn>
Heartbeat Interval = 1 minute
}
Messages {
Name = "standard"
Director = <hostname>-dir = all, !skipped, !restored
}
#
# Default Bacula Storage Daemon Configuration file
#
# For Bacula release 5.2.6 (21 February 2012) -- debian jessie/sid
#
# You may need to change the name of your tape drive
# on the "Archive Device" directive in the Device
# resource. If you change the Name and/or the
# "Media Type" in the Device resource, please ensure
# that dird.conf has corresponding changes.
#
# definition of myself
Storage {
Name = <hostname>-sd
# Director's port
SDPort = 9103
WorkingDirectory = "/var/lib/bacula"
Pid Directory = "/var/run/bacula"
Maximum Concurrent Jobs = 20
SDAddress = <FQDN>
}
#
# List Directors who are permitted to contact Storage daemon
#
Director {
Name = <hostname>-dir
Password = ""
}
#
# Restricted Director, used by tray-monitor to get the
# status of the storage daemon
#
Director {
Name = <hostname>-mon
Password = ""
Monitor = yes
}
#
# Note, for a list of additional Device templates please
# see the directory <bacula-source>/examples/devices
# Or follow the following link:
# http://bacula.svn.sourceforge.net/viewvc/bacula/trunk/bacula/examples/devices/
#
#
# Devices supported by this Storage daemon
# To connect, the Director's bacula-dir.conf must have the
# same Name and MediaType.
#
Device {
Name = FileStorage
Media Type = File
Archive Device = /mnt/backup/bacula/
# lets Bacula label unlabeled media
LabelMedia = yes;
Random Access = Yes;
# when device opened, read it
AutomaticMount = yes;
RemovableMedia = no;
AlwaysOpen = no;
}
#
# Send all messages to the Director,
# mount messages also are sent to the email address
#
Messages {
Name = Standard
director = <hostname>-dir = all
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment