关于bacula网络备份软件的安装以及配置2

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
上一篇:自定义标签实现网站权限的控制


下一篇:[HTML]去除li前面的小黑点,和ul、LI部分属性