Bacula Configuration instance of open Source network backup software

Source: Internet
Author: User
Tags log md5 tmp file bacula backup

Configure the Bacula backup system, in fact, is the director-side configuration file bacula-dir.conf, SD profile bacula-sd.conf, The client FD Profile bacula-fd.conf and the console-side configuration file bconsole.conf are configured.

According to the above installation deployment, the director end, SD, The console end is centered on one server baculaserver (i.e. 192.168.12.188), and the client FD is deployed on the baculaclient (that is, 192.168.12.189) server, and the configuration process is described in detail below.

First, configure the console side of the Bacula
The configuration file on the console side is bconsole.conf, the configuration file is simple and the configured files are as follows:

Director {  
  Name = F10-64-build-dir  #控制端名称, bacula-dir.conf and bacula-sd.conf below  
#文件中会陆续的被引用  
  dirport = 9101    #控制端服务端口 Address  
  = 192.168.12.188  #控制端服务器IP地址  
  Password = "oudao0sgxx/f+tx4yygkk4so0l/ ieqgjikq5dmstqh6t "
#控制端密码文件   
}

Second, configure the director end of Bacula
Bacula-dir.conf is a director-side configuration file and Bacula's core configuration file, which is very complex and is divided into 10 logical segments, respectively:

 Director, defines the global settings  
 Catalog, defines the background database  
 jobdefs, defines the default execution task  
 job, customizes a backup or restore task  
 Fileset, defines which data to back up, does not back up which data  
 Schedule, defining backup time Policies  
 Pool, define the pools attribute Client to be used by the job  
 , define the host address Storage to be backed up  
 , define how the data is stored  
 Messages, and define where to send the log reports and log records

Code Listing 1 is a configured file, where the "#" number is followed by a comment.

Code Listing 1 configuration files that have been set up on the director side

Director {#定义bacula的全局配置 Name = f10-64-build-dir Dirport = 9101 #定义Di Rector Listening Port queryfile = "/opt/bacula/etc/query.sql" workingdirectory = "/opt/bacula/var/bacula/working" PidDirecto ry = "/var/run" Maximum Concurrent Jobs = 1 #定义一次能处理的最大并发数 #验证密码, this password must be the corresponding bconsole.conf logical section in the director file.  
  Code same Password = "oudao0sgxx/f+tx4yygkk4so0l/ieqgjikq5dmstqh6t" #定义日志输出方式, "Daemon" is defined in the following messages logical segment Messages = Daemon} Job {#自定义一个备份任务 Name = "Client1" #备份任务名称 Client = DBFD #指定要备份的客户端主机, " DBFD "In the following client logical segment #进行定义 level = Incremental #定义备份的级别, incremental for incremental backups.                  The level value # can be full (complete backup), incremental (incremental backup) and differential (differential backup), if the first # times do not have a full backup, then perform a full backup after the incremental Type = Backup #定义Job的类型, "Backup" is a backup task, optional #的类型还有restore和verify等 fileset = dBFS #指定要备份的客户端数据, "dBFS" in the back Fileset #逻辑段中进行 Definition Schedule = dbscd #指定这个备份任务的执行时间策略, "DBSCD" in #后面的SchedThe Ule logical segment is defined Storage = Dbsd #指定备份数据的存储路径与介质, "Dbsd" in the later #面的Storage逻辑段中进行定义 Messages = Standard Pool = Dbpoo  
  L #指定备份使用的pool属性, "Dbpool" is defined in the following # Pool logical segment. Write Bootstrap = "/OPT/BACULA/VAR/BACULA/WORKING/CLIENT2.BSR" #指定备份的引导信息路径} Job {#定义一个名为Client的  
  The task Name of the differential backup = "Client" Type = Backup Fileset = dBFS Schedule = dbscd Storage = Dbsd Messages = Standard Pool = Dbpool Client = DBFD level = Differential #指定备份级别为差异备份 Write Bootstrap = "/opt/bacula/var/bacula  
  /WORKING/CLIENT1.BSR '} Job {#定义一个名为BackupCatalog的完全备份任务 Name = ' backupcatalog ' Type = Backup  Level = Full #指定备份级别为完全备份 Client = DBFD fileset= "dBFS" Schedule = "dbscd" Pool = dbpool Storage = Dbsd Messages = Standard runbeforejob = "/opt/bacula/etc/make_catalog_backup bacula bacula" runafterjob = "/opt/ Bacula/etc/delete_catalog_backup "Write Bootstrap ="/opt/var/bacula/working/backupcatalOG.BSR '} Job {#定义一个还原任务 Name = ' restorefiles ' Type = Restore #定义Job的类型为 Restore, that is, recover data client=dbfd fileset=dbfs Storage = Dbsd Pool = Dbpool Messages = Standard Where =/tmp/bacula-restores #指定默认恢复数据到这个路径} fileset {#定义一个名为dbfs的备 Resources, that is, specify what data needs to be backed up, which #些数据等 to exclude, you can specify multiple fileset Name = dBFS Include {Options {signature = MD5; Compression=gzip; #表示使用MD5签名并压缩 File =/cws3 #指定客户端FD需要备份的文件目录} Exclude {#通过Exclude排除不需要备份的文件或者目录, can root Modify FILE =/opt/bacula/var/bacula/working File =/tmp file =/proc File =/tmp file =//. Journal File =/.fsck}} Schedule {#定义一个名为dbscd的备份任务调度策略 Name = dbscd Run = Full 1st s Un at 23:05 #第一周的周日晚23:05 minutes Full Backup Run = Differential 2nd-5th Sun at 23:05 #第2 ~5 week Sunday 23:05 differential backup run = Incremental Mon-sat AT 23:05 #所有周一至周六晚23:05 min for Incremental backup} fileset {Name = "Catalog" Include {Options {Signat ure = MD5} File =/opt/bacula/var/bacula/working/bacula.sql} Client {#Client用来定       Semantic backup which client FD data Name = DBFD #Clinet的名称, you can call address = 192.168.12.189 #要备份的客户端FD主机的IP地址 Fdport = 9102 in the previous job #与客户端FD通信的端口 Catalog = MyCatalog #使用哪个数据库存储信息, "MyCatalog" in the back #的MyCatalog逻辑段中进行定义 Password = "OUDAO0SGX  x/f+tx4yygkk4so0l/ieqgjikq5dmstqh6t "#Director端与客户端FD #的验证密码, this value must be the same as the password in the client FD profile bacula-fd.conf file Retention = 30 Days #指定保存在数据库中的记录多久循环一次, here is 30 day, only #影响数据库中的记录不影响备份的文件 Job Retention = 6 months #指定Job的保持周期, should be greater than the file Retention specified Value Autoprune = yes #当达到指定的保持周期时, whether records in the database are automatically deleted, #yes表示自动清除过期的Job} Client {Name = dbfd1 Add ress = 192.168.12.188 Fdport = 9102 Catalog = MyCatalog Password = "Wr8lj3q51pgz21u2fsatxicyhlmqkt1xhhbm8a6/j8bz "File Retention = days Job Retention = 6 months Autoprune = yes} Storage {# Storage is used to define which storage device the client's data is backed up to, Name = Dbsd address = 192.168.12.188 #指定存储端SD的IP地址 Sdport = 9103 #指定存储端SD通信的端口 Password = "oudao0sgxx/f+tx4yygkk4so0l/ieqgjikq5dmstqh6t" #Director端与存储端 #SD的验证密码, this value must be associated with the storage-side SD Director logical segment password #相同 Device = Dbdev #指定数据备份的存储介质 in profile bacula-sd.conf must be #的bacula 192.168.12.188 configuration file with the storage side (here is-sd.conf) Device the "name" item name of the logical segment is the same as the Media Type = File #指定存储介质的类别, it must be associated with the storage-side SD (here is 192.168.12.188) #的bacula the "Device" logical segment of the-sd.conf configuration file. The Media Type item name is the same} Catalog {# Catalog logical segment is used to define the log and database settings name = MyCatalog dbname = "Bacula" ; Dbuser = "Bacula"; Dbpassword = "" #指定库名, username, and password} Messages {# Messages logical segments are used to set the director side how to save the log, and the save format for the log, #可以将日志信息发送到管理员邮箱, provided that you must Open SendMail Service Name = Standard Mailcommand = "/usr/sbin/bsmtp-h localhost-f \" \ (bacula\) \<%r\>\ "-s \" Bacula : %T%e of%c%l\ "%r" Operatorcommand = "/usr/sbin/bsmtp-h localhost-f \" \ (bacula\) \<%r\>\ "-s \" Bacula:intervent 
  Ion needed for%j\ "%r" mail = dba.gao@gmail.com = all,!skipped operator = exitgogo@126.com = Mount console = All,!skipped,!saved append = "/opt/bacula/log/bacula.log" = All,!skipped #定义bacula的运行日志 append = "O Pt/bacula/log/bacula.err.log "= error,warning, fatal #定义bacula的错误日志 Catalog = all} Messages {#定义了一个名为Daemon Messages logical segment, "Daemon" has #在前面进行了引用 Name = Daemon Mailcommand = "/usr/sbin/bsmtp-h localhost-f \" \ (bacula\) \< %r\>\ "-s \" Bacula daemon message\ "%r" mail = exitgogo@126.com = all,!skipped console = all,!skipp ed,!saved append = "/opt/bacula/log/bacula_demo.log" = All,!skipped} Pool {#定义供Job任务使用的池属性信息, for example, set       
  Set backup file expiration time, #是否覆盖过期的备份数据, automatically clear expired backups, and so on Name = Dbpool Pool Type = Backup Recycle = yes #重复使用 Autoprune = yes                #表示自动清除过期备份文件 Volume Retention = 7 days #指定备份文件保留的时间 Label Format = "db-${year}-${month:p/2/ 0/r}-${day:p/2/0/r}-id${jobid} "#设定备份文件的 #命名格式, this format will produce the named file as: db-2010-04-18-id139 Maximum volumes = 7 #设置最多保存多少个备份 File Recycle Current Volume = yes #表示可以使用最近过期的备份文件来存储新备份 Maximum Volume Jobs = 1 #表示每次执行备份任务创建一个备份文件} Co Nsole {#限定Console利用tray-monitor get director status information Name = F10-64-build-mon Password = "rsqy3srjak3ktz8hr07gc728v Kzhbr0qcjoc5x3pxeap "Commandacl = status,. Status}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.