编辑2-全部在调试中-:

编辑2-全部在调试中-:

我将尝试解释我所面临的问题:

当我恢复使用两个“卷”的一个客户端备份时,出现此错误:

bacula-dir JobId 48945: Fatal error: Bad response to Storage command: wanted 2000 OK storage, got 2800 End Job TermCode=69 JobFiles=32293 ReadBytes=8946396913 JobBytes=10298059235 Errors=1 VSS=0 Encrypt=0 CommBytes=232 CompressCommBytes=232

我尝试找到此问题的解决方案。有人说这是 NFS 错误,但只有当还原涉及多个卷时才会发生。

如果我从单个卷运行恢复作业,则恢复工作进行得很好。

当我bacula-fd在调试模式(bacula-fd -v -c /etc/bacula/bacula-fd.conf -f -d 100)下运行时,输出是:

bacula: restore.c:540-49097 === msglen=155 attrExlen=0 msg=287476 3 /var/www/midomain.com/shared/src/uploads/downloads/eusk706.mp3
bacula: create_file.c:208-49097 Create=/tmp/bacula-restores/var/www/midomain.com/shared/src/uploads/downloads/eusk706.mp3
bacula: attribs.c:558-49097 File size of restored file /tmp/bacula-restores/var/www/midomain.com/shared/src/uploads/downloads/eusk706.mp3 not correct. Original 2581274, restored 131072.
bacula: restore.c:1034-49097 End Do Restore. Files=19300 Bytes=7333538565
bacula: heartbeat.c:141-49097 Send kill to heartbeat id
bacula: job.c:2534-49097 filed>stored: read close session 160
bacula: job.c:2548-49097 Done in job.c
bacula: job.c:2551-49097 2000 OK storage end
bacula: job.c:2576-49097 end_restore_cmd
bacula: job.c:333-49097 Quit command loop. Canceled=1
bacula: job.c:456-49097 Calling term_find_files
bacula: job.c:459-49097 Done with term_find_files
bacula: jcr.c:174-49097 write_last_jobs seek to 192
bacula: job.c:462-0 Done with free_jcr

这可能是由于配置错误导致的吗?还有其他选择吗?

我在 Bacula 7.0.4 上开始遇到此问题。我已将 Bacula 升级到版本 9.0.5,但问题仍然存在。

客户端位于不同的网络中,我为每个网络配置了一个存储。

配置文件:

客户

Client {
    Name = myServer
    Address = 192.168.2.222
    Catalog = MyCatalog
    Password = "***"
    File Retention = 15 days
    Job Retention = 15 days
    Autoprune = yes
    Maximum Concurrent Jobs = 6
}

Job {
    Name = "myServer"
    Type = Backup
    Client = myServer
    FileSet = "myServer"
    Storage = FileRedDos
    Messages = Standard
    Pool = File
    Schedule = Miercoles
    Maximum Concurrent Jobs = 4
}

FileSet {
    Name = "myServer"
    Include {
        File = /var/www
        File = /etc
        Options {
            signature = MD5
            compression = GZIP
        }
    }
    Exclude {
    }
}

贮存

Storage {
    Name = FileRedDos
    Address = 192.168.2.25
    SDPort = 9103
    Password = "***"
    Device = Freenas
    Media Type = File
    Maximum Concurrent Jobs = 20
}

水池

Pool {
    Name = File
    Pool Type = Backup
    Recycle = yes
    AutoPrune = yes
    Volume Retention = 30 days
    Maximum Volume Bytes = 10G
    Maximum Volumes = 1000
    Label Format = "VolBacula-"
}

日程

Schedule {
    Name = Miercoles
    Run = Full wednesday at 03:00
    Run = Incremental thursday-tuesday at 01:00
}

设备

Device {
  Name = Freenas
  Media Type = File
  Archive Device = /backup/baculaVolumes
  LabelMedia = yes;
  Random Access = Yes;
  RemovableMedia = no;
  Maximum Concurrent Jobs = 20
}

编辑:

选项 1 - 配置错误

首先,您之前是否使用此配置进行过恢复?

是的,到目前为止一切正常,我们可以恢复任何服务器。

我们的恢复工作:

Job {
  Name = "RestoreFiles"
  Type = Restore
  Client=bacula-fd
  FileSet="Full Set"
  Storage = File
  Pool = File
  Messages = Standard
  Where = /tmp/bacula-restores
}

选项 2 - 协议错误

由于名称解析不一致(例如,服务器和客户端对于彼此的名称有不同的看法),或者

名称服务器和 IP 未更改。无论如何,我可以恢复一些文件,只有当卷存储发生变化时它才会崩溃。

协议错误(例如,一个设置为 IPv4,而另一个默认为 IPv6)或

我们对 IPv 协议没有任何改动。所有配置文件都只有 IPv4 IP,我们不使用 DNS 解析。

版本错误(服务器和客户端需要兼容版本)

所有客户端版本均为7.0.5 (28 July 2014),服务器版本(fdsddir)均为:9.0.5 (02 November 2017)

邮件列表中已经讨论过这种特殊情况,但根据我的经验,它总是归结为这 3 个(或 4 个)问题之一。

我们阅读了一些关于此内容的文章,但没有找到任何解决方案。

编辑2-全部在调试中-:

你能在服务器端出现致命错误之前包含日志吗

bacula-fd 错误:

bacula: restore.c:540-50582 === msglen=163 attrExlen=0 msg=293522 3 /var/www/myhostname/shared/src/uploads/2012/05/frChicago_Built_0853_GP_PR.jpeg
bacula: create_file.c:208-50582 Create=/tmp/bacula-restores/var/www/myhostname/shared/src/uploads/2012/05/frChicago_Built_0853_GP_PR.jpeg
bacula: attribs.c:558-50582 File size of restored file /tmp/bacula-restores/var/www/myhostname/shared/src/uploads/2012/05/frChicago_Built_0853_GP_PR.jpeg not correct. Original 245356, restored 196608.
bacula: restore.c:1034-50582 End Do Restore. Files=28688 Bytes=9807931793
bacula: heartbeat.c:141-50582 Send kill to heartbeat id
bacula: job.c:2534-50582 filed>stored: read close session 1
bacula: job.c:2548-50582 Done in job.c
bacula: job.c:2551-50582 2000 OK storage end
bacula: job.c:2576-50582 end_restore_cmd
bacula: job.c:333-50582 Quit command loop. Canceled=1
bacula: job.c:456-50582 Calling term_find_files
bacula: job.c:459-50582 Done with term_find_files
bacula: jcr.c:174-50582 write_last_jobs seek to 192
bacula: job.c:462-0 Done with free_jcr

bacula-dir 错误:

没有出现错误,我给你附上一些痕迹:

bacula-dir: mysql.c:113-0 DB REopen bacula
bacula-dir: next_vol.c:111-0 find_next_vol_for_append: JobId=0 PoolId=2, MediaType=File index=1 create=0 prune=0
bacula-dir: sql_find.c:454-0 fnextvol=SELECT MediaId,VolumeName,VolJobs,VolFiles,VolBlocks,VolBytes,VolMounts,VolErrors,VolWrites,MaxVolBytes,VolCapacityBytes,MediaType,VolStatus,PoolId,VolRetention,VolUseDuration,MaxVolJobs,MaxVolFiles,Recycle,Slot,FirstWritten,LastWritten,InChanger,EndFile,EndBlock,VolType,VolParts,VolCloudParts,LastPartBytes,LabelType,LabelDate,StorageId,Enabled,LocationId,RecycleCount,InitialWrite,ScratchPoolId,RecyclePoolId,VolReadTime,VolWriteTime,ActionOnPurge,CacheRetention FROM Media WHERE PoolId=2 AND MediaType='File' AND Enabled=1 AND VolStatus='Append'    ORDER BY LastWritten IS NULL,LastWritten DESC,MediaId LIMIT 1
bacula-dir: sql_find.c:536-0 Rtn numrows=1
bacula-dir: next_vol.c:227-0 VolJobs=4 FirstWritten=1511755556
bacula-dir: next_vol.c:320-0 Vol=VolBacula-0315 expired=0
bacula-dir: next_vol.c:242-0 return ok=1 find_next_vol
bacula-dir: mysql.c:325-0 closedb ref=1 connected=1 db=7f9bd404ca80
bacula-dir: job.c:1760-0 wstorage=FileRedDos
bacula-dir: job.c:1769-0 wstore=FileRedDos where=Job resource
bacula-dir: ua_output.c:938-0 complete_jcr open db
bacula-dir: mysql.c:113-0 DB REopen bacula
bacula-dir: next_vol.c:111-0 find_next_vol_for_append: JobId=0 PoolId=2, MediaType=File index=1 create=0 prune=0
bacula-dir: sql_find.c:454-0 fnextvol=SELECT MediaId,VolumeName,VolJobs,VolFiles,VolBlocks,VolBytes,VolMounts,VolErrors,VolWrites,MaxVolBytes,VolCapacityBytes,MediaType,VolStatus,PoolId,VolRetention,VolUseDuration,MaxVolJobs,MaxVolFiles,Recycle,Slot,FirstWritten,LastWritten,InChanger,EndFile,EndBlock,VolType,VolParts,VolCloudParts,LastPartBytes,LabelType,LabelDate,StorageId,Enabled,LocationId,RecycleCount,InitialWrite,ScratchPoolId,RecyclePoolId,VolReadTime,VolWriteTime,ActionOnPurge,CacheRetention FROM Media WHERE PoolId=2 AND MediaType='File' AND Enabled=1 AND VolStatus='Append'    ORDER BY LastWritten IS NULL,LastWritten DESC,MediaId LIMIT 1
bacula-dir: sql_find.c:536-0 Rtn numrows=1
bacula-dir: next_vol.c:227-0 VolJobs=4 FirstWritten=1511755556
bacula-dir: next_vol.c:320-0 Vol=VolBacula-0315 expired=0
bacula-dir: next_vol.c:242-0 return ok=1 find_next_vol
bacula-dir: mysql.c:325-0 closedb ref=1 connected=1 db=7f9bd404ca80
bacula-dir: job.c:1760-0 wstorage=FileRedTres
bacula-dir: job.c:1769-0 wstore=FileRedTres where=Job resource
bacula-dir: ua_output.c:938-0 complete_jcr open db
bacula-dir: mysql.c:113-0 DB REopen bacula
bacula-dir: next_vol.c:111-0 find_next_vol_for_append: JobId=0 PoolId=2, MediaType=File index=1 create=0 prune=0
bacula-dir: sql_find.c:454-0 fnextvol=SELECT MediaId,VolumeName,VolJobs,VolFiles,VolBlocks,VolBytes,VolMounts,VolErrors,VolWrites,MaxVolBytes,VolCapacityBytes,MediaType,VolStatus,PoolId,VolRetention,VolUseDuration,MaxVolJobs,MaxVolFiles,Recycle,Slot,FirstWritten,LastWritten,InChanger,EndFile,EndBlock,VolType,VolParts,VolCloudParts,LastPartBytes,LabelType,LabelDate,StorageId,Enabled,LocationId,RecycleCount,InitialWrite,ScratchPoolId,RecyclePoolId,VolReadTime,VolWriteTime,ActionOnPurge,CacheRetention FROM Media WHERE PoolId=2 AND MediaType='File' AND Enabled=1 AND VolStatus='Append'    ORDER BY LastWritten IS NULL,LastWritten DESC,MediaId LIMIT 1
bacula-dir: sql_find.c:536-0 Rtn numrows=1
bacula-dir: next_vol.c:227-0 VolJobs=4 FirstWritten=1511755556
bacula-dir: next_vol.c:320-0 Vol=VolBacula-0315 expired=0
bacula-dir: next_vol.c:242-0 return ok=1 find_next_vol
bacula-dir: mysql.c:325-0 closedb ref=1 connected=1 db=7f9bd404ca80
bacula-dir: job.c:1760-0 wstorage=FileRedDos
bacula-dir: job.c:1769-0 wstore=FileRedDos where=Job resource
bacula-dir: ua_output.c:938-0 complete_jcr open db
bacula-dir: mysql.c:113-0 DB REopen bacula
bacula-dir: next_vol.c:111-0 find_next_vol_for_append: JobId=0 PoolId=2, MediaType=File index=1 create=0 prune=0
bacula-dir: sql_find.c:454-0 fnextvol=SELECT MediaId,VolumeName,VolJobs,VolFiles,VolBlocks,VolBytes,VolMounts,VolErrors,VolWrites,MaxVolBytes,VolCapacityBytes,MediaType,VolStatus,PoolId,VolRetention,VolUseDuration,MaxVolJobs,MaxVolFiles,Recycle,Slot,FirstWritten,LastWritten,InChanger,EndFile,EndBlock,VolType,VolParts,VolCloudParts,LastPartBytes,LabelType,LabelDate,StorageId,Enabled,LocationId,RecycleCount,InitialWrite,ScratchPoolId,RecyclePoolId,VolReadTime,VolWriteTime,ActionOnPurge,CacheRetention FROM Media WHERE PoolId=2 AND MediaType='File' AND Enabled=1 AND VolStatus='Append'    ORDER BY LastWritten IS NULL,LastWritten DESC,MediaId LIMIT 1
bacula-dir: sql_find.c:536-0 Rtn numrows=1
bacula-dir: next_vol.c:227-0 VolJobs=4 FirstWritten=1511755556
bacula-dir: next_vol.c:320-0 Vol=VolBacula-0315 expired=0
bacula-dir: next_vol.c:242-0 return ok=1 find_next_vol
bacula-dir: mysql.c:325-0 closedb ref=1 connected=1 db=7f9bd404ca80
bacula-dir: job.c:1760-0 wstorage=FileRedDos
bacula-dir: job.c:1769-0 wstore=FileRedDos where=Job resource
bacula-dir: ua_output.c:938-0 complete_jcr open db
bacula-dir: mysql.c:113-0 DB REopen bacula
bacula-dir: next_vol.c:111-0 find_next_vol_for_append: JobId=0 PoolId=2, MediaType=File index=1 create=0 prune=0
bacula-dir: sql_find.c:454-0 fnextvol=SELECT MediaId,VolumeName,VolJobs,VolFiles,VolBlocks,VolBytes,VolMounts,VolErrors,VolWrites,MaxVolBytes,VolCapacityBytes,MediaType,VolStatus,PoolId,VolRetention,VolUseDuration,MaxVolJobs,MaxVolFiles,Recycle,Slot,FirstWritten,LastWritten,InChanger,EndFile,EndBlock,VolType,VolParts,VolCloudParts,LastPartBytes,LabelType,LabelDate,StorageId,Enabled,LocationId,RecycleCount,InitialWrite,ScratchPoolId,RecyclePoolId,VolReadTime,VolWriteTime,ActionOnPurge,CacheRetention FROM Media WHERE PoolId=2 AND MediaType='File' AND Enabled=1 AND VolStatus='Append'    ORDER BY LastWritten IS NULL,LastWritten DESC,MediaId LIMIT 1
bacula-dir: sql_find.c:536-0 Rtn numrows=1
bacula-dir: next_vol.c:227-0 VolJobs=4 FirstWritten=1511755556
bacula-dir: next_vol.c:320-0 Vol=VolBacula-0315 expired=0
bacula-dir: next_vol.c:242-0 return ok=1 find_next_vol
bacula-dir: mysql.c:325-0 closedb ref=1 connected=1 db=7f9bd404ca80
bacula-dir: job.c:1760-0 wstorage=FileRedDos
bacula-dir: job.c:1769-0 wstore=FileRedDos where=Job resource
bacula-dir: ua_output.c:938-0 complete_jcr open db

bacula-sd 错误

我附上你全部日志:

bacula-sd: label.c:987-50582 reclen=195 recdata=Bacula 1.0 immortal
bacula-sd: label.c:989-50582 reclen=195 recdata=Bacula 1.0 immortal

Volume Label:
Adata             : 0
Id                : Bacula 1.0 immortal
VerNo             : 11
VolName           : VolBacula-0553
PrevVolName       :
VolFile           : 0
LabelType         : VOL_LABEL
LabelSize         : 195
PoolName          : File
MediaType         : File
PoolType          : Backup
HostName          : myhostname
Date label written: 12-jun-2016 00:56
bacula-sd: label.c:1027-50582 Leave: bool unser_volume_label(DEVICE*, DEV_RECORD*)
bacula-sd: label.c:149-50582 VolHdr.Id OK: Bacula 1.0 immortal

bacula-sd: label.c:188-50582 VolHdr.VerNum=11 OK.

Volume Label:
Adata             : 0
Id                : Bacula 1.0 immortal
VerNo             : 11
VolName           : VolBacula-0553
PrevVolName       :
VolFile           : 0
LabelType         : VOL_LABEL
LabelSize         : 195
PoolName          : File
MediaType         : File
PoolType          : Backup
HostName          : myhostname
Date label written: 12-jun-2016 00:56
bacula-sd: label.c:258-50582 Leave read_volume_label() VOL_OK
bacula-sd: file_dev.c:71-50582 Enter: virtual bool DEVICE::rewind(DCR*)
bacula-sd: label.c:271-50582 Call reserve_volume=VolBacula-0553
bacula-sd: label.c:284-50582 Leave: virtual int DEVICE::read_dev_volume_label(DCR*)
bacula-sd: acquire.c:246-50582 Got correct volume. VOL_OK: VolBacula-0553
bacula-sd: acquire.c:354-50582 dcr=7fc86c008c48 dev=7fc86c001208
bacula-sd: acquire.c:355-50582 MediaType dcr=File dev=File
bacula-sd: acquire.c:357-50582 Leave: bool acquire_device_for_read(DCR*)
bacula-sd: file_dev.c:107-50582 ===== lseek to 6001227206
bacula-sd: file_dev.c:107-50582 ===== lseek to 6999808230
bacula-sd: file_dev.c:107-50582 ===== lseek to 8999744649
bacula-sd: file_dev.c:107-50582 ===== lseek to 9999422519
bacula-sd: block.c:563-50582 block.c:560 Read zero bytes Vol=VolBacula-0553 at 10737375259 on device "Freenas" (/backup/baculaVolumes).
bacula-sd: block.c:563-50582 block.c:560 Read zero bytes Vol=VolBacula-0553 at 10737375259 on device "Freenas" (/backup/baculaVolumes).
bacula-sd: mount.c:858-50582 NumReadVolumes=2 CurReadVolume=1
bacula-sd: dev.c:271-50582 close_dev vol=VolBacula-0553 fd=7 dev=7fc86c001208 adata=0 dev="Freenas" (/backup/baculaVolumes)
bacula-sd: file_dev.c:71-50582 Enter: virtual bool DEVICE::rewind(DCR*)
bacula-sd: dev.c:252-50582 Clear volhdr vol=VolBacula-0553
bacula-sd: acquire.c:54-50582 Enter: bool acquire_device_for_read(DCR*)
bacula-sd: acquire.c:58-50582 dcr=7fc86c008c48 dev=7fc86c001208
bacula-sd: acquire.c:59-50582 MediaType dcr=File dev=File
bacula-sd: acquire.c:92-50582 Want Vol=VolBacula-0294 Slot=0
bacula-sd: acquire.c:106-50582 MediaType dcr=File dev=File
bacula-sd: acquire.c:183-50582 MediaType dcr=File dev=File
bacula-sd: acquire.c:200-50582 dir_get_volume_info vol=VolBacula-0294
bacula-sd: mount.c:636-50582 No swap_dev set. dev->vol=0
bacula-sd: mount.c:591-50582 Must load dev="Freenas" (/backup/baculaVolumes)
bacula-sd: autochanger.c:105-50582 Device "Freenas" (/backup/baculaVolumes) is not an autochanger
bacula-sd: acquire.c:231-50582 open vol=VolBacula-0294
bacula-sd: file_dev.c:138-50582 Enter: virtual bool file_dev::open_device(DCR*, int)
bacula-sd: file_dev.c:184-50582 open disk: mode=OPEN_READ_ONLY open(/backup/baculaVolumes/VolBacula-0294, 0x0, 0640)
bacula-sd: file_dev.c:194-50582 Did open(/backup/baculaVolumes/VolBacula-0294,OPEN_READ_ONLY,0640)
bacula-sd: file_dev.c:211-50582 open dev: disk fd=7 opened
bacula-sd: file_dev.c:214-50582 Leave: virtual bool file_dev::open_device(DCR*, int)
bacula-sd: acquire.c:239-50582 opened dev "Freenas" (/backup/baculaVolumes) OK
bacula-sd: acquire.c:242-50582 calling read-vol-label
bacula-sd: label.c:72-50582 Enter: virtual int DEVICE::read_dev_volume_label(DCR*)
bacula-sd: label.c:75-50582 Enter read_volume_label adata=0 res=1 device="Freenas" (/backup/baculaVolumes) vol=VolBacula-0294 dev_Vol=*NULL*
bacula-sd: file_dev.c:71-50582 Enter: virtual bool DEVICE::rewind(DCR*)
bacula-sd: label.c:970-50582 Enter: bool unser_volume_label(DEVICE*, DEV_RECORD*)
bacula-sd: label.c:987-50582 reclen=195 recdata=Bacula 1.0 immortal
bacula-sd: label.c:989-50582 reclen=195 recdata=Bacula 1.0 immortal

Volume Label:
Adata             : 0
Id                : Bacula 1.0 immortal
VerNo             : 11
VolName           : VolBacula-0294
PrevVolName       :
VolFile           : 0
LabelType         : VOL_LABEL
LabelSize         : 195
PoolName          : File
MediaType         : File
PoolType          : Backup
HostName          : myhostname
Date label written: 22-may-2016 19:10
bacula-sd: label.c:1027-50582 Leave: bool unser_volume_label(DEVICE*, DEV_RECORD*)
bacula-sd: label.c:149-50582 VolHdr.Id OK: Bacula 1.0 immortal

bacula-sd: label.c:188-50582 VolHdr.VerNum=11 OK.

Volume Label:
Adata             : 0
Id                : Bacula 1.0 immortal
VerNo             : 11
VolName           : VolBacula-0294
PrevVolName       :
VolFile           : 0
LabelType         : VOL_LABEL
LabelSize         : 195
PoolName          : File
MediaType         : File
PoolType          : Backup
HostName          : myhostname
Date label written: 22-may-2016 19:10
bacula-sd: label.c:258-50582 Leave read_volume_label() VOL_OK
bacula-sd: file_dev.c:71-50582 Enter: virtual bool DEVICE::rewind(DCR*)
bacula-sd: label.c:271-50582 Call reserve_volume=VolBacula-0294
bacula-sd: label.c:284-50582 Leave: virtual int DEVICE::read_dev_volume_label(DCR*)
bacula-sd: acquire.c:246-50582 Got correct volume. VOL_OK: VolBacula-0294
bacula-sd: acquire.c:354-50582 dcr=7fc86c008c48 dev=7fc86c001208
bacula-sd: acquire.c:355-50582 MediaType dcr=File dev=File
bacula-sd: acquire.c:357-50582 Leave: bool acquire_device_for_read(DCR*)
bacula-sd: label.c:970-50582 Enter: bool unser_volume_label(DEVICE*, DEV_RECORD*)
bacula-sd: label.c:987-50582 reclen=195 recdata=Bacula 1.0 immortal
bacula-sd: label.c:989-50582 reclen=195 recdata=Bacula 1.0 immortal

Volume Label:
Adata             : 0
Id                : Bacula 1.0 immortal
VerNo             : 11
VolName           : VolBacula-0294
PrevVolName       :
VolFile           : 0
LabelType         : VOL_LABEL
LabelSize         : 195
PoolName          : File
MediaType         : File
PoolType          : Backup
HostName          : myhostname
Date label written: 22-may-2016 19:10
bacula-sd: label.c:1027-50582 Leave: bool unser_volume_label(DEVICE*, DEV_RECORD*)
bacula-sd: file_dev.c:107-50582 ===== lseek to 129255
bacula-sd: file_dev.c:107-50582 ===== lseek to 1999987714
bacula-sd: file_dev.c:107-50582 ===== lseek to 3999924136
bacula-sd: file_dev.c:107-50582 ===== lseek to 4999795602
bacula-sd: file_dev.c:107-50582 ===== lseek to 5999731550
bacula-sd: file_dev.c:107-50582 ===== lseek to 6999602969
bacula-sd: file_dev.c:107-50582 ===== lseek to 9999604340
bacula-sd: mount.c:858-50582 NumReadVolumes=2 CurReadVolume=2
bacula-sd: mount.c:878-50582 End of Device reached.
bacula-sd: acquire.c:490-50582 release_device device "Freenas" (/backup/baculaVolumes) is disk
bacula-sd: askdir.c:452-50582 Update cat VolBytes=10737363502 VolABytes=0 Status=Full Vol=VolBacula-0294
bacula-sd: askdir.c:491-50582 >dird CatReq JobId=50582 UpdateMedia VolName=VolBacula-0294 VolJobs=1 VolFiles=2 VolBlocks=166440 VolBytes=10737363502 VolABytes=0 VolHoleBytes=0 VolHoles=0 VolMounts=25 VolErrors=0 VolWrites=3328862 MaxVolBytes=10737418240 EndTime=1511797676 VolStatus=Full Slot=0 relabel=0 InChanger=0 VolReadTime=65066085 VolWriteTime=4039786913 VolFirstWritten=0 VolType=1 VolParts=0 VolCloudParts=0 LastPartBytes=0 Enabled=1
bacula-sd: askdir.c:506-50582 get_volume_info() 1000 OK VolName=VolBacula-0294 VolJobs=1 VolFiles=2 VolBlocks=166440 VolBytes=10737363502 VolABytes=0 VolHoleBytes=0 VolHoles=0 VolMounts=25 VolErrors=0 VolWrites=3328862 MaxVolBytes=10737418240 VolCapacityBytes=0 VolStatus=Full Slot=0 MaxVolJobs=0 MaxVolFiles=0 InChanger=0 VolReadTime=65066085 VolWriteTime=4039786913 EndFile=2 EndBlock=2101947949 VolType=1 LabelType=0 MediaId=294 ScratchPoolId=0 VolParts=0 VolCloudParts=0 LastPartBytes=0 Enabled=1
bacula-sd: acquire.c:552-50582 0 writers, 0 reserve, dev="Freenas" (/backup/baculaVolumes)
bacula-sd: dev.c:271-50582 close_dev vol=VolBacula-0294 fd=7 dev=7fc86c001208 adata=0 dev="Freenas" (/backup/baculaVolumes)
bacula-sd: file_dev.c:71-50582 Enter: virtual bool DEVICE::rewind(DCR*)
bacula-sd: dev.c:252-50582 Clear volhdr vol=VolBacula-0294
bacula-sd: acquire.c:571-50582 JobId=50582 broadcast wait_device_release at 27-nov-2017 16:47:56
bacula-sd: acquire.c:594-50582 Device "Freenas" (/backup/baculaVolumes) released by JobId=50582
bacula-sd: read.c:109-50582 Done reading.
bacula-sd: fd_cmds.c:178-50582 ==== 3099 Job RestoreFiles.2017-11-27_16.45.41_37 end JobStatus=84 JobFiles=28688 JobBytes=8470379438 JobErrors=0 ErrMsg=
bacula-sd: jcr.c:174-50582 write_last_jobs seek to 192
bacula-sd: bnet.c:569-0 socket=5 who=client host=192.168.2.25 port=9103
bacula-sd: dircmd.c:188-0 Got a DIR connection at 27-nov-2017 16:47:56
bacula-sd: cram-md5.c:69-0 send: auth cram-md5 challenge <1387407682.1511797676@bacula-sd> ssl=0
bacula-sd: cram-md5.c:133-0 cram-get received: auth cram-md5 <1407650774.1511797676@bacula-dir> ssl=0
bacula-sd: cram-md5.c:157-0 sending resp to challenge: B4+pbn/l8w4jP8xP80/l5C
bacula-sd: dircmd.c:214-0 Message channel init completed.
bacula-sd: job.c:78-0 <dird: JobId=50582 job=RestoreFiles.2017-11-27_16.45.41_37 job_name=RestoreFiles client_name=bacula-fd type=82 level=70 FileSet=FullSet NoAttr=0 SpoolAttr=1 FileSetMD5=**Dummy** SpoolData=0 WritePartAfterJob=1 PreferMountedVols=1 SpoolSize=0 rerunning=0 VolSessionId=1 VolSessionTime=1511797387 sd_client=0 Authorization=
bacula-sd: job.c:100-0 rerunning=0 VolSesId=1 VolSesTime=1511797387
bacula-sd: acquire.c:658-50582 Attach 0x64001518 to dev "Freenas" (/backup/baculaVolumes)
bacula-sd: job.c:188-50582 sd_calls_client=0 sd_client=0
bacula-sd: job.c:210-50582 RestoreFiles.2017-11-27_16.45.41_37 waiting 1800 sec for FD to contact SD key=NPDJ-IBIL-AHLK-MBOI-NDGF-AKIF-BEPM-KEAK
bacula-sd: bnet.c:569-0 socket=6 who=client host=192.168.2.25 port=9103
bacula-sd: dircmd.c:188-0 Got a DIR connection at 27-nov-2017 16:47:57
bacula-sd: cram-md5.c:69-0 send: auth cram-md5 challenge <1037254028.1511797677@bacula-sd> ssl=0
bacula-sd: cram-md5.c:133-0 cram-get received: auth cram-md5 <600107543.1511797677@bacula-dir> ssl=0
bacula-sd: cram-md5.c:157-0 sending resp to challenge: sm/O5V/6O+5GC++Qb6/J9D
bacula-sd: dircmd.c:214-0 Message channel init completed.
bacula-sd: job.c:228-50582 === Auth=50582 jid=0 canceled=1 errstat=0
bacula-sd: jcr.c:174-0 write_last_jobs seek to 192

答案1

选项 1 - 配置错误

首先,您之前是否使用此配置进行过还原?我有一个“RestoreFiles”作业来完成这项工作,如下所示:

Job {
  Name = "RestoreFiles"
  Description = "Standard Restore template. Only one such job is needed for all standard Jobs/Clients/Storage ..."
  Type = Restore
  Client = bareos-fd
  FileSet = "Linux All"
  Storage = File
  Pool = Incremental
  Messages = Standard
  Where = /tmp/bareos-restores
}

选项 2 - 协议错误

sd其次,需要更多信息。服务器和客户端之间的通信fd使用需要同步的协议。错误通常wanted 2000 OK storage, got 2800 End Job是由于协议不匹配而导致的,可能是:

  • 由于名称解析不一致(例如,服务器和客户端对于彼此的名称有不同的看法),或者
  • 协议错误(例如,一个设置为 IPv4,而另一个默认为 IPv6)或
  • 版本错误(服务器和客户端需要兼容版本)

日志中还会有更多内容来解释这是哪一种情况,例如

21-Jan 00:07 xxxxxx-dir JobId 1199: Start Restore Job RestoreFiles.2016-01-21_00.07.44_16
21-Jan 00:07 xxxxxx-dir JobId 1199: Error: bsock.c:221 Socket open error. proto=28 port=9103. ERR=Protocol not supported
21-Jan 00:07 xxxxxx-dir JobId 1199: Using Device "DAT160" to read.
21-Jan 00:07 xxxxxx-sd JobId 1199: Ready to read from volume "Tape009" on tape device "DAT160" (/dev/nsa0).
21-Jan 00:07 xxxxxx-sd JobId 1199: Forward spacing Volume "Tape009" to file:block 12:0.
21-Jan 00:07 xxxxxx-fd JobId 1199: Error: bsock.c:221 Socket open error. proto=28 port=9103. ERR=Protocol not supported
21-Jan 00:55 xxxxxx-sd JobId 1199: Elapsed time=00:47:30, Transfer rate=6.099 M Bytes/second
21-Jan 00:07 xxxxxx-dir JobId 1199: Error: bsock.c:221 Socket open error. proto=28 port=9102. ERR=Protocol not supported
21-Jan 00:55 xxxxxx-dir JobId 1199: Using Device "Backup" to read.
21-Jan 00:55 xxxxxx-dir JobId 1199: Fatal error: Bad response to Storage command: wanted 2000 OK storage, got 2800 End Job TermCode=69 JobFiles=147756 ReadBytes=17353960553 JobBytes=17353960553 Errors=1 VSS=0 Encrypt=0 CommBytes=0 CompressCommBytes=0

**请注意ERR=Protocol not supported,在这种情况下,客户端通过 IPv6 进行(错误)解析。

邮件列表中已经讨论过这种特殊情况,但根据我的经验,它总是归结为这 3 个(或 4 个)问题之一。

另外,请不要忘记,在任何服务器端配置更改之后,您需要重新启动 Director 和 Storage Manager,否则它们可能对配置有不同的想法,并且可能会出现此类随机错误。

我将根据所提供的其他信息修改此答案。:)

相关内容