четверг, 10 декабря 2009 г.

Репозиторий с собранной бакулой для CentOS

[pp-contrib]
name=PPs packages for Red Hat Enterprise Linux 5 - contrib
baseurl=ftp://ftp.pramberger.at/systems/linux/contrib/rhel5/$basearch/
gpgcheck=1
gpgkey=ftp://ftp.pramberger.at/systems/linux/contrib/rhel5/RPM-GPG-KEY-6971f6ac
enabled=1
priority=30

[pp-contrib-debug]
name=PPs packages for Red Hat Enterprise Linux 5 - debug
baseurl=ftp://ftp.pramberger.at/systems/linux/contrib/rhel5/$basearch/debug/
gpgcheck=1
gpgkey=ftp://ftp.pramberger.at/systems/linux/contrib/rhel5/RPM-GPG-KEY-6971f6ac
enabled=0
priority=30

[pp-contrib-source]
name=PPs packages for Red Hat Enterprise Linux 5 - source
baseurl=ftp://ftp.pramberger.at/systems/linux/contrib/rhel5/SRPMS/
gpgcheck=1
gpgkey=ftp://ftp.pramberger.at/systems/linux/contrib/rhel5/RPM-GPG-KEY-6971f6ac
enabled=0
priority=30

Bacula, шаблон для вставки в конфиг стораж демона

Device {
 Name = @compname@-FileStorage
 Device Type = File
 Media Type = @compname@-File
 Archive Device = /bacula/devices/@compname@
 Random Access = Yes
 AutomaticMount = yes
 RemovableMedia = no
 AlwaysOpen = no
 LabelMedia = yes
}

Bacula, шаблон для вставки в конфиг директора

# @compname@ dir
# Client (File Services) to backup
Job {
 Name = "@compname@-job"
 JobDefs = "DefaultJob2"
 Write Bootstrap = "/var/lib/bacula/@compname@.bsr"
 Client = @compname@-fd
 FileSet = "@compname@-FileSet"
 Storage = "@compname@-FileStorage"
 ClientRunBeforeJob = "\"E:/Documents and Settings/All Users/Application Data/Bacula/runbefore.bat\""
 ClientRunAfterJob = "\"E:/Documents and Settings/All Users/Application Data/Bacula/runafter.bat\""
}

Client {
 Name = @compname@-fd
 Maximum Concurrent Jobs = 20
 Address = @compname@.local
 FDPort = 9102
 Catalog = MyCatalog
 Password = "passworrd"          # password for FileDaemon
 File Retention = 60 days            # 30 days
 Job Retention = 6 months            # six months
 AutoPrune = yes                     # Prune expired Jobs/Files
}

# List of files to be backed up
FileSet {
 Name = "@compname@-FileSet"
 Enable VSS = yes
 Include {
   Options {
     signature = MD5
     compression = GZIP
     IgnoreCase = yes
     Exclude = yes
     WildDir = "[A-Z]:/temp"
     WildFile = "*.tmp"
     WildDir = "[A-Z]:/RECYCLER"
     WildFile = "[A-Z]:/pagefile.sys"
     WildFile = "[A-Z]:/Documents and Settings/*/LocalSettings/Application Data/Microsoft/Windows/usrclass.*"
     WildFile = "[A-Z]:/Documents and Settings/*/ntuser.*"
     WildDir = "[A-Z]:/Documents and Settings/*/Cookies"
     WildDir = "[A-Z]:/Documents and Settings/*/Recent"
     WildDir = "[A-Z]:/Documents and Settings/*/LocalSettings/History"
     WildDir = "[A-Z]:/Documents and Settings/*/LocalSettings/Temp"
     WildDir = "[A-Z]:/Documents and Settings/*/LocalSettings/Temporary Internet Files"
     # These are always open and unable to be backed up
     WildFile = "[A-Z]:/Documents and Settings/All Users/ApplicationData/Microsoft/Network/Downloader/qmgr[01].dat"
     WildFile = "*.mp1"
     WildFile = "*.mp2"
     WildFile = "*.mp3"
     WildFile = "*.avi"
     WildFile = "*.mpg"
     WildFile = "*.mpeg"
     WildFile = "*.ogg"
   }
   File = C:/SystemStateBackup.bkf
   File = E:/

 }
 Exclude {
 }
}

# Definition of file storage device
Storage {
 Name = @compname@-FileStorage
 Maximum Concurrent Jobs = 1
 Address = at0038.local                # N.B. Use a fully qualified name here
 SDPort = 9103
 Password = "passworrd"
 Device = @compname@-FileStorage
 Media Type = @compname@-File
}

Bacula, конфиг файд демона

Director {
 Name = at0038-dir
 Password = "passworrd"
}

Director {
 Name = at0038-mon
 Password = "passworrd"
 Monitor = yes
}

FileDaemon {                          # this is me
 Name = at0038-fd
 FDport = 9102                  # where we listen for the director
 WorkingDirectory = /var/lib/bacula
 Pid Directory = /var/run
 Maximum Concurrent Jobs = 100
}

Messages {
 Name = Standard
 director = at0038-dir = all, !skipped, !restored
}

Bacula, конфиг стораждемона

Storage {                             # definition of myself
 Name = at0038-sd
 SDPort = 9103
 WorkingDirectory = "/var/lib/bacula"
 Pid Directory = "/var/run"
 Maximum Concurrent Jobs = 20
}

Director {
 Name = at0038-dir
 Password = "passworrd"
}

Director {
 Name = at0038-mon
 Password = "passworrd"
 Monitor = yes
}

Device {
 Name = FileStorage
 Media Type = File
 Archive Device = /bacula/devices/default
 LabelMedia = yes
 Random Access = Yes
 AutomaticMount = yes
 RemovableMedia = no
 AlwaysOpen = no
}

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

@/etc/bacula/conf.d/at0036-sd.conf
@/etc/bacula/conf.d/at0038-sd.conf
@/etc/bacula/conf.d/at0089-sd.conf
@/etc/bacula/conf.d/at-inf-sd.conf
@/etc/bacula/conf.d/at-main-sd.conf
@/etc/bacula/conf.d/at-tkp-sd.conf
@/etc/bacula/conf.d/at-stack1-sd.conf
@/etc/bacula/conf.d/atrec-sd.conf
@/etc/bacula/conf.d/vm-av-sd.conf
@/etc/bacula/conf.d/vm-bc-sd.conf
@/etc/bacula/conf.d/vm-dc-sd.conf
@/etc/bacula/conf.d/vm-fs-sd.conf
@/etc/bacula/conf.d/vm-ftp-sd.conf
@/etc/bacula/conf.d/vm-netpromoter-sd.conf
@/etc/bacula/conf.d/vm-netxms-sd.conf
@/etc/bacula/conf.d/vm-ns1-sd.conf
@/etc/bacula/conf.d/vm-ora-sd.conf
@/etc/bacula/conf.d/vm-proxy-sd.conf
@/etc/bacula/conf.d/vm-ras-sd.conf
@/etc/bacula/conf.d/vm-rt-sd.conf
@/etc/bacula/conf.d/vm-site-sd.conf
@/etc/bacula/conf.d/vm-smtp-sd.conf
@/etc/bacula/conf.d/vm-syslog-sd.conf
@/etc/bacula/conf.d/vm-ts-sd.conf
@/etc/bacula/conf.d/vm-ts2-sd.conf
@/etc/bacula/conf.d/vm-wsus-sd.conf
@/etc/bacula/conf.d/vm-www4-sd.conf
@/etc/bacula/conf.d/vm-www5-sd.conf

Bacula, конфиг директора

Director {
 Name = at0038-dir
 DIRport = 9101
 QueryFile = "/etc/bacula/scripts/query.sql"
 WorkingDirectory = "/var/lib/bacula"
 PidDirectory = "/var/run"
 Maximum Concurrent Jobs = 20
 Password = "passworrd"
 Messages = Daemon
}

Console {
 Name = at0038-mon
 Password = "passworrd"
 CommandACL = status, .status
}

# Generic catalog service
Catalog {
 Name = MyCatalog
 dbname = "bacula"; dbuser = "bacula"; dbpassword = "passworrd"
}

JobDefs {
 Name = "DefaultJob"
 Maximum Concurrent Jobs = 20
 Type = Backup
 Level = Incremental
 Schedule = "WeeklyCycle"
 Messages = Standard
 Pool = Default
 Priority = 10
}

JobDefs {
 Name = "DefaultJob2"
 Maximum Concurrent Jobs = 20
 Type = Backup
 Level = Incremental
 Schedule = "WeeklyCycle2"
 Messages = Standard
 Pool = inc-pool
 Priority = 10
}

JobDefs {
 Name = "DefaultJob3"
 Maximum Concurrent Jobs = 20
 Type = Backup
 Level = Incremental
 Schedule = "WeeklyCycle3"
 Messages = Standard
 Pool = inc-pool
 Priority = 10
}

Job {
 Name = "RestoreFiles"
 Type = Restore
 Client= at0038-fd
 FileSet="at0038-FileSet"
 Storage = FileStorage
 Pool = Default
 Messages = Standard
 Where = /bacula/restores
 Priority = 11
 Maximum Concurrent Jobs = 20
}

Schedule {
 Name = "WeeklyCycle"
 Run = FullPool=fullbackup-pool Level=Full Pool=fullbackup-pool 1st fri at 23:05
 Run = DifferentialPool=diffbackup-pool Level=Differential Pool=diffbackup-pool 2nd-5th fri at 23:05
 Run = IncrementalPool=incbackup-pool Level=Incremental Pool=incbackup-pool sat,sun,mon,tue,wed,thu at 23:05
}

Schedule {
 Name = "WeeklyCycle2"
 Run = FullPool=full-pool Level=Full Pool=full-pool 1st fri at 23:05
 Run = DifferentialPool=diff-pool Level=Differential Pool=diff-pool 2nd-5th fri at 23:05
 Run = IncrementalPool=inc-pool Level=Incremental Pool=inc-pool sat,sun,mon,tue,wed,thu at 23:05
}

Schedule {
 Name = "WeeklyCycle3"
 Run = FullPool=full-pool Level=Full Pool=full-pool 1st fri at 21:05
 Run = DifferentialPool=diff-pool Level=Differential Pool=diff-pool 2nd-5th fri at 21:05
 Run = IncrementalPool=inc-pool Level=Incremental Pool=inc-pool sat,sun,mon,tue,wed,thu at 21:05
}

Schedule {
 Name = "WeeklyCycleAfterBackup"
 Run = Full sun-sat at 23:10
}

Storage {
 Name = FileStorage
 Maximum Concurrent Jobs = 1
 Address = at0038.local
 SDPort = 9103
 Password = "passworrd"
 Device = FileStorage
 Media Type = File
}

Messages {
 Name = Standard
 operatorcommand = "/usr/bin/bsmtp -h localhost -f bacula@at0038.local -s \"Bacula: Intervention needed for %j\" %r"
 mailcommand = "/usr/bin/bsmtp -8 -h localhost -f bacula@at0038.local -r it@mydomain.local -s \"%c %n %l %t: %e\" %r"
 mail = logwatch@mydomain.local = all, !skipped
 operator = logwatch@mydomain.local = mount
 console = all, !skipped, !saved
 append = "/var/log/bacula/bacula.log" = all, !skipped
}

Messages {
 Name = Daemon
 mailcommand = "/usr/bin/bsmtp -h localhost -f bacula@at0038.local -s \"Bacula daemon message\" %r"
 mail = logwatch@mydomain.local = all, !skipped
 console = all, !skipped, !saved
 append = "/var/log/bacula/bacula.log" = all, !skipped
}

Pool {
 Name = Default
 Pool Type = Backup
 Recycle = yes                       # Bacula can automatically recycle Volumes
 AutoPrune = yes                     # Prune expired volumes
 Volume Retention = 365 days         # one year
 Label Format = "default-${Year}${Month:p/2/0/r}${Day:p/2/0/r}-${Hour:p/2/0/r}${Minute:p/2/0/r}"
}

Pool {
 Name = Scratch
 Pool Type = Backup
}

Pool {
   Name = fullbackup-pool
   Pool Type = Backup
   Volume Retention = 200 days
   AutoPrune = yes
   Label Format = "fullbackup-${Job}-${Year}${Month:p/2/0/r}${Day:p/2/0/r}-${Hour:p/2/0/r}${Minute:p/2/0/r}${Second:p/2/0/r}"
   Use Volume Once = Yes
}

Pool {
   Name = diffbackup-pool
   Pool Type = Backup
   Volume Retention = 28 days
   AutoPrune = yes
   Label Format = "diffbackup-${Job}-${Year}${Month:p/2/0/r}${Day:p/2/0/r}-${Hour:p/2/0/r}${Minute:p/2/0/r}${Second:p/2/0/r}"
}

Pool {
   Name = incbackup-pool
   Pool Type = Backup
   Volume Use Duration = 6 days
   Volume Retention = 7 days
   AutoPrune = yes
   Label Format = "incbackup-${Job}-${Year}${Month:p/2/0/r}${Day:p/2/0/r}-${Hour:p/2/0/r}${Minute:p/2/0/r}${Second:p/2/0/r}"
}

Pool {
   Name = full-pool
   Pool Type = Backup
   Volume Retention = 200 days
   AutoPrune = yes
   Label Format = "${Job}-full-${Year}${Month:p/2/0/r}${Day:p/2/0/r}-${Hour:p/2/0/r}${Minute:p/2/0/r}${Second:p/2/0/r}"
   Use Volume Once = Yes
}

Pool {
   Name = diff-pool
   Pool Type = Backup
   Volume Retention = 28 days
   AutoPrune = yes
   Label Format = "${Job}-diff-${Year}${Month:p/2/0/r}${Day:p/2/0/r}-${Hour:p/2/0/r}${Minute:p/2/0/r}${Second:p/2/0/r}"
   Use Volume Once = Yes
}

Pool {
   Name = inc-pool
   Pool Type = Backup
   Volume Use Duration = 6 days
   Volume Retention = 7 days
   AutoPrune = yes
   Label Format = "${Job}-inc-${Year}${Month:p/2/0/r}${Day:p/2/0/r}-${Hour:p/2/0/r}${Minute:p/2/0/r}${Second:p/2/0/r}"
   Use Volume Once = Yes
}

@/etc/bacula/conf.d/at0036-dir.conf
@/etc/bacula/conf.d/at0038-dir.conf
@/etc/bacula/conf.d/at0089-dir.conf
@/etc/bacula/conf.d/at-inf-dir.conf
@/etc/bacula/conf.d/at-main-dir.conf
@/etc/bacula/conf.d/atrec-dir.conf
@/etc/bacula/conf.d/at-stack1-dir.conf
# @/etc/bacula/conf.d/at-tkp-dir.conf
@/etc/bacula/conf.d/vm-av-dir.conf
@/etc/bacula/conf.d/vm-bc-dir.conf
@/etc/bacula/conf.d/vm-dc-dir.conf
@/etc/bacula/conf.d/vm-fs-dir.conf
@/etc/bacula/conf.d/vm-ftp-dir.conf
# @/etc/bacula/conf.d/vm-netpromoter-dir.conf
# @/etc/bacula/conf.d/vm-netxms-dir.conf
@/etc/bacula/conf.d/vm-ns1-dir.conf
@/etc/bacula/conf.d/vm-ora-dir.conf
@/etc/bacula/conf.d/vm-proxy-dir.conf
@/etc/bacula/conf.d/vm-ras-dir.conf
@/etc/bacula/conf.d/vm-rt-dir.conf
@/etc/bacula/conf.d/vm-site-dir.conf
@/etc/bacula/conf.d/vm-smtp-dir.conf
@/etc/bacula/conf.d/vm-syslog-dir.conf
@/etc/bacula/conf.d/vm-ts-dir.conf
@/etc/bacula/conf.d/vm-ts2-dir.conf
@/etc/bacula/conf.d/vm-wsus-dir.conf
@/etc/bacula/conf.d/vm-www4-dir.conf
@/etc/bacula/conf.d/vm-www5-dir.conf