Podczas próby pobrania danych z klienta pojawia mi się błąd.
Kod: Zaznacz cały
31-lip 17:30 Bacula-dir JobId 15: Fatal error: Socket error on Storage command: ERR=Brak danych
31-lip 17:30 Bacula-dir JobId 15: Error: Bacula Bacula-dir 2.4.4 (28Dec08): 31-lip-2009 17:30:07
setdebug directory
Kod: Zaznacz cały
Connecting to Storage daemon File at 127.0.0.1:9103
3000 OK setdebug=1
Connecting to Client www-fd at 192.168.11.12:9102
2000 OK setdebug=1
Komunikacja przebiega bez problemu.
log:
Kod: Zaznacz cały
31-lip 17:00 Bacula-dir JobId 15: Start Backup JobId 15, Job=WWW-fd.2009-07-31_17.00.05.08
31-lip 17:00 Bacula-dir JobId 15: Using Device "FileStorage"
31-lip 17:30 Bacula-dir JobId 15: Fatal error: Socket error on Storage command: ERR=Brak danych
31-lip 17:30 Bacula-dir JobId 15: Error: Bacula Bacula-dir 2.4.4 (28Dec08): 31-lip-2009 17:30:07
Build OS: i486-pc-linux-gnu debian 5.0
JobId: 15
Job: WWW-fd.2009-07-31_17.00.05.08
Backup Level: Full
Client: "www-fd" 2.4.4 (28Dec08) i486-pc-linux-gnu,debian,5.0
FileSet: "WWW-file" 2009-07-30 20:20:21
Pool: "Weekly" (From Job resource)
Storage: "File" (From Job resource)
Scheduled time: 31-lip-2009 17:00:03
Start time: 31-lip-2009 17:00:07
End time: 31-lip-2009 17:30:07
Elapsed time: 30 mins
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
Storage Encryption: no
Volume name(s):
Volume Session Id: 2
Volume Session Time: 1249052337
Last Volume Bytes: 0 (0 B)
Non-fatal FD errors: 0
SD Errors: 0
FD termination status:
SD termination status: Waiting on FD
Termination: *** Backup Error ***
Kod: Zaznacz cały
#################################################################################### Director #######
##############################################################################
Director { # Nazwa Direcora
Name = Bacula-dir
DIRport = 9101 # Port na ktorym działa director
QueryFile = "/etc/bacula/scripts/query.sql" # zapytania SQL
WorkingDirectory = "/var/lib/bacula"
PidDirectory = "/var/run/bacula"
Maximum Concurrent Jobs = 1 #ilość konkurencyjnych jab-ów
Password = hipopotan
Messages = Daemon
DirAddress = 127.0.0.1
}
#################################################################################### Ogólna dyraktywa Dla jobów #######
##############################################################################
JobDefs {
Name = "WWW-defs"
Type = Backup
Level = Full
Client = www-fd
FileSet = "WWW-file"
Schedule = "WeeklyCycle"
Storage = File
Messages = Demon
Pool = Weekly
Priority = 10
}
Job {
Name = "WWW-fd"
JobDefs = "WWW-defs"
Write Bootstrap = "/var/lib/bacula/WWW.bsr"
}
#################################################################################### Definicja dla Job-restore’a do odzyskiwania danych #######
##############################################################################
Job {
Name = "WWWRestoreFiles"
Type = Restore
Client=www-fd
FileSet="WWW-file"
Storage = File
Pool = Weekly
Messages = Demon
Where = /bacula-restores
}
#################################################################################### Definicja Fileset, czyli zasobów które będą backupowane #######
###################################################################################
FileSet {
Name = "WWW-file"
Include {
Options {
signature = MD5
}
File = /home/
File = /etc/
}
}
#################################################################################### Definicja scheluda #######
##############################################################################
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 = /var/lib/bacula/bacula.sql
}
}
#################################################################################### Definicja Klientów #######
##############################################################################
Client {
Name = www-fd
Address = 192.168.11.12
FDPort = 9102
Catalog = MyCatalog
Password = hipopotan
File Retention = 30 days # 30 days
Job Retention = 6 months # six months
AutoPrune = yes # Prune expired Jobs/Files
}
#################################################################################### Definicja storagu #######
##############################################################################
Storage {
Name = File
# Do not use "localhost" here
Address = 127.0.0.1 # N.B. Use a fully qualified name here
SDPort = 9103
Password = hipopotan
Device = FileStorage
Media Type = File
}
#################################################################################### Definicja użytkownika i hasła #######
##############################################################################
Catalog {
Name = MyCatalog
dbname = bacula; DB Address = "localhost"; user = bacula; password = "haslobazy"
}
################################################################################## Definicja poziomu logowania I wysyłania infa na maila #######
##############################################################################
Messages {
Name = Demon
mailcommand = "/usr/lib/bacula/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: %t %e of %c %l\" %r"
operatorcommand = "/usr/lib/bacula/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: Intervention needed for %j\" %r"
mail = root@localhost = all, !skipped
operator = root@localhost = mount
console = all, !skipped, !saved
append = "/var/log/bacula/log" = all, !skipped
}
#
# Message delivery for daemon messages (no job).
Messages {
Name = Daemon
mailcommand = "/usr/lib/bacula/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula daemon message\" %r"
mail = root@localhost = all, !skipped
console = all, !skipped, !saved
append = "/var/lib/bacula/log" = all, !skipped
}
################################################################################## Definicja Pooli #######
##############################################################################
Pool {
Name = Weekly
Pool Type = Backup
Recycle = yes # Bacula can automatically recycle Volumes
AutoPrune = yes # Prune expired volumes
Volume Retention = 365 days # one year
}Kod: Zaznacz cały
#
# Default Bacula Storage Daemon Configuration file
#
# For Bacula release 2.4.4 (28 December 2008) -- debian 5.0
#
# You may need to change the name of your tape drive
# on the "Archive Device" directive in the Device
# resource. If you change the Name and/or the
# "Media Type" in the Device resource, please ensure
# that dird.conf has corresponding changes.
#
Storage { # definition of myself
Name = Bacula-sd
SDPort = 9103 # Director's port
WorkingDirectory = "/var/lib/bacula"
Pid Directory = "/var/run/bacula"
Maximum Concurrent Jobs = 20
SDAddress = 127.0.0.1
}
#
# List Directors who are permitted to contact Storage daemon
#
Director {
Name = Bacula-dir
Password = "hipopotan"
}
#
# Restricted Director, used by tray-monitor to get the
# status of the storage daemon
#
#Director {
# Name = Bacula-mon
# Password = "9v4d+PzZv7C5pdB4iR+larCJqMBw6zsAEKPcxKh7ZHdU"
# Monitor = yes
#}
#
# Devices supported by this Storage daemon
# To connect, the Director's bacula-dir.conf must have the
# same Name and MediaType.
#
Device {
Name = FileStorage
Media Type = File
Archive Device = /bacula/WWW/
LabelMedia = yes; # lets Bacula label unlabeled media
Random Access = Yes;
AutomaticMount = yes; # when device opened, read it
RemovableMedia = no;
AlwaysOpen = no;
}
Messages {
Name = Standard
director = Bacula-dir = all
}
#Kod: Zaznacz cały
#
# Default Bacula File Daemon Configuration file
#
# For Bacula release 2.4.4 (28 December 2008) -- debian 5.0
#
# 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 = Bacula-dir
Password = "hipopotan"
}
FileDaemon {
Name = WWW-fd
FDport = 9102 # where we listen for the director
WorkingDirectory = /var/lib/bacula
Pid Directory = /var/run/bacula
Maximum Concurrent Jobs = 20
# SD Connnet Timeout = 1 min
}
# Send all messages except skipped files back to Director
Messages {
Name = Demon
mailcommand = "/usr/lib/bacula/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: %t %e of %c %l\" %r"
operatorcommand = "/usr/lib/bacula/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: Intervention needed for %j\" %r"
mail = root@localhost = all, !skipped
operator = root@localhost = mount
console = all, !skipped, !saved
append = "/var/log/bacula/log" = all, !skipped
}
#Pool {
# Name = Weekly
# Pool Type = Backup
# Recycle = yes # Bacula can automatically recycle Volumes
# AutoPrune = yes # Prune expired volumes
# Volume Retention = 365 days # one year
#}EDIT:
przy uruchomieniu backupu z Cli proces wisi mi przy:
Kod: Zaznacz cały
WWW-fd.2009-08-03_16.15.17.06 is waiting for Client www-fd to connect to Storage File
po odczytaniu wiadomości mam komunikat
Kod: Zaznacz cały
03-sie 17:45 Bacula-dir JobId 22: Fatal error: Socket error on Storage command: ERR=Brak danych
na serwerze:
Kod: Zaznacz cały
bacula-dir i bacula-sd
Kod: Zaznacz cały
bacula-fd[ Dodano: 2009-08-06, 16:23 ]
Poradziłem sobie z tym problemem.
oto poprawione configi tak dla potomności:
na serwerze:
bacula-dir.conf
Kod: Zaznacz cały
Director { # define myself
Name = bacula-dir
DIRport = 9101 # where we listen for UA connections
QueryFile = "/etc/bacula/scripts/query.sql"
WorkingDirectory = "/var/lib/bacula"
PidDirectory = "/var/run"
Maximum Concurrent Jobs = 1
Password = hulkoincredable # Console password
Messages = Daemon
DirAddress = 127.0.0.1
}
Schedule {
Name = "WeeklyCycle"
Run = Full mon-fri at 09:15
#Run = Differential 2nd-5th sun at 23:05
#Run = Incremental mon-sat at 23:05
}
# Generic catalog service
Catalog {
Name = MyCatalog
dbname = bacula; user = bacula; password = "hulkoincredable"
}
# 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/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: Intervention needed for %j\" %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 = "/var/log/bacula/log" = all, !skipped
}
# Message delivery for daemon messages (no job).
Messages {
Name = Daemon
mailcommand = "/usr/sbin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula daemon message\" %r"
mail = root@localhost = all, !skipped
console = all, !skipped, !saved
append = "/var/log/bacula/log" = all, !skipped
}
Console {
Name = bacula-mon
Password = hulkoincredable
CommandACL = status, .status
}
@/etc/bacula/klienci/www.conf
@/etc/bacula/klienci/test.conf
Kod: Zaznacz cały
#
# Default Bacula Storage Daemon Configuration file
#
# For Bacula release 2.2.6 (10 November 2007) -- PLD/Linux
#
# You may need to change the name of your tape drive
# on the "Archive Device" directive in the Device
# resource. If you change the Name and/or the
# "Media Type" in the Device resource, please ensure
# that dird.conf has corresponding changes.
#
Storage { # definition of myself
Name = bacula-sd
SDPort = 9103 # Director's port
WorkingDirectory = "/var/lib/bacula"
Pid Directory = "/var/run"
Maximum Concurrent Jobs = 20
}
#
# List Directors who are permitted to contact Storage daemon
#
Director {
Name = bacula-dir
Password = "hulkoincredable"
}
#
# Restricted Director, used by tray-monitor to get the
# status of the storage daemon
#
Director {
Name = bacula-mon
Password = "hulkoincredable"
# Monitor = yes;
}
Device {
Name = "bacula"
Media Type = File
Archive Device = /bacula/WWW
LabelMedia = yes;
Random Access = yes;
AutomaticMount = yes;
RemovableMedia = no;
AlwaysOpen = no;
}
Device {
Name = "WWW"
Media Type = File
Archive Device = /bacula/WWW
LabelMedia = yes;
LabelMedia = yes;
Random Access = yes;
AutomaticMount = yes;
RemovableMedia = no;
AlwaysOpen = no;
}
Messages {
Name = Standard
director = bacula-dir = all
}
Kod: Zaznacz cały
# Default Bacula File Daemon Configuration file
#
# For Bacula release 2.2.6 (10 November 2007) -- PLD/Linux
#
# 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 = bacula-dir
Password = "hulkoincredable"
}
#
# Restricted Director, used by tray-monitor to get the
# status of the file daemon
#
Director {
Name = bacula-mon
Password = "hulkoincredable"
# Monitor = yes
}
#
# "Global" File daemon configuration specifications
#
FileDaemon { # this is me
Name = bacula-fd
FDport = 9102 # where we listen for the director
WorkingDirectory = /var/lib/bacula
Pid Directory = /var/run
Maximum Concurrent Jobs = 20
}
# Send all messages except skipped files back to Director
Messages {
Name = Standard
director = bacula-dir = all, !skipped, !restored
}
test.conf
Kod: Zaznacz cały
Job {
Name = "TEST"
CLient = Test-fd
JobDefs ="TEST"
Write Bootstrap = '/var/lib/bacula/test.bsr'
}
Job {
Name = "RestoreFiles"
Type = Restore
Client= Test-fd
FileSet="TEST"
Storage = TEST
Pool = TEST
Messages = Standard
Where = /
}
FileSet {
Name = "TEST"
Include {
Options {
signature = MD5
compression = GZIP9
}
File = /etc
}
}
JobDefs {
Name = "TEST"
Type = Backup
Level = Full
Client = Test-fd
FileSet = "TEST"
Schedule = "WeeklyCycle"
Storage = TEST
Messages = Standard
Pool = TEST
Priority = 10
}
Client {
Name = Test-fd
Address = 127.0.0.1
FDPort = 9102
Catalog = MyCatalog
Password = "hulkoincredable"
File Retention = 30 days
Job Retention = 6 months
AutoPrune = yes
}
Pool {
Name = TEST
Pool Type = Backup
Recycle = yes
AutoPrune = yes
LabelFormat = "BackupBacula"
Maximum Volume Bytes = 2000M
Volume Retention = 365 days
#Accept Any Volume = yes;
}
Storage {
Name = TEST
Address = 127.0.0.1
SDPort = 9103
Password = "hulkoincredable"
Device = bacula
Media Type = File
}
Kod: Zaznacz cały
Job {
Name = "WWW"
CLient = WWW-fd
JobDefs ="WWW"
Write Bootstrap = '/var/lib/bacula/test.bsr'
}
Job {
Name = "RestoreFiles-WWW"
Type = Restore
Client= WWW-fd
FileSet="WWW"
Storage = bacula-sd
Pool = WWW
Messages = Standard
Where = /
}
FileSet {
Name = "WWW"
Include {
Options {
signature = MD5
compression = GZIP9
}
File = /home
}
}
JobDefs {
Name = "WWW"
Type = Backup
Level = Full
Client = WWW-fd
FileSet = "WWW"
Schedule = "WeeklyCycle"
Storage = bacula-sd
Messages = Standard
Pool = WWW
}
Client {
Name = WWW-fd
Address = 192.168.11.12
FDPort = 9102
Catalog = MyCatalog
Password = "hulkoincredable"
File Retention = 30 days
Job Retention = 6 months
AutoPrune = yes
}
Pool {
Name = WWW
Pool Type = Backup
Recycle = yes
AutoPrune = yes
AutoPrune = yes
LabelFormat = "BackupWWW"
Maximum Volume Bytes = 2000M
Volume Retention = 365 days
#Accept Any Volume = yes;
}
Storage {
Name = bacula-sd
Address = 192.168.11.13
SDPort = 9103
Password = "hulkoincredable"
Device = WWW
Media Type = File
}
bacula-fd.conf
Kod: Zaznacz cały
#
# Default Bacula File Daemon Configuration file
#
# For Bacula release 2.2.6 (10 November 2007) -- PLD/Linux
#
# 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 = bacula-dir
Password = "hulkoincredable"
}
#
# Restricted Director, used by tray-monitor to get the
# status of the file daemon
#
Director {
Name = bacula-mon
Password = "hulkoincredable"
Monitor = yes
}
#
# "Global" File daemon configuration specifications
#
FileDaemon { # this is me
Name = WWW-fd
FDport = 9102 # where we listen for the director
WorkingDirectory = /var/lib/bacula
Pid Directory = /var/run
Maximum Concurrent Jobs = 20
}
# Send all messages except skipped files back to Director
Messages {
Name = Standard
director = bacula-dir = all, !skipped, !restored
}