博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
关于bacula网络备份软件的安装以及配置2
阅读量:5791 次
发布时间:2019-06-18

本文共 3690 字,大约阅读时间需要 12 分钟。

SD
配置:

 

Storage {
                           

  Name =dbsd         //
这里要与director配置文件的storagename一样

  SDAddress=10.10.2.226   //
这里是SDIP

  SDPort = 9103                  

  WorkingDirectory = "/var/bacula/working"

  Pid Directory = "/var/run"

  Maximum Concurrent Jobs = 20   //job
的最大连接数

}

 

Director {

  Name =linux-0fdr-dir     //
这里要与directoryname相同

  Password = "5jipKA7pekDel6BUjgIwD3LkPPBgxcecbLpLfl9puj0c "  //
这里与directorystoragepassword相同

}

 

Director {
                //
这个是做监控的配置

  Name = linux-0fdr-dir 

  Password = "MJ8SyFywMm+4ntJf2EupggRWIWE6LozmLfIKC8J9nYt7"

  Monitor = yes

 

Device {

  Name =dbdev         //
这里要与directorystoragedevice一样

  Media Type = File   //
这里要与diretorystorageMedia Type相同

  Archive Device =/home/bakcup/       //
备份的路径

  LabelMedia = yes;                  

  Random Access = Yes;

  AutomaticMount = yes;              

  RemovableMedia = no;

  AlwaysOpen = no;

}

 

Messages {

  Name = Standard

  director = linux-0fdr-dir = all

}

 

console
端的配置:

 

Director {

  Name = linux-0fdr-dir     //
这里要与directoryname相 同
                            

  DIRport = 9101

  address = 10.10.2.226     //console
端的IP

  Password = "MJ8SyFywMm+4ntJf2EupggRWIWE6LozmLfIKC8J9nYt7" 

             //
这个密码要与directorypassword一样                                                          

}

 

4.启动bacula的进程

server,只启动directorystorage的进程,启动命令如下:

#./bacula-ctl-dir  start

#./bacula-ctl-sd  start

 

启动之后,要给bacula
添加存储介质,

linux-0fdr:/etc/bacula # ./bconsole

Connecting to Director 10.10.2.226:9101

1000 OK: linux-0fdr-dir Version: 2.4.3 (10 October 2008)

Enter a period to cancel a command.

*label

Automatically selected Catalog: dbcatalog

Using Catalog "dbcatalog"

Automatically selected Storage: dbsd

Enter new Volume name: woyun                  //
这里随便给他起个卷名

Automatically selected Pool: dbpool

Connecting to Storage daemon dbsd at 10.10.2.226:9103 ...

Sending label command for Volume "test" Slot 0 ...

3000 OK label. VolBytes=188 DVD=0 Volume="test" Device="dbdev" (/home/bakcup/)

Catalog record for Volume "test", Slot 0  successfully created.

Requesting to mount dbdev ...

3906 File device "dbdev" (/home/bakcup/) is always mounted.

You have messages.

 

注意:上面黄色底红色字的为要输入的内容.
 

二.    baculaclient服务器上的安装和配置

1.安装bacula

#tar zxvf  bacula-2.4.3.tar.gz

# cd bacula-2.4.3

#./configure --enable-client-only

#make&&make install

默认安装在/etc/bacula/目录下

 

2.bacula的配置

#more bacula-fd.conf

 

#####################################################################

 

FD配置:

 

Director

  Name = linux-0fdr-dir     //directory

  Password = "Nd+Yuqe+Kd5wBc1S9uMTEGTNqNIe1cupnfuOdwboej6Z"//directory

 

}

 

Director {
                //
这个是做监控的配置

  Name = linux-0fdr-mon

  Password = "MJ8SyFywMm+4ntJf2EupggRWIWE6LozmLfIKC8J9nYt7"

  Monitor = yes

}

 

FileDaemon {
                        

  Name = dbfd            //diretory

  FDport = 9102

  FDAddress=10.10.2.162   //IP               

  WorkingDirectory = /var/bacula/working

  Pid Directory = /var/run

  Maximum Concurrent Jobs = 20

}

 

3.启动baculafd进程

   #bacula-ctl-fd start

 

.备份以及还原过程.

经过艰辛万苦终于走到了这一步,不容易啊,好现在备份下10.10.2.162/home/bacula这个目录,操作如下:

#./bacula

 

Connecting to Director 10.10.2.226:9101

1000 OK: linux-0fdr-dir Version: 2.4.3 (10 October 2008)

Enter a period to cancel a command.

*run

Automatically selected Catalog: dbcatalog

Using Catalog "dbcatalog"

A job name must be specified.

The defined Job resources are:

     1: dbjob

     2: restrory

Select Job resource (1-2): 1

Run Backup job

JobName:  dbjob

Level:    Full

Client:   dbfd

FileSet:  dbfs

Pool:     dbpool (From Job resource)

Storage:  dbsd (From Job resource)

When:     2009-08-25 15:23:14

Priority: 10

OK to run? (yes/mod/no): yes

Job queued. JobId=54

*list jobs

54 | dbjob    | 2009-08-25 15:23:18 | B    | F     |        0 |          0 | R         |      //这里会出现一个列表,我当前只复制
                             最新的一个JOBID,这里注意红色的R表示已
                             经在运行了,要是E或者C就是有问题了,要
                             是T就表示复制完成了.
*status

Status available for:

     1: Director

     2: Storage

     3: Client

     4: All

Select daemon type for status (1-4): 3

Automatically selected Client: dbfd

Connecting to Client dbfd at 10.10.2.162:9102

………………………………………………………  //

 
54  Full      1,628    9.773 M  OK       25- 8?009 15:27 dbjob

                              OK
 
本文转自wiliiwin 51CTO博客,原文链接:http://blog.51cto.com/wiliiwin/199295

转载地址:http://rbzfx.baihongyu.com/

你可能感兴趣的文章
getResourceAsStream的3种路径配置
查看>>
switch语句小练习
查看>>
组合逻辑电路
查看>>
POP-一个点击带有放大还原的动画效果
查看>>
UE4材质是什么样的机制
查看>>
使用QTP录制自带Flight小实例
查看>>
JProfiler学习笔记
查看>>
Loadrunner脚本编程(4)-数据类型操作和字符串操作
查看>>
STL 算法
查看>>
分享:Backbone.js 样例站点与入门指南
查看>>
图的基本算法
查看>>
《架构之美》摘录三
查看>>
HTML基础(一)
查看>>
boost.circular_buffer简介
查看>>
Database Appliance并非Mini版的Exadata-还原真实的Oracle Unbreakable Database Appliance
查看>>
网页图片缩放(js)
查看>>
Perl开发的几个小注意事项
查看>>
实现hive proxy1-hive认证实现
查看>>
设计和使用维护计划
查看>>
Shiro 基础教程
查看>>