当前位置:首页文章首页 IT学院 IT技术

利用bacula完成数据的备份恢复

作者:  来源:  发布时间:2012-2-16 8:52:38  点击:
如不指定,默认会还原的原数据所在地
}
 
 
FileSet {                  #2.定义名为dbfs要备份的客户端数据,即指定需要备份哪些数据,需要排除哪些数据,可指定多个FileSet
  Name = "dbfs"
  Include {
    Options {
#     Compression=GZIP     #对备份文件进行gzip的压缩
      signature = MD5      #验证方式为MD5码的方式
    }
    File = /var/www       #指定客户端需要备份的文件或目录
  }
 
  Exclude {               #排除不需要备份的文件或目录
    File = /var/www/cgi-bin 
    File = /var/www/error
    File = /var/www/icons
  }
}
 
Schedule {                 #3.备份任务的执行时间策略,定义名为dbscd的备份任务调度策略
    Name = dbscd
    Run = Level=Full mon at 7:00         #在周一7点作一次全备份
    Run = Level=Full fri at 7:00         #在周五7点作一次全备份
    Run = Level=Differential sat at 7:00     #在周六7点作一次差异备份
    Run = Level=Differential sun at 7:00     #在周日7点作一次差异备份
    Run = Level=Differential tue-thu at 7:00     #在周二到周四7点作差异备份
}
 
#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
#}
 
#Schedule {
#  Name = "WeeklyCycleAfterBackup"
#  Run = Full sun-sat at 23:10
#}
 
FileSet {           
  Name = "Catalog"
  Include {
    Options {
      signature = MD5         
    }
    File = "/usr/local/bacula/var/bacula/working/bacula.sql"
  }
}
 
Client {                             #1.要备份的客户端
  Name = 2012-02-15-fd
  Address = 192.168.32.31
  FDPort = 9102
  Catalog = MyCatalog                 #记录客户机备份情况的日志名,后面Catalog逻辑段定义
  Password = "d1+RTcYIpa7YYB2/SrhRp/BAB7lBSF/Rl7wgrkSb52A2"          # Director与FD的验证密码,必须与bacula-fd.conf中密码相同
  File Retention = 30 days            # 指定保存在数据库中的记录多久循环一次,这里30天,只影响数据库中的记录,不影响备份的文件
  Job Retention = 6 months            # job的保持周期,应大于File Retention的值   
  AutoPrune = yes                     # 当达到指定的保存周期时,是否自动删除数据库中记录,yes表自动清除过期的job
}
 
 
 
Storage {                             #4.备份数据的存储介质和路径;Storage用来指定将客户端数据备份到哪个存储设备上。
  Name = dbsd
  Address = 192.168.32.30             #存储端SD的IP地址
  SDPort = 9103
  Password = "w6YqAfWkU7NMxRJ8s/8y5kUffGpysot4vt9HVQjE9bQy"  #Director端与SD的通讯密码,必须与bacula-sd.conf中Director段密码相同
  Device = dbdev                     #指定数据备份介质,必须与存储SD端的bacula-sd.conf中Device逻辑端的Name相同
  Media Type = File                  #指定数据备份介质类别,必须与存储SD端的bacula-sd.conf中Device逻辑端的Media Type相同
}
 
Catalog {               #Catalog逻辑段用来定义关于日志和数据库的设定
  Name = MyCatalog
  dbname = "bacula"; dbuser = "bacula"; dbpassword = ""
}
 
Messages {             #Messages逻辑段用来设定Director端如何保存日志,日志格式,可以将日志信息发送给管理员,要求开启sendmail服务。
  Name = Standard
 
  mailcommand = "/usr/local/bacula/sbin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: %t %e of %c %l\" %r"
  operatorcommand = "/usr/local/bacula/sbin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: Intervention needed for %j\" %r"
  mail = root@localhost = all, !skipped           
  operator = root@localhost = mount
  console = all, !skipped, !saved
  append = "/usr/local/bacula/var/bacula/working/log" = all, !skipped
  catalog = all
}
 
 
Messages {
  Name = Daemon
  mailcommand = "/usr/local/bacula/sbin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula daemon message\" %r"
  mail = root@localhost = all, !skipped           
  console = all, !skipped, !saved
  append = "/usr/local/bacula/var/bacula/working/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
#}
 
Pool {                                #6.定义job任务使用的池属性信息,如:设定文件过期时间,是否覆盖过去备份数据,是否自动清除过去备份等。

Tags:

备份恢复
首页 上一页 [1] [2] [3] [4] [5]  下一页 尾页

相关文章

文章评论

软件按字母排列: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z