LINUX.ORG.RU
ФорумAdmin

Bacula Gh

 


0

1

Помогите разобраться, пытаюсь настроить работу бакулы. Дано: директор и стораж на одной машине, клиент на Винде. Конфиги при проверке на ошибки молчат. При запуске джоба он висит в статусе запущен и прекращается с еррором. Также статус стоража гласит «Device is not open». В волюме статус пусто.

В логе работы пишет

FDTermination status: Error SDTermination status: Waiting on FD bacula-dir.conf

Director {                            
  Name = center.domain.local-dir
  DIRport = 9101              
  QueryFile = "/etc/bacula/scripts/query.sql"
  WorkingDirectory = "/var/lib/bacula"
  PidDirectory = "/var/run/bacula"
  Maximum Concurrent Jobs = 1
  Password = "fghrty212vyt"         
  Messages = Daemon
  DirAddress = 127.0.0.1
}



FileSet {
  Name = "WinFileSet"
  Include { 
    Options {
	signature = MD5
	compression = GZIP
	portable = yes
	noatime = yes
	checkfilechanges = yes
	Ignore Case = yes
	wildfile = "*.avi"
	wilddir = "System Volume Information"
	exclude = yes
}
File = "*C:/Test"
}
Exclude {
File = "*.reg"
}
}


Job {
  Name = "BackupWinFull"
  Type = Backup
  Level = Full
  Storage = winsrv-nfs
  FileSet = "WinFileSet"
  Schedule = "WinDiff"
  Pool = poolwinsrvnfs
  Client = winsrv-fd
  Messages = Standart
  Where = /etc/bacula/backup 
}

Job {
  Name = "RestoreWinFull"
  Type = restore
  Storage = winsrv-nfs
  Pool = poolwinsrvnfs
  FileSet = "WinFileSet"
  Client = winsrv-fd
  Messages = Standart
  Where = /etc/bacula/backup/restore 
}


Schedule {
  Name = "WinDiff"
  Run = Full on sat at 04:05
  Run = Differential on tue-fri at 23:05
  Run = Incremental mon-sat at 23:05
}


Client {
  Name = winsrv-fd
  Address = 192.168.225.82 
  FDPort = 9102
  Catalog = MyCatalog
  Password = "fghrty212vyt"          
  File Retention = 60 days            
  Job Retention = 6 months            
  AutoPrune = yes                     
}



Storage {
  Name = winsrv-nfs
  Address = 127.0.0.1     
  SDPort = 9103
  Password = "fghrty212vyt"
  Device = winsrvFileStorage
  Media Type = File
  
}




Catalog {
  Name = MyCatalog
  dbname = "bacula"; dbuser = "bacula"; dbpassword = "fghrty212vyt"
}

Messages {
  Name = Standart
  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 = all, !skipped
  operator = root = mount
  console = all, !skipped, !saved
  append = "/var/log/bacula/bacula.log" = all, !skipped
  catalog = all
}



Messages {
  Name = Daemon
  mailcommand = "/usr/sbin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula daemon message\" %r"
  mail = root = all, !skipped
  console = all, !skipped, !saved
  append = "/var/log/bacula/bacula.log" = all, !skipped
}


Pool {
  Name = poolwinsrvnfs
  Pool Type = Backup
  Recycle = yes                       
  AutoPrune = yes                     
  Volume Retention = 1 months         
  Maximum Volumes = 3 
  Maximum Volume Bytes = 3G  
  LabelFormat = "winvol"              
}



Console{
  Name = bacula-mon
  Password = "fghrty212vyt"
  CommandACL = status, .status
}

bacula-sd.conf
Storage {                             # definition of myself
  Name = center-sd
  SDPort = 9103                  # Director's port
  WorkingDirectory = "/var/lib/bacula"
  Pid Directory = "/var/run/bacula"
  SDAddress = 127.0.0.1
  Maximum Concurrent Jobs = 2
}


Director {
  Name = center.domain.local-dir
  Password = "fghrty212vyt"
}

Device {
  Name = winsrvFileStorage
  Media Type = File
  Archive Device = /media/nfs_linbackup_v2/winsrv
  LabelMedia = yes;
  Random Access = yes;
  RemovableMedia = no;
  AutomaticMount = yes;
  AlwaysOpen = yes;
}

Messages {
  Name = Standart
  Director = center.domain.local-dir = all
}



Последнее исправление: bambooqid (всего исправлений: 2)

fd работает? Телнетом на клиента на порт 9102 подключиться с директора удаётся? Что говорит bconsole на команду status client=winsrv-fd?

Black_Shadow ★★★★★
()
Ответ на: комментарий от Black_Shadow

Клиент к директору подключается. Телнетом проверял порт, он возвращает, что порт открыт, но хост отказал в подключении. Я связывал такое поведенис тем, что бакула сама блокирует порт для своей работы.

*status all
center.domain.local-dir Version: 7.0.5 (28 July 2014) x86_64-pc-linux-gnu ubuntu 16.04
Daemon started 18-Jul-18 11:16. Jobs: run=0, running=0 mode=0,0
 Heap: heap=352,256 smbytes=255,045 max_bytes=255,045 bufs=173 max_bufs=173

Scheduled Jobs:
Level          Type     Pri  Scheduled          Job Name           Volume
===================================================================================
Differential   Backup    10  18-Jul-18 23:05    BackupWinFull      winsrv
Incremental    Backup    10  18-Jul-18 23:05    BackupWinFull      winsrv
====

Running Jobs:
Console connected at 18-Jul-18 11:16
No Jobs running.
====

Terminated Jobs:
 JobId  Level    Files      Bytes   Status   Finished        Name 
====================================================================
     1  Full          0         0   Cancel   16-Jul-18 17:57 BackupWinFull
     2  Full          0         0   Error    16-Jul-18 23:08 BackupWinFull
     3  Full          0         0   Cancel   17-Jul-18 10:25 BackupWinFull
     6  Full          0         0   Error    17-Jul-18 11:46 BackupWinFull
     7  Full          0         0   Cancel   17-Jul-18 11:46 BackupWinFull
     8  Full          0         0   Error    17-Jul-18 15:25 BackupWinFull
     9  Full          0         0   Error    17-Jul-18 23:08 BackupWinFull
    10  Full          0         0   Error    17-Jul-18 23:11 BackupWinFull
    11  Full          0         0   Error    18-Jul-18 09:30 BackupWinFull

====
Connecting to Storage daemon winsrv-nfs at 127.0.0.1:9103

center-sd Version: 7.0.5 (28 July 2014) x86_64-pc-linux-gnu ubuntu 16.04
Daemon started 18-Jul-18 11:16. Jobs: run=0, running=0.
 Heap: heap=135,168 smbytes=192,186 max_bytes=317,038 bufs=66 max_bufs=67
 Sizes: boffset_t=8 size_t=8 int32_t=4 int64_t=8 mode=0,0

Running Jobs:
No Jobs running.
====

Jobs waiting to reserve a drive:
====

Terminated Jobs:
 JobId  Level    Files      Bytes   Status   Finished        Name 
===================================================================
     2  Full          0         0   Cancel   16-Jul-18 23:08 BackupWinFull
     3  Full          0         0   Cancel   17-Jul-18 10:25 BackupWinFull
     4  Base          0         0   Cancel   17-Jul-18 10:38 BackupWinFull
     5  Base          0         0   Cancel   17-Jul-18 10:57 BackupWinFull
     6  Full          0         0   Other    17-Jul-18 11:46 BackupWinFull
     7  Full          0         0   Cancel   17-Jul-18 12:54 BackupWinFull
     8  Full          0         0   Other    17-Jul-18 13:43 BackupWinFull
     9  Full          0         0   Cancel   17-Jul-18 23:08 BackupWinFull
    10  Full          0         0   Cancel   17-Jul-18 23:11 BackupWinFull
    11  Full          0         0   Cancel   18-Jul-18 09:30 BackupWinFull
====

Device status:

Device "winsrvFileStorage" (/media/nfs_linbackup_v2/winsrv) is not open.
==
====

Used Volume status:
====

====

Connecting to Client winsrv-fd at 192.168.225.82:9102

winsrv-fd Version: 5.2.10 (28 June 2012)  VSS Linux Cross-compile Win64
Daemon started 18-Jul-18 10:26. Jobs: run=0 running=0.
Microsoft Windows 7 Professional (build 7600), 64-bit
 Heap: heap=0 smbytes=18,702 max_bytes=18,849 bufs=52 max_bufs=53
 Sizeof: boffset_t=8 size_t=8 debug=0 trace=1 
Running Jobs:
Director connected at: 18-Jul-18 11:16
No Jobs running.
====

Terminated Jobs:
====

JobLog

18-Jul 11:37 center.domain.local-dir JobId 1: Start Backup JobId 1, Job=BackupWinFull.2018-07-18_11.37.12_03
18-Jul 11:37 center.domain.local-dir JobId 1: Using Device "winsrvFileStorage" to write.
18-Jul 13:48 center.domain.local-dir JobId 1: Fatal error: Socket error on Storage command: ERR=Connection timed out
18-Jul 13:48 center.domain.local-dir JobId 1: Fatal error: Network error with FD during Backup: ERR=Connection timed out
18-Jul 13:48 center.domain.local-dir JobId 1: Fatal error: No Job status returned from FD.
18-Jul 13:48 center.domain.local-dir JobId 1: Error: Bacula center.domain.local-dir 7.0.5 (28Jul14):
  Build OS:               x86_64-pc-linux-gnu ubuntu 16.04
  JobId:                  1
  Job:                    BackupWinFull.2018-07-18_11.37.12_03
  Backup Level:           Full
  Client:                 "winsrv-fd" 5.2.10 (28Jun12) Microsoft Windows 7 Professional (build 7600), 64-bit,Cross-compile,Win64
  FileSet:                "WinFileSet" 2018-07-17 11:16:35
  Pool:                   "poolwinsrvnfs" (From Job resource)
  Catalog:                "MyCatalog" (From Client resource)
  Storage:                "winsrv-nfs" (From Job resource)
  Scheduled time:         18-Jul-2018 11:36:58
  Start time:             18-Jul-2018 11:37:14
  End time:               18-Jul-2018 13:48:44
  Elapsed time:           2 hours 11 mins 30 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:      1
  Volume Session Time:    1531902982
  Last Volume Bytes:      197 (197 B)
  Non-fatal FD errors:    1
  SD Errors:              0
  FD termination status:  Error
  SD termination status:  Waiting on FD
  Termination:            *** Backup Error ***

bambooqid
() автор топика
Ответ на: комментарий от bambooqid
18-Jul 13:48 center.domain.local-dir JobId 1: Fatal error: Socket error on Storage command: ERR=Connection timed out
18-Jul 13:48 center.domain.local-dir JobId 1: Fatal error: Network error with FD during Backup: ERR=Connection timed out

Логика работы bacula - director отдаёт команду fd, тот САМ коннектится на sd и делает бэкап.

Судя по данным ошибкам с fd нет связи до sd. Попробуй с fd сделать telnet на порт sd.

И еще. У меня БЫЛИ проблемы при коннекте fd версии 7 к sd версии 9 - бэкап начинался, но в рандомный момент приходило сообщение «Packet is too big» и всё обламывалось. У тебя тут соответственно версии 5 и 7, но я бы насторожился насчет этого

Pinkbyte ★★★★★
()
Последнее исправление: Pinkbyte (всего исправлений: 1)
Ответ на: комментарий от Pinkbyte

была и такая ошибка как то. Спасибо за совет. Уже всю голову себе сломал с этой бакулой, вроде все должно работать, но увы и ах. С машины клиента достучаться телнетом можно только до 9102 порта, а у стораджа 9103, как открыть порт на сервере не подскажите?

bambooqid
() автор топика
Ответ на: комментарий от bambooqid

Какая операционка на сервере? Что используется в качестве файрвола - непосредственно iptables или firewalld? Или вообще какой-нибудь ufw, прости господи?

Pinkbyte ★★★★★
()
Ответ на: комментарий от Pinkbyte

бекап стартанул, но в логе какая то непонятная для меня ошибка.

root@bacula:~/Desktop# iptables -vn -L
Chain INPUT (policy ACCEPT 1038 packets, 100K bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain OUTPUT (policy ACCEPT 633 packets, 61423 bytes)
 pkts bytes target     prot opt in     out     source               destination         
Log records for job 5
2018-07-19 11:34:37
winsrv-fd
     Could not stat "*C:/Test": ERR=������� �� ������� ����� ��������� ����.

\
2018-07-19 11:34:38
center.domain.local-dir
Start Backup JobId 5, Job=BackupWinFull.2018-07-19_11.34.36_03
\
2018-07-19 11:34:39
center.domain.local-dir
Using Device "winsrvFileStorage" to write.
\
2018-07-19 11:34:39
center-sd
Volume "winvol0004" previously written, moving to end of data.
\


Ready to append to end of Volume "winvol0004" size=623
\
2018-07-19 11:34:44
center-sd
Elapsed time=00:00:05, Transfer rate=0  Bytes/second
\
2018-07-19 11:34:46
center.domain.local-dir
Bacula center.domain.local-dir 7.0.5 (28Jul14):
  Build OS:               x86_64-pc-linux-gnu ubuntu 16.04
  JobId:                  5
  Job:                    BackupWinFull.2018-07-19_11.34.36_03
  Backup Level:           Full
  Client:                 "winsrv-fd" 5.2.10 (28Jun12) Microsoft Windows 7 Professional (build 7600), 64-bit,Cross-compile,Win64
  FileSet:                "WinFileSet" 2018-07-17 11:16:35
  Pool:                   "poolwinsrvnfs" (From Job resource)
  Catalog:                "MyCatalog" (From Client resource)
  Storage:                "winsrv-nfs" (From Job resource)
  Scheduled time:         19-Jul-2018 11:34:34
  Start time:             19-Jul-2018 11:34:39
  End time:               19-Jul-2018 11:34:46
  Elapsed time:           7 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:    1531986326
  Last Volume Bytes:      1,045 (1.045 KB)
  Non-fatal FD errors:    1
  SD Errors:              0
  FD termination status:  OK
  SD termination status:  OK
  Termination:            Backup OK -- with warnings

\


Begin pruning Jobs older than 6 months .
\


No Jobs found to prune.
\


Begin pruning Files.
\


No Files found to prune.
\


End auto prune.

\
bambooqid
() автор топика
Ответ на: комментарий от bambooqid

А что это за звездочка у вас в Fileset перед буквой диска? File = «*C:/Test»

По поводу версий бакулы, лучше использовать одинаковые версии. Обновите свой bacula-fd на клиенте до версии 7.0.5, как на sd.

jay15
()
Ответ на: комментарий от jay15

Bacula

Спасибо, я уже разобрался. Но у меня возникли еще вопросы. При бекапе виндового клиента в логах появляется куча строк след содержания: «Cannot open „путь к файлу“: ERR= „куча символов не различимые разными кодировками“ и в конце строки символ ^M Может подскажите в чем дело?

bambooqid
() автор топика
Ответ на: Bacula от bambooqid

Пришлите скрин актуального Fileset и лога ошибки, попробуем посмотреть.

jay15
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.