- 论坛徽章:
- 0
|
定义将客户机的数据保存到哪个存储设备,可以定义多个
Storage {
Name = storage_mail #必须与bacula-sd.conf配置文件里的Name = storage_mail相同
Address = 192.168.0.210 #安装sd服务的服务器ip
SDPort = 9103
Password = "" #访问sd服务器的口令
Device = storage1 #必须与192.168.0.210机器里bacula-sd.conf配置件里的Device { Name = storage1相同。
Media Type = File #必须与bacula-sd.conf配置文件里的Device {Media Type = File相同,这是指定备份介质的地方,最好直接写存储设备名,例“HP DLT8000”,如果有多个相同的存储设备存在,你最好做个区分,这里只标记一个唯一的设备。
Autochanger = yes # enable for autochanger device
定义给Job使用的池属性,即是否循环覆盖备份数据,是否自动清除过期的备份,循环的过期时间
Pool {
Name = Default
Pool Type = Backup #与Job里的Type协调可用值Archive,Cloned,Migration,Copy,Save
Recycle = yes # Bacula can automatically recycle Volumes
AutoPrune = yes # Prune expired volumes
Volume Retention = 365 days # one year
}
定义调度时间,每个时间表都可以定义多个Level执行的时间,Job资源的Level=对应那个级别就按哪个时间执行
Schedule {
Name = "backup_WeeklyCycle"
Run = Full 1st sun at 23:05 #定义全备份的时间
Run = Differential 2nd-5th sun at 23:05 #定义差异备份的时间
Run = Incremental mon-sat at 23:05 这里定义的模式和Job资源的Level对应,相应的Level=Incremental按照这里的定时执行。
}
Schedule {
Name = "restore_WeeklyCycle"
Run = Full 1st sun at 23:05
}
定义后台数据库,否则启动不了
Catalog {
Name = MyCatalog
dbname = bacula; user = bacula; password = ""
DB Address = 192.168.0.210 #不要用localhost
DB Port = 33060
}
定义发送报告邮件和记录日志的位置
Messages {
Name = backup_messages #为备份客户端mail主机提供的messages资源。其他客户机改其他名字就行了,下面可以改其他管理员的邮箱,多人用“,”分隔。
mailcommand = "/opt/Rhythm_backup/sbin/bsmtp -h 211.155.251.234 -f \"\(Rhythm_backup备份报告\) %r\" -s \"备份结果: %t %e of %c %l\" %r"
operatorcommand = "/opt/Rhythm_backup/sbin/bsmtp -h 211.155.251.234 -f \"\(Rhythm_backup备份报告\) %r\" -s \"Rhythm_backup: Intervention needed for %j\" %r"
mail = xiaoran.shen@foundir.com = all, !skipped
operator = xiaoran.shen@foundir.com = mount
console = all, !skipped, !saved
append = "/opt/Rhythm_backup/var/log/Rhythm_backup.log" = all, !skipped
append ="/opt/Rhythm_backup/var/log/Rhythm_backup_err.log" = error, warning, fatal
}
Messages {
Name = restore_messages #恢复用的messages
mailcommand = "/opt/Rhythm_backup/sbin/bsmtp -h 211.155.251.234 -f \"\(Rhythm_backup恢复报告\) %r\" -s \"恢复结果: %t %e of %c %l\" %r"
operatorcommand = "/opt/Rhythm_backup/sbin/bsmtp -h 211.155.251.234 -f \"\(Rhythm_backup恢复报告\) %r\" -s \"Rhythm_backup: Intervention needed for %j\" %r"
mail = xiaoran.shen@foundir.com = all, !skipped
operator = xiaoran.shen@foundir.com = mount
console = all, !skipped, !saved
append = "/opt/Rhythm_backup/var/log/Rhythm_backup.log" = all, !skipped
append ="/opt/Rhythm_backup/var/log/Rhythm_backup_err.log" = error, warning, fatal
}
参考资料:
http://man.chinaunix.net/network/bacula/bacula_manual/Messages_Resource.html
限制console利用tray-monitor获得director的状态信息
Console {
Name = backup_server-mon
Password = ""
CommandACL = status, .status
}
注:JobACL = “mail”,”ftp”定义多个job时用,分隔。没有这个console就不能访问Job资源其他可用访问的资源都是这样定义,如下ClientACL,StorageACL,ScheduleACL,PoolACL,FileSetACL,CatalogACL,CommandACL。
4.5 配置SD(storage)端
必须定义的资源:
- Storage -- to define the name of the Storage daemon.
- Director -- to define the Director's name and his access password.
- Device -- to define the characteristics of your storage device (tape drive).
- Messages -- to define where error and information messages are to be sent.
|
|