View Issue Details

IDProjectCategoryView StatusLast Update
0001519bareos-coreGeneralpublic2023-03-02 15:02
Reportercolttt Assigned To 
Status newResolutionopen 
PlatformLinuxOSDebianOS Version10
Product Version21.1.6 
Summary0001519: bls exit with wrong exit code if file damagesd
DescriptionI would expect that bls exit with a non-zero exit code if a file is not valid/contains errors, but it always exit with 0:

bls -j /backupdata/0004HD ; echo $?
bls: stored/ Using device: "/backupdata" for reading.
02-Mar 14:56 bls JobId 0: Ready to read from volume "0004HD" on device "FileStorage" (/backupdata).
Volume Record: File:blk=0:196 SessId=373 SessTime=1632137493 JobId=35 DataLen=161
02-Mar 14:56 bls JobId 0: Error: stored/ Volume data error at 3:1530691745!
Block checksum mismatch in block=28070848 len=64512: calc=c8a85150 blk=8ed1c2cb
bls: stored/ Dump block with checksum error 5c36fed8: size=64512 BlkNum=28070848
               Hdrcksum=8ed1c2cb cksum=c8a85150
bls: stored/ Rec: VId=373 VT=1632137493 FI=359968 Strm=contCOMPRESSED len=35511 p=5c375130
bls: stored/ Rec: VId=373 VT=1632137493 FI=359968 Strm=COMPRESSED len=65580 p=5c37dbf3
02-Mar 14:56 bls JobId 0: Releasing device "FileStorage" (/backupdata).
Steps To Reproduce- manipulate a backup container file
- run bls -j <BACKUPFILE>
- exit code is zero
 - it should be non zero (1 = programm error, 2 = (could be) file error)
TagsNo tags attached.
bareos-master: impact
bareos-master: action
bareos-19.2: impact
bareos-19.2: action
bareos-18.2: impact
bareos-18.2: action
bareos-17.2: impact
bareos-17.2: action
bareos-16.2: impact
bareos-16.2: action
bareos-15.2: impact
bareos-15.2: action
bareos-14.2: impact
bareos-14.2: action
bareos-13.2: impact
bareos-13.2: action
bareos-12.4: impact
bareos-12.4: action


There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2023-03-02 15:02 colttt New Issue