Catalog告诉dir去哪里找数据库 Catalog { Name = dbcatalog dbname = bacula user = bacula password = xxxxxxxxx DB Address = 202.120.x.x #不要用localhost DB Port = 3306 }
Pool告诉dir使用哪个Pool备份数据,这个概念比较搞,到配置job的时候会清晰一点。 Pool{ Name = dbpool Pool Type = Backup Maximum Volume Jobs = 1 #每次备份使用一个文件 Recycle = yes #重复使用 AutoPrune = yes #自动清除 Volume Retention = 15 days #备份保留时间 Maximum Volumes = 30 #最多保存多少个文件 Recycle Current Volume = yes #使用最近过期的文件存储新备份 #文件如何命名,下面的格式会产生如下的命名形式db-2004-03-19-id20 Label Format = "db-${Year}-${Month:p/2/0/r}-${Day:p/2/0/r}-id${JobId}" } Message项目告诉dir如何保存log,以及保存格式 Messages { Name = Standard # mailcommand = "/usr/local/bacula/bin/smtp -h 202.120.x.x -f /"/(Bacula/) %r/ " -s /"Bacula: %t %e of %c %l/" %r" # operatorcommand = "/usr/local/bacula/bin/smtp -h 202.120.x.x -f /"/(Bacula/) %r/" -s /"Bacula: Intervention needed for %j/" %r" # mail = root@202.120.x.x = all, !skipped # operator = root@202.120.x.x = 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. # append = "/var/log/bacula.log" = all, !skipped append ="/var/log/bacula.err.log" = error, warning, fatal } 我保留了两份log,一份包括所有信息,一份只包括错误信息 可以看到,bacula支持把log发到邮箱中~~被我注释掉了。
Job是上面所有配置的一个组合,给用户最大的灵活性配置 Job { Name = dbjob Type = Backup #还有restore之类的类型,也有一些其它选项,可以实现一 些很有意思的功能 Level = Full #默认备份程度,schedule中的配置会覆盖这里的选择 Client = dbfd FileSet = dbfs Messages = Standard Pool = dbpool Storage = dbsd Schedule = dbscd #如果没有指定schedule,默认不运行,可以通过console 调度 } 还有一个counter的配置。。不配置他也能运行,不说了