燃烧的小明 发表于 2012-09-20 18:36

请教一个bacula的问题,顺便问问小型机房的备份方案

在bacula传输中,可以备份本机的的数据,本机跑得也有fd,但是不能备份另外一台机器上面的数据。
在bconsole下用status看client状态,可以正常显示另外一台机器的信息,但是在备份的过程中,就显示了以下的错误。
name 和密码校对了好多次了,应该没有写错。请教大神啊
另外问一下除了bacula还有没有别的比较好的开源的备份软件, 给一个小型IDC机房备份用的,跑的有glusterFS,ESX4.1, mysql ,还有很多处理的程序。大概几十台服务器吧。
有没有比较好的解决方案,谢谢啊


04-Aug 12:57 lnmp-test-server-255-240-dir JobId 26: Start Backup JobId 26, Job=puppetclient.test.com-fd.2012-08-04_12.57.53_13
04-Aug 12:57 lnmp-test-server-255-240-dir JobId 26: Using Device "FileStorage"
20-Sep 17:35 puppetclient.test.com- JobId 26: Fatal error: Failed to connect to Storage daemon: lnmp-test-server-255-240:9103
04-Aug 12:57 lnmp-test-server-255-240-dir JobId 26: Fatal error: Bad response to Storage command: wanted 2000 OK storage
, got 2902 Bad storage

04-Aug 12:57 lnmp-test-server-255-240-dir JobId 26: Error: Bacula lnmp-test-server-255-240-dir 5.0.1 (24Feb10): 04-Aug-2012 12:57:55
Build OS:               i686-pc-linux-gnu ubuntu 10.04
JobId:                  26
Job:                  puppetclient.test.com-fd.2012-08-04_12.57.53_13
Backup Level:         Full
Client:               "puppetclient.test.com-fd" 5.0.1 (24Feb10) i686-pc-linux-gnu,ubuntu,10.04
FileSet:                "Full Set" 2012-08-04 10:46:14
Pool:                   "Default" (From Job resource)
Catalog:                "MyCatalog" (From Client resource)
Storage:                "File" (From Job resource)
Scheduled time:         04-Aug-2012 12:57:51
Start time:             04-Aug-2012 12:57:55
End time:               04-Aug-2012 12:57:55
Elapsed time:         0 secs
Priority:               10
FD Files Written:       0
SD Files Written:       0
FD Bytes Written:       0 (0 B)
SD Bytes Written:       0 (0 B)
Rate:                   0.0 KB/s
Software Compression:   None
VSS:                  no
Encryption:             no
Accurate:               no
Volume name(s):         
Volume Session Id:      4
Volume Session Time:    1344055123
Last Volume Bytes:      229 (229 B)
Non-fatal FD errors:    0
SD Errors:            0
FD termination status:Error
SD termination status:Waiting on FD
Termination:            *** Backup Error ***




bacula-dir.conf的配置说明
#For Bacula release 5.0.1 (24 February 2010) -- ubuntu 10.04
#
#You might also want to change the default email address
#   from root to your address.See the "mail" and "operator"
#   directives in the Messages resource.
#

Director {                            # define myself
Name = lnmp-test-server-255-240-dir
DIRport = 9101                # where we listen for UA connections
QueryFile = "/usr/local/bacula/bin/query.sql"
WorkingDirectory = "/usr/local/bacula/bin/working"
PidDirectory = "/usr/local/bacula/bin/working"
Maximum Concurrent Jobs = 1
Password = "4b6UT204WBnypeks4z7b9ZDqseuGHtsIdQRanc8Z9sS1"         # Console password
Messages = Daemon
}

JobDefs {
Name = "DefaultJob"
Type = Backup
Level = Incremental
Client = lnmp-test-server-255-240-fd
FileSet = "Full Set"
Schedule = "WeeklyCycle"
Storage = File
Messages = Standard
Pool = File
Priority = 10
Write Bootstrap = "/usr/local/bacula/bin/working/%c.bsr"
}


#
# Define the main nightly save backup job
#   By default, this job will back up to disk in /tmp
Job {
Name = "BackupClient1"
JobDefs = "DefaultJob"
}


Job {
Name = "BackupClient2"
Client = puppetclient.test.com-fd
JobDefs = "DefaultJob"
}

# Backup the catalog database (after the nightly save)
Job {
Name = "BackupCatalog"
JobDefs = "DefaultJob"
Level = Full
FileSet="Catalog"
Schedule = "WeeklyCycleAfterBackup"
# This creates an ASCII copy of the catalog
# Arguments to make_catalog_backup.pl are:
#make_catalog_backup.pl <catalog-name>
RunBeforeJob = "/usr/local/bacula/bin/make_catalog_backup.pl MyCatalog"
# This deletes the copy of the catalog
RunAfterJob= "/usr/local/bacula/bin/delete_catalog_backup"
Write Bootstrap = "/usr/local/bacula/bin/working/%n.bsr"
Priority = 11                   # run after main backup
}

#
# Standard Restore template, to be changed by Console program
#Only one such job is needed for all Jobs/Clients/Storage ...
#
Job {
Name = "RestoreFiles"
Type = Restore
Client=lnmp-test-server-255-240-fd
FileSet="Full Set"
Storage = File
Pool = Default
Messages = Standard
Where = /tmp/bacula-restores
}

#test-247
Job {
Name = "puppetclient.test.com-fd"
Type = Backup
Level = full
Client = puppetclient.test.com-fd
FileSet = "Full Set"
Messages = Standard
Pool = Default
Storage = File
Schedule = "WeeklyCycleAfterBackup"
Priority = 10
Write Bootstrap = "/usr/local/bacula/working/puppetclient.test.com-fd.bsr"
}
Job {
Name = "puppetclient.test.com-fd-restore"
Type = Restore
Client = puppetclient.test.com-fd
FileSet = "Full Set"
Storage = File
Pool = Default
Messages = Standard
Where = /opt/restore
Bootstrap = "/usr/local/bacula/working/test-247-backup.bsr"
}
# List of files to be backed up
FileSet {
Name = "Full Set"
Include {
    Options {
      signature = MD5
    }
#   
#Put your list of files here, preceded by 'File =', one per line
#    or include an external list with:
#
#    File = <file-name
#
#Note: / backs up everything on the root partition.
#    if you have other partitions such as /usr or /home
#    you will probably want to add them too.
#
#By default this is defined to point to the Bacula binary
#    directory to give a reasonable FileSet to backup to
#    disk storage during initial testing.
#
    File = /usr/local/
}

#
# If you backup the root directory, the following two excluded
#   files can be useful
#
Exclude {
    File = /usr/local/bacula/bin/working
    File = /tmp
    File = /proc
    File = /tmp
    File = /.journal
    File = /.fsck
}
}

#
# When to do the backups, full backup on first sunday of the month,
#differential (i.e. incremental since full) every other sunday,
#and incremental backups other days
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
}

# This schedule does the catalog. It starts after the WeeklyCycle
Schedule {
Name = "WeeklyCycleAfterBackup"
Run = Full sun-sat at 23:10
}

# This is the backup of the catalog
FileSet {
Name = "Catalog"
Include {
    Options {
      signature = MD5
    }
    File = "/usr/local/bacula/bin/working/bacula.sql"
}
}

# Client (File Services) to backup
Client {
Name = lnmp-test-server-255-240-fd
Address = lnmp-test-server-255-240
FDPort = 9102
Catalog = MyCatalog
Password = "LyGDSKKleCf/j8hxDmHWViXPqHfPJiJDUTw1gCio8GrF"          # password for FileDaemon
File Retention = 30 days            # 30 days
Job Retention = 6 months            # six months
AutoPrune = yes                     # Prune expired Jobs/Files
}

#
# Second Client (File Services) to backup
#You should change Name, Address, and Password before using
#
Client {
Name = puppetclient.test.com-fd
Address = 10.48.255.247
FDPort = 9102
Catalog = MyCatalog
Password = "LyGDSKKleCf/j8hxDmHWViXPqHfPJiJDUTw1gCio8GrF"         # password for FileDaemon 2
File Retention = 30 days            # 30 days
Job Retention = 6 months            # six months
AutoPrune = yes                     # Prune expired Jobs/Files
}


# Definition of file storage device
Storage {
Name = File
# Do not use "localhost" here   
Address = lnmp-test-server-255-240                # N.B. Use a fully qualified name here
SDPort = 9103
Password = "9qF2VuwrvgX0wWL0Lu5q9902ApvFeU13S5U0vJISSbZQ"
Device = FileStorage
Media Type = File
}



# Definition of DDS tape storage device
#Storage {
#Name = DDS-4   
#Do not use "localhost" here
#Address = lnmp-test-server-255-240                # N.B. Use a fully qualified name here
#SDPort = 9103
#Password = "9qF2VuwrvgX0wWL0Lu5q9902ApvFeU13S5U0vJISSbZQ"          # password for Storage daemon
#Device = DDS-4                      # must be same as Device in Storage daemon
#Media Type = DDS-4                  # must be same as MediaType in Storage daemon
#Autochanger = yes                   # enable for autochanger device
#}

# Definition of 8mm tape storage device
#Storage {
#Name = "8mmDrive"
#Do not use "localhost" here
#Address = lnmp-test-server-255-240                # N.B. Use a fully qualified name here
#SDPort = 9103
#Password = "9qF2VuwrvgX0wWL0Lu5q9902ApvFeU13S5U0vJISSbZQ"
#Device = "Exabyte 8mm"
#MediaType = "8mm"
#}

# Definition of DVD storage device
#Storage {
#Name = "DVD"
#Do not use "localhost" here
#Address = lnmp-test-server-255-240                # N.B. Use a fully qualified name here
#SDPort = 9103
#Password = "9qF2VuwrvgX0wWL0Lu5q9902ApvFeU13S5U0vJISSbZQ"
#Device = "DVD Writer"
#MediaType = "DVD"
#}
# Generic catalog service
Catalog {
Name = MyCatalog
# Uncomment the following line if you want the dbi driver
# dbdriver = "dbi:mysql"; dbaddress = 127.0.0.1; dbport =
dbname = "bacula"; dbuser = "bacula"; dbpassword = ""
}

# Reasonable message delivery -- send most everything to email address
#and to the console
Messages {
Name = Standard
#
# NOTE! If you send to two email or more email addresses, you will need
#to replace the %r in the from field (-f part) with a single valid
#email address in both the mailcommand and the operatorcommand.
#What this does is, it sets the email address that emails would display
#in the FROM field, which is by default the same email as they're being
#sent to.However, if you send email to more than one address, then
#you'll have to set the FROM address manually, to a single address.
#for example, a 'no-reply@mydomain.com', is better since that tends to
#tell (most) people that its coming from an automated source.

#
mailcommand = "/usr/local/bacula/bin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: %t %e of %c %l\" %r"
mail = root@localhost = all, !skipped
operator = root@localhost = mount
console = all, !skipped, !saved
#
# WARNING! the following will create a file that you must cycle from
#          time to time as it will grow indefinitely. However, it will
#          also keep all your messages if they scroll off the console.
#
append = "/usr/local/bacula/bin/working/log" = all, !skipped
catalog = all
}


#
# Message delivery for daemon messages (no job).
Messages {
Name = Daemon
mailcommand = "/usr/local/bacula/bin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula daemon message\" %r"
mail = root@localhost = all, !skipped
console = all, !skipped, !saved
append = "/usr/local/bacula/bin/working/log" = all, !skipped
}

# Default pool definition
Pool {
Name = Default
Pool Type = Backup
Recycle = yes                     # Bacula can automatically recycle Volumes
AutoPrune = yes                     # Prune expired volumes
Volume Retention = 365 days         # one year
}

# File Pool definition
Pool {
Name = File
Pool Type = Backup
Recycle = yes                     # Bacula can automatically recycle Volumes
AutoPrune = yes                     # Prune expired volumes
Volume Retention = 365 days         # one year
Maximum Volume Bytes = 50G          # Limit Volume size to something reasonable
Maximum Volumes = 100               # Limit number of Volumes in Pool
}


# Scratch pool definition
Pool {
Name = Scratch
Pool Type = Backup
}

#
# Restricted console used by tray-monitor to get the status of the director
#
Console {
Name = lnmp-test-server-255-240-mon
Password = "eko0sM2xuqARXyLQoD8BA37GciFXJWHv91Qteh+j8LVn"
CommandACL = status, .status


被备份的 机器上面的bacula-fd.conf
root@puppetclient:~/bacula/bin# vim bacula-fd.conf
#
# DefaultBacula File Daemon Configuration file
#
#For Bacula release 5.0.1 (24 February 2010) -- ubuntu 10.04
#
# There is not much to change here except perhaps the
# File daemon Name to
#

#
# List Directors who are permitted to contact this File daemon
#
Director {
Name = lnmp-test-server-255-240-dir
Password = "LyGDSKKleCf/j8hxDmHWViXPqHfPJiJDUTw1gCio8GrF"
}

#
# Restricted Director, used by tray-monitor to get the
#   status of the file daemon
#
Director {
Name = lnmp-test-server-255-240-mon
Password = "Bbw7JT4a2wmTzCBrCRtGNdeDeXeikhB2/onc0hURim4e"
Monitor = yes
}

#
# "Global" File daemon configuration specifications
#
FileDaemon {                        # this is me
Name = puppetclient.test.com-fd
FDport = 9102                  # where we listen for the director
WorkingDirectory = /usr/local/bacula/bin/working
Pid Directory = /usr/local/bacula/bin/working
Maximum Concurrent Jobs = 20
}

# Send all messages except skipped files back to Director
Messages {
Name = Standard
director = lnmp-test-server-255-240-dir = all, !skipped, !restored

燃烧的小明 发表于 2012-09-20 18:39

对了,机房还跑得有mongoDB, 一个处理数据的平台,里面有RabbitMQ,GEARMAN,worker什么的

燃烧的小明 发表于 2012-09-21 08:17


解决了,是因为一个地址填写的是主机名,而不是IP,另一台机器的/etc/hosts下没有对应的记录。。。。

梦落花香Z 发表于 2013-02-04 17:09

你好,我想问你一下你装bacula 那那个版本的啊?为什么我的9011端口不能启动呢。

hannius_lei 发表于 2013-03-06 11:42

楼主的FD机器上,bacula-fd.conf中地址写的是机器名吗?非主机IP才出现的这个错误吗?
页: [1]
查看完整版本: 请教一个bacula的问题,顺便问问小型机房的备份方案