Bacula-users

Re: [Bacula-users] Way to check ANY bacula volume on disk

2015-08-12 12:49:18
Subject: Re: [Bacula-users] Way to check ANY bacula volume on disk
From: Josip Deanovic <djosip+news AT linuxpages DOT net>
To: bacula-users AT lists.sourceforge DOT net
Date: Wed, 12 Aug 2015 18:43:40 +0200
On Wednesday 2015-08-12 16:17:42 Andrey Tataranovich wrote:
> On Tue, 11 Aug 2015 15:47:40 +0100
> 
> Martin Simmons <martin AT lispworks DOT com> wrote:
> > You could use bls -j with the volume file to scan the whole volume.
> 
> I'm upset with bls behavior - it does not return non zero exit code
> on error and output error messages to stdout instead of stderr.
> 
> # bls -j /bacula/backup/Libvirt-0177; echo $?
> bls: butil.c:287 Using device: "/bacula/backup" for reading.
> 12-Aug 16:11 bls JobId 0: Ready to read from volume "Libvirt-0177" on
> device "FileStorage" (/bacula/backup). Volume Record: File:blk=0:196
> SessId=6 SessTime=1438429819 JobId=0 DataLen=161 Begin Job Session
> Record: File:blk=0:64708 SessId=6 SessTime=1438429819 JobId=7462
> Job=Backup_Win2k3.2015-08-02_22.00.00_20 Date=02-Aug-2015 22:18:05
> Level=F Type=B 12-Aug 16:12 bls JobId 0: Error: block.c:318 Volume data
> error at 1:1073721369! Block checksum mismatch in block=83221
> len=64512: calc=91787392 blk=161ef20e
> 0
> 
> Is it fixed in newer versions? Currently I'm using 5.2.6.


Hi Andrey,


I am using bacula 7.0.5 and I have tried to emulate the damaged backup
volume but I have failed to get the Block checksum mismatch error.

Since in my case bls continues to work up until the end of the volume
it returns 0 which might be fine depending on the developer's decision
whether the operation should be considered successful or not.

Im my tests all the messages, including Error messages are sent to the
stdout instead of the stderr. Again, there might be some logic behind
it but it might be a good idea to send Error messages to the stderr.

In your case I believe that the return value should be 1 as bls
obviously encountered a fatal error and exited but since I failed to
reproduce the problem you are experiencing I cannot confirm that is has
been fixed without looking into the code.


-- 
Josip Deanovic

------------------------------------------------------------------------------
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users