本文共 3690 字,大约阅读时间需要 12 分钟。
Name =dbsd // 这里要与director配置文件的storage的name一样 SDAddress=10.10.2.226 // 这里是SD的IP
WorkingDirectory = "/var/bacula/working" Pid Directory = "/var/run" Maximum Concurrent Jobs = 20 //job 的最大连接数 Name =linux-0fdr-dir // 这里要与directory的name相同 Password = "5jipKA7pekDel6BUjgIwD3LkPPBgxcecbLpLfl9puj0c " // 这里与directory中storage的password相同 Password = "MJ8SyFywMm+4ntJf2EupggRWIWE6LozmLfIKC8J9nYt7" Name =dbdev // 这里要与directory中storage的device一样 Media Type = File // 这里要与diretory中storage的Media Type相同 Archive Device =/home/bakcup/ // 备份的路径
director = linux-0fdr-dir = all Name = linux-0fdr-dir // 这里要与directory的name相 同 address = 10.10.2.226 //console 端的IP
Password = "MJ8SyFywMm+4ntJf2EupggRWIWE6LozmLfIKC8J9nYt7" // 这个密码要与directory的password一样
4.启动bacula的进程
在server端,只启动directory和storage的进程,启动命令如下: 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. 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.
二. bacula在client服务器上的安装和配置
1.安装bacula
#tar zxvf bacula-2.4.3.tar.gz
#./configure --enable-client-only
2.bacula的配置
#####################################################################
Name = linux-0fdr-dir //directory
Password = "Nd+Yuqe+Kd5wBc1S9uMTEGTNqNIe1cupnfuOdwboej6Z"//directory
Password = "MJ8SyFywMm+4ntJf2EupggRWIWE6LozmLfIKC8J9nYt7"
FDAddress=10.10.2.162 //IP
WorkingDirectory = /var/bacula/working
Maximum Concurrent Jobs = 20
3.启动bacula的fd进程
三.备份以及还原过程.
经过艰辛万苦终于走到了这一步,不容易啊,好现在备份下10.10.2.162的/home/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.
Automatically selected Catalog: dbcatalog
Using Catalog "dbcatalog"
A job name must be specified.
The defined Job resources are:
Select Job resource (1-2): 1
Pool: dbpool (From Job resource)
Storage: dbsd (From Job resource)
When: 2009-08-25 15:23:14
OK to run? (yes/mod/no): yes
54 | dbjob | 2009-08-25 15:23:18 | B | F | 0 | 0 | R | //这里会出现一个列表,我当前只复制 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
本文转自wiliiwin 51CTO博客,原文链接:http://blog.51cto.com/wiliiwin/199295 转载地址:http://rbzfx.baihongyu.com/