Сначала покажу конфиги.
Директор:
Messages { Name = Daemon syslog = all } Messages { Name = Standard 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/lib/bacula/log" = all, !skipped catalog = all } Director { # define myself Name = backup-store-director DIRport = 9101 # where we listen for UA connections Password = "ПАРОЛЬ1" Messages = Daemon QueryFile = "/etc/bacula/scripts/query.sql" WorkingDirectory = "/var/bacula/director" PidDirectory = "/var/run/bacula" Maximum Concurrent Jobs = 5 DirAddress = ВНЕШНИЙ АЙПИ СЕРВЕРА С ДИРЕКТОРОМ } Catalog { Name = mutaborCatalog dbname = bacula_db; DB Address = "localhost"; dbuser = "baculauser"; dbpassword = "ghjcnjpass" } Client { Name = mutabor Address = АЙПИ КЛИЕНТА FDPort = 9102 Catalog = mutaborCatalog Password = "ПАРОЛЬ2" AutoPrune = yes File Retention = 30 days Job Retention = 6 months } FileSet { Name = mutabor-fileset Include { Options { compression=GZIP3 signature=SHA1 verify=pins5 recurse=yes hardlinks=yes } File = "/etc/" File = "/home/" File = "/var/www/" } } Storage { Name = backup_store Address = localhost SDPort = 9103 Password = 'ПАРОЛЬ3' Device = Mutabor_Device Media Type = File Maximum Concurrent Jobs = 1 } Pool { Name = main_pool Maximum Volumes = 4 Pool Type = Backup Storage = backup_store Maximum Volume Jobs = 7 Volume Retention = 21 Recycle = yes # Может ли бакула удалять задания из томов AutoPrune = yes # Может ли бакула очищать тома } Schedule { Name = mutabor_schedule Run = Full mon-sat at 0:00 } Job { Name = mutabor_full Type = Backup Level = Full Client = mutabor FileSet = mutabor-fileset Pool = main_pool Schedule = mutabor_schedule Storage = backup_store Messages = Standard }
Сторейдж демон:
Messages { Name = Standard director = backup-store-director = all } Storage { Name = backup_store WorkingDirectory = /var/bacula/storage PidDirectory = /var/run Maximum Concurrent Jobs = 20 SDAddress = localhost SDPort = 9103 } Director { Name = backup-store-director Password = 'ПАРОЛЬ3' } Device { Name = Mutabor_Device ArchiveDevice = /data/bacula Label media = no Media Type = File }
Клиента:
Messages { Name = Standard 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/lib/bacula/log" = all, !skipped catalog = all } Client { Name = mutabor Working Directory = /var/bacula Pid Directory = /var/run Maximum Concurrent Jobs = 2 FDPort = 9102 FDAddress = ВНЕШНИЙ АЙПИ СЕРВЕРА С ДИРЕКТОРОМ } Director { Name = backup-store-director Password = "ПАРОЛЬ2" }
Из бакуловской консоли запускаю задание:
run mutabor_full
Automatically selected Catalog: mutaborCatalog
Using Catalog "mutaborCatalog"
Run Backup job
JobName: mutabor_full
Level: Full
Client: mutabor
FileSet: mutabor-fileset
Pool: main_pool (From Job resource)
Storage: backup_store (From Pool resource)
When: 2011-11-16 18:55:28
Priority: 10
OK to run? (yes/mod/no): yes
Job queued. JobId=15
В webacula с надеждой смотрю на список выполняющихся заданий. 20-30 минут задание висит со статусом "is waiting for Client mutabor to connect to Storage backup_store". Потом отваливается. В логах вижу вот что:
2011-11-18 13:34:09 backup-store-director JobId 26: Start Backup JobId 26, Job=mutabor_full.2011-11-18_13.34.07_04
2011-11-18 13:34:09 backup-store-director JobId 26: Created new Volume "main_pool0001" in catalog.
2011-11-18 13:34:09 backup-store-director JobId 26: Using Device "Mutabor_Device"
2011-11-18 14:04:10 backup-store-director JobId 26: Fatal error: Bad response to Storage command: wanted 2000 OK storage
, got 2902 Bad storage
2011-11-18 14:04:10 backup-store-director JobId 26: Error: Bacula backup-store-director 5.0.2 (28Apr10): 18-Nov-2011 14:04:10
Build OS: x86_64-pc-linux-gnu debian squeeze/sid
JobId: 26
Job: mutabor_full.2011-11-18_13.34.07_04
Backup Level: Full
Client: "mutabor" 5.0.0 (26Jan10) x86_64-unknown-linux-gnu,redhat,(Final)
FileSet: "mutabor-fileset" 2011-11-14 00:00:00
Pool: "main_pool" (From Job resource)
Catalog: "mutaborCatalog" (From Client resource)
Storage: "backup_store" (From Pool resource)
Scheduled time: 18-Nov-2011 13:33:28
Start time: 18-Nov-2011 13:34:09
End time: 18-Nov-2011 14:04:10
Elapsed time: 30 mins 1 sec
Priority: 1
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: 2
Volume Session Time: 1321606037
Last Volume Bytes: 0 (0 B)
Non-fatal FD errors: 0
SD Errors: 0
FD termination status: Error
SD termination status: Waiting on FD
Termination: *** Backup Error ***
Ошибка "Fatal error: Bad response to Storage command: wanted 2000 OK storage
, got 2902 Bad storage" гуглится, но у большинства проблема соединения (лог содержит ещё и Fatal error: Failed to connect to
Storage daemon: ) и после правки адресов или перестройки фаервола проблема исчезает. У меня порты открыты, пароли совпадают.
На сервере (директор, сервер хранения) - центос, на клиенте - дебиан.
Права на каталоги:
ls -la /var/bacula/
drwx------ 4 bacula bacula 4096 Nov 17 18:43 .
drwxr-xr-x 15 root root 4096 Nov 9 17:06 ..
drwx------ 2 bacula bacula 4096 Nov 18 14:04 director
drwx------ 3 bacula tape 4096 Nov 18 14:04 storage
ls -la /data/
drwxr-xr-x 3 root root 4096 Nov 10 19:55 .
drwxr-xr-x 24 root root 4096 Nov 10 19:55 ..
drwx------ 2 bacula tape 4096 Nov 10 19:55 bacula
Прошу помощи.