The history of my problem is: One of the backup jobs were performed when MySQL (catalog) turned into read-only mode. In bacula log file I had a ton of messages like:
05-Jul 02:30 akademia-dir: AkademiaBackup.2009-07-05_02.10.00 Fatal error: sql_create.c:732 sql_create.c:732 insert INSERT INTO File (FileIndex,JobId,PathId,FilenameId,LStat,MD5) VALUES (116138,55,10984,5336,'gB 7oI6 IGk B Pp Pp A J4n BAA BQ BKP3ci BIz3Zr BIz3Zr A A C','b/9On//ib/+ZF//T6kUYvD') failed: The MySQL server is running with the --read-only option so it cannot execute this statement After that when I tried to run any job again I had an error: 05-Jul 13:17 akademia-sd: AkademiaBackup.2009-07-05_13.17.51 Error: I cannot write on Volume "AkademiaVolume001" because: The number of files mismatch! Volume=154 Catalog=152 Probably everything would be OK if I just was to run: bscan -c /etc/bacula/bacula-sd.conf -m -v -V AkademiaVolume001 /dev/nst0 But unfortunatelly I started to fix it "my way" ;) The idea of "my way" was to make bacula believe that there is no more then 152 files on tape. What I did was: mt asf 153 mt weof I believed that EOF at position of file 153 will result in only 152 files on the tape. Now I know I was wrong. :) So there is my first question: Where can I find any document clearly describing the method of writing data to tape device? This question is even not much related to bacula itself - I just would like to have some background on low level tape operating. So, when my backup jobs started to yell: 05-Jul 13:17 akademia-sd: AkademiaBackup.2009-07-05_13.17.51 Error: I cannot write on Volume "AkademiaVolume001" because: The number of files mismatch! Volume=155 Catalog=152 I finally bscaned my volume with above bscan command hoping it would solve the problem. At the end of bscan I received: [...] 05-Jul 16:37 bscan: End of Volume at file 153 on device "AkademiaLTO" (/dev/nst0), Volume "AkademiaVolume001" bscan: bscan.c:315 Create JobMedia for Job AkademiaBackup.2009-07-05_02.10.00 05-Jul 16:37 bscan: End of all volumes. bscan: bscan.c:871 Updated Media record at end of Volume: AkademiaVolume001 bscan: bscan.c:618 End of all Volumes. VolFiles=153 VolBlocks=0 VolBytes=125,469,021,329 Records would have been added or updated in the catalog: 1 Media 1 Pool 42 Job 453596 File But after that I still have: 05-Jul 16:58 akademia-sd: AkademiaBackup.2009-07-05_13.37.27 Error: I cannot write on Volume "AkademiaVolume001" because: The number of files mismatch! Volume=155 Catalog=153 So, my second question is: How can I "delete" files from tape or fix this problem in any other way? Thanks, Mike ------------------------------------------------------------------------------ _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users