Dear Bareos community, This is my first post on this list and I hope that he does not make an annoyance. My name is Matthias and I use Bareos on FreeBSD.
My current setup makes backups from multiple clients to a FileStorage that resides on a NAS. In addition, copy jobs are run at defined times to copy selected backups (for example, all full backups) to a connected LTO-4 tape. The catalog is stored in a MySQL database or PostgreSQL database. Recently I had the following case: 1) the copy job had the job of copying another full backup to a previously described tape 2) the tape was mounted, but had unintentionally activated the hardwareside write protection 3) Bareos has marked the tape as "Error" after the unsuccessful attempt to write and deleted all jobs / files from the catalog So far so good. There is fortunately bscan. So I made the attempt to get the tape back into the catalog, including the jobs and files: # Bscan -S -B mysql -h 127.0.0.1 -n bareos -u bareos -P ***** -s -m -r -c /usr/local/etc/bareos/bareos-sd.d/bareos- Sd.conf -V Full_2017-01 TapeDevice Bscan: bscan.c: 507-0 Record: SessId = 33 SessTim = 1498483083 FileIndex = 12295 Stream = 11 len = 180 Bscan: bscan.c: 507-0 Record: SessId = 33 SessTim = 1498483083 FileIndex = -5 stream = 6 len = 56 Bscan: bscan.c: 507-0 Record: SessId = 33 SessTim = 1498483083 FileIndex = -5 stream = 6 len = 260 Segmentation fault (core dumped) This ran for a while, then it ended with a segmentation fault, without reference to the error cause. After some research I got the hint that a possible error source could be the database backend. So I changed the MySQL version against a freshly installed PostgreSQL version. # Bscan -S -B postgresql -h 127.0.0.1 -n bareos -u bareos -P ***** -s -m -r -c /usr/local/etc/bareos/bareos-sd.d/bareos- Sd.conf -V Full_2017-01 TapeDevice This time, there was more evidence of the problem: To: bscan.c: 507-0 Record: SessId = 33 SessTim = 1498483083 FileIndex = 12295 Stream = 11 len = 180 Bscan: bscan.c: 507-0 Record: SessId = 33 SessTim = 1498483083 FileIndex = -5 stream = 6 len = 56 12-Jul 02:58 bscan JobId 0: Error: sql_update.c: 189 sql_update.c: 189 update update job SET JobStatus = '', Level = 'F', EndTime = '2017-06- 26 17:44:49 'clientId = 6, job bytes = 12177753183635963904, ReadBytes = 0, job files = 5120, job Errors = 0, VolSessionId = 33, VolSessionTime = 1498483083, PoolId = 5, FileSetId = 2, JobTDate = 1498491889, RealEndTime =' 2017-06-26 17: 44: 49 ', PriorJobId = 0, HasBase = 0, PurgedFiles = 0 WHERE JobId = 9 failed: ERROR: bigint out of range Bscan: bscan.c: 1356-0 Could not update JobId = 9 record. ERR = sql_update.c: 189 update UPDATE Job SET JobStatus = '', Level = 'F', EndTime = '2017-06-26 17:44:49', ClientId = 6, JobBytes = 12177753183635963904, ReadBytes = 0, JobFiles = 5120, JobErrors = 0, VolSessionId = 33, VolSessionTime = 1498483083, PoolId = 5, FileSetId = 2, JobTDate = 1498491889, RealEndTime = '2017-06-26 17:44:49', PriorJobId = 0, HasBase = PurgedFiles = 0 WHERE JobId = 9 failed: ERROR: bigint out of range Bscan: bscan.c: 507-0 Record: SessId = 33 SessTim = 1498483083 FileIndex = -5 stream = 6 len = 260 Segmentation fault (core dumped) It appears that one of the values to be updated exceeds the value range of the data type set in the database. My guess was JobBytes, however ... this number is unrealistically high. So it just seems to be a consequential error. Has anyone here already made a similar observation and can give me a reference to possible reasons of this behavior? Best regards, Matthias -- You received this message because you are subscribed to the Google Groups "bareos-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to bareos-devel+unsubscr...@googlegroups.com. To post to this group, send email to bareos-devel@googlegroups.com. For more options, visit https://groups.google.com/d/optout.