Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # For Bacula release 7.4.4 (28 September 2016) -- ubuntu 16.04
- Director { # define myself
- Name = node3-dir
- DIRport = 9101 # where we listen for UA connections
- QueryFile = "/etc/bacula/etc/query.sql"
- WorkingDirectory = "/etc/bacula/working"
- PidDirectory = "/etc/bacula/working"
- Maximum Concurrent Jobs = 20
- Password = "6qr5kCtSFwkbihSz6yOnszPpjcLU52UvTaRhGcfC0rpz" # Console password
- Messages = Daemon
- }
- JobDefs {
- Name = "DefaultJob"
- Type = Backup
- Level = Incremental
- Client = node3-fd
- FileSet = "Full Set"
- Schedule = "WeeklyCycle"
- Storage = node3-sd
- Messages = Standard
- Pool = File
- SpoolAttributes = yes
- Priority = 10
- Write Bootstrap = "/etc/bacula/working/%c.bsr"
- }
- # Define the main nightly save backup job
- # By default, this job will back up to disk in /tmp
- ###################################################备份任务开始##############################################################
- Job {
- Name = "BackupClient1"
- JobDefs = "DefaultJob"
- }
- ###################################################备份任务结束##############################################################
- ###################################################备份catalog开始##############################################################
- # Backup the catalog database (after the nightly save)
- Job {
- Name = "BackupCatalog"
- JobDefs = "DefaultJob"
- Level = Full
- FileSet="Catalog"
- Schedule = "WeeklyCycleAfterBackup"
- RunBeforeJob = "/etc/bacula/etc/make_catalog_backup.pl MyCatalog"
- RunAfterJob = "/etc/bacula/etc/delete_catalog_backup"
- Write Bootstrap = "/etc/bacula/working/%n.bsr"
- Priority = 11 # run after main backup
- }
- ###################################################备份catalog结束##############################################################
- ###################################################恢复任务开始##############################################################
- # 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=node3-fd
- FileSet="Full Set"
- Storage = node3-sd
- Pool = File
- Messages = Standard
- Where = /tmp/bacula-restores
- }
- ###################################################恢复任务结束##############################################################
- ###################################################FileSet and Schedule for backup 开始#########################################
- # List of files to be backed up
- FileSet {
- Name = "Full Set"
- Include {
- Options {
- signature = MD5
- }
- File = /opt/data
- }
- Exclude {
- File = /etc/bacula/working
- File = /proc
- File = /sys
- File = /.journal
- File = /.fsck
- }
- }
- # 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:55
- Run = Differential 2nd-5th sun at 23:55
- Run = Incremental mon-sat at 23:55
- }
- ###################################################FileSet and Schedule for backup 结束#########################################
- ###################################################FileSet and Schedule for catalog 开始#########################################
- # This schedule does the catalog. It starts after the WeeklyCycle
- Schedule {
- Name = "WeeklyCycleAfterBackup"
- Run = Full sun-sat at 23:10
- }
- # This is the backup of the catalog
- FileSet {
- Name = "Catalog"
- Include {
- Options {
- signature = MD5
- }
- File = "/etc/bacula/working/bacula.sql"
- }
- }
- ###################################################FileSet and Schedule for catalog 结束#########################################
- ###################################################client and storage for backup 开始 #########################################
- Client {
- Name = node3-fd
- Address = 127.0.0.1
- FDPort = 9102
- Catalog = MyCatalog
- Password = "kOOKp2AtxshoIxlemTDTvUH/awCzUjIarNEShhkh1O/N"
- File Retention = 60 days # 60 days
- Job Retention = 6 months # six months
- AutoPrune = yes # Prune expired Jobs/Files
- }
- # Definition of file Virtual Autochanger device
- Storage {
- Name = node3-sd
- Address = 127.0.0.1 # N.B. Use a fully qualified name here
- SDPort = 9103
- Password = "W7MaQtFIK93RooiQO5JgM3kThDURwEDTg9pTe+YHvSEi"
- Device = FileChgr1
- Media Type = File1
- Maximum Concurrent Jobs = 10 # run up to 10 jobs a the same time
- }
- ###################################################client and storage for backup 结束#############################################
- # Generic catalog service
- Catalog {
- Name = MyCatalog
- dbname = "bacula"; dbuser = "root"; dbpassword = "123456"
- }
- Messages {
- Name = Standard
- mailcommand = "/etc/bacula/sbin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: %t %e of %c %l\" %r"
- operatorcommand = "/etc/bacula/sbin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: Intervention needed for %j\" %r"
- mail = yangvipguang@126.com = all, !skipped
- operator = yangvipguang@126.com = mount
- console = all, !skipped, !saved
- append = "/opt/bacula/log/bacula.log" = all, !skipped
- catalog = all
- }
- # Message delivery for daemon messages (no job).
- Messages {
- Name = Daemon
- mailcommand = "/etc/bacula/sbin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula daemon message\" %r"
- mail = yangvipguang@126.com = all, !skipped
- console = all, !skipped, !saved
- append = "/opt/bacula/log/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
- Maximum Volume Bytes = 50G # Limit Volume size to something reasonable
- Maximum Volumes = 100 # Limit number of Volumes in Pool
- }
- # 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
- Label Format = "Vol-" # Auto label
- }
- # Scratch pool definition
- Pool {
- Name = Scratch
- Pool Type = Backup
- }
- #
- # Restricted console used by tray-monitor to get the status of the director
- #
- Console {
- Name = node3-mon
- Password = "p1xpiAIBT8RR4s1EPbG/ijpV/43y7DkHiHboFYYTbjqi"
- CommandACL = status, .status
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement