當前位置:首頁文章首頁 IT學院 IT技術

利用bacula完成數(shù)據(jù)的備份恢復

作者:  來源:  發(fā)布時間:2012-2-16 8:52:38  點擊:
如不指定,默認會還原的原數(shù)據(jù)所在地
}
 
 
FileSet {                  #2.定義名為dbfs要備份的客戶端數(shù)據(jù),即指定需要備份哪些數(shù)據(jù),需要排除哪些數(shù)據(jù),可指定多個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.備份任務的執(zhí)行時間策略,定義名為dbscd的備份任務調(diào)度策略
    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            # 指定保存在數(shù)據(jù)庫中的記錄多久循環(huán)一次,這里30天,只影響數(shù)據(jù)庫中的記錄,不影響備份的文件
  Job Retention = 6 months            # job的保持周期,應大于File Retention的值   
  AutoPrune = yes                     # 當達到指定的保存周期時,是否自動刪除數(shù)據(jù)庫中記錄,yes表自動清除過期的job
}
 
 
 
Storage {                             #4.備份數(shù)據(jù)的存儲介質(zhì)和路徑;Storage用來指定將客戶端數(shù)據(jù)備份到哪個存儲設備上。
  Name = dbsd
  Address = 192.168.32.30             #存儲端SD的IP地址
  SDPort = 9103
  Password = "w6YqAfWkU7NMxRJ8s/8y5kUffGpysot4vt9HVQjE9bQy"  #Director端與SD的通訊密碼,必須與bacula-sd.conf中Director段密碼相同
  Device = dbdev                     #指定數(shù)據(jù)備份介質(zhì),必須與存儲SD端的bacula-sd.conf中Device邏輯端的Name相同
  Media Type = File                  #指定數(shù)據(jù)備份介質(zhì)類別,必須與存儲SD端的bacula-sd.conf中Device邏輯端的Media Type相同
}
 
Catalog {               #Catalog邏輯段用來定義關于日志和數(shù)據(jù)庫的設定
  Name = MyCatalog
  dbname = "bacula"; dbuser = "bacula"; dbpassword = ""
}
 
Messages {             #Messages邏輯段用來設定Director端如何保存日志,日志格式,可以將日志信息發(fā)送給管理員,要求開啟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任務使用的池屬性信息,如:設定文件過期時間,是否覆蓋過去備份數(shù)據(jù),是否自動清除過去備份等。

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