Bacula-users

[Bacula-users] bacula catalog inconsistency

2015-07-27 07:55:52
Subject: [Bacula-users] bacula catalog inconsistency
From: Lukas Hejtmanek <xhejtman AT ics.muni DOT cz>
To: Bacula-users AT lists.sourceforge DOT net
Date: Mon, 27 Jul 2015 13:54:01 +0200
Hello,

I do regular backups with bacula 5.2.6 on debian. Sometime I notice, that some
files cannot be restored:

17-Jul 12:57 director-tergum.ics.muni.cz JobId 1584: Bacula 
director-tergum.ics.muni.cz 5.2.6 (21Feb12):
  Build OS:               x86_64-pc-linux-gnu debian 7.0
  JobId:                  1584
  Job:                    RestoreFilesBay2-ics.2015-07-17_12.57.05_19
  Restore Client:         bacula-fd
  Start time:             17-Jul-2015 12:57:07
  End time:               17-Jul-2015 12:57:07
  Files Expected:         1
  Files Restored:         0
  Bytes Restored:         0
  Rate:                   0.0 KB/s
  FD Errors:              0
  FD termination status:  OK
  SD termination status:  OK
  Termination:            Restore OK -- warning file count mismatch

the cause of this is some inconsistency/corruption in catalog. According to
catalog, the 'to be restored file' is in job number 1557 which uses Volume
Vol7457. However, it seems that 25 files of that job are in volume Vol7456.

However, bacula thinks, that volume Vol7456 can be purged as it does not
contain useful data.

Using bscan, I can see:
17-Jul 12:25 bscan JobId 0: End of Volume at file 1 on device "LocalHSM19"
(/var/lib/bacula/spool/tape19), Volume "Vol7456"
bscan: bscan.c:338-0 ========== JobId=0 ========
bscan: bscan.c:338-0 ========== JobId=1557 ========
bscan: bscan.c:338-0 ========== JobId=1558 ========
bscan: bscan.c:338-0 ========== JobId=1560 ========
17-Jul 12:25 bscan JobId 0: End of all volumes.
bscan: bscan.c:659 End of all Volumes. VolFiles=1 VolBlocks=0
VolBytes=283,460,853
Records added or updated in the catalog:
      1 Media
      1 Pool
      3 Job
     49 File

moreover, bls show that the volume Vol7456 contains the file I tried to
restore:
17-Jul 12:29 bls JobId 0: Ready to read from volume "Vol7456" on device 
"LocalHSM19" (/var/lib/bacula/spool/tape19).
bls JobId 1557: -rw-r--r--   1 root     root            1388 2015-07-15 
22:37:53  /etc/hosts.deny

I tried to use bscan -s and bscan -s -m but nothing changed. The file
/etc/hosts.deny from jobid 1557 cannot be restored. Bacula thinks that job
1557 has data only in the volume Vol7457.

Is there anything I could do? And mainly, how can I prevent this situation to
happen again? I noticed this behavior few times. 

-- 
Lukáš Hejtmánek

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

<Prev in Thread] Current Thread [Next in Thread>