From: Mantis B. T. <no...@bu...> - 2011-08-19 15:59:12
|
A NOTE has been added to this issue. ====================================================================== http://bugs.bacula.org/view.php?id=1759 ====================================================================== Reported By: bartosz.cisek Assigned To: ebollengier ====================================================================== Project: bacula Issue ID: 1759 Category: btape Reproducibility: always Severity: major Priority: high Status: assigned ====================================================================== Date Submitted: 2011-08-17 12:12 BST Last Modified: 2011-08-19 16:59 BST ====================================================================== Summary: Bacula creates backup on multiple volumens that can't be restored Description: >From time to time bacula creates backup that can't be restored. After some research I found that jobs that match SQL query are problematic: SELECT JobId FROM JobMedia WHERE StartBlock <> 0 AND EndBlock = 0; All those jobs are spanning two volumens. First one looks broken (EndBlock and EndFile equals 0 while StartBlock and StartFile are not), second looks ok according to source code [1]. [1] http://www.bacula.org/git/cgit.cgi/bacula/tree/bacula/src/stored/block.c#n620 Steps to Reproduce: Each restore end the same way: "Restore OK -- warning file count mismatch" Additional Information: http://sourceforge.net/mailarchive/forum.php?thread_name=201108101307.p7AD7pwf012352%40higson.cam.lispworks.com&forum_name=bacula-users ====================================================================== ---------------------------------------------------------------------- (0005946) ebollengier (administrator) - 2011-08-17 13:11 http://bugs.bacula.org/view.php?id=1759#c5946 ---------------------------------------------------------------------- What you describe is very serious, unfortunately, I can't reproduce it here (see my output). Please, attach the bootstrap file generated by the job (option WriteBootStrap) and also the bootstrap generated by the restore command. *list files jobid=5 +---------------------------+ | filename | +---------------------------+ | /tmp/regress/build/po/big | +---------------------------+ +-------+---------+---------------------+------+-------+----------+-----------+-----------+ | jobid | name | starttime | type | level | jobfiles | jobbytes | jobstatus | +-------+---------+---------------------+------+-------+----------+-----------+-----------+ | 5 | SpanVol | 2011-08-17 14:07:11 | B | F | 1 | 5,120,000 | T | +-------+---------+---------------------+------+-------+----------+-----------+-----------+ *list jobmedia jobid=5 +-------+------------+------------+-----------+ | jobid | volumename | firstindex | lastindex | +-------+------------+------------+-----------+ | 5 | kk | 1 | 1 | | 5 | ll | 1 | 1 | +-------+------------+------------+-----------+ +-------+---------+---------------------+------+-------+----------+-----------+-----------+ | jobid | name | starttime | type | level | jobfiles | jobbytes | jobstatus | +-------+---------+---------------------+------+-------+----------+-----------+-----------+ | 5 | SpanVol | 2011-08-17 14:07:11 | B | F | 1 | 5,120,000 | T | +-------+---------+---------------------+------+-------+----------+-----------+-----------+ *restore First you select one or more JobIds that contain files to be restored. You will be presented several methods of specifying the JobIds. Then you will be allowed to select which files from those JobIds are to be restored. To select the JobIds, you have the following choices: 1: List last 20 Jobs run 2: List Jobs where a given File is saved 3: Enter list of comma separated JobIds to select 4: Enter SQL list command 5: Select the most recent backup for a client 6: Select backup for a client before a specified time 7: Enter a list of files to restore 8: Enter a list of files to restore before a specified time 9: Find the JobIds of the most recent backup for a client 10: Find the JobIds for a backup for a client before a specified time 11: Enter a list of directories to restore for found JobIds 12: Select full restore to a specified Job date 13: Cancel Select item: (1-13): 5 Automatically selected Client: 127.0.0.1-fd Automatically selected FileSet: Full Set +-------+-------+----------+-----------+---------------------+------------+ | jobid | level | jobfiles | jobbytes | starttime | volumename | +-------+-------+----------+-----------+---------------------+------------+ | 5 | F | 1 | 5,120,000 | 2011-08-17 14:07:11 | kk | | 5 | F | 1 | 5,120,000 | 2011-08-17 14:07:11 | ll | +-------+-------+----------+-----------+---------------------+------------+ You have selected the following JobId: 5 Building directory tree for JobId(s) 5 ... 1 files inserted into the tree. You are now entering file selection mode where you add (mark) and remove (unmark) files to be restored. No files are initially added, unless you used the "all" keyword on the command line. Enter "done" to leave this mode. cwd is: / $ m * 1 file marked. $ done Bootstrap records written to /tmp/regress/working/127.0.0.1-dir.restore.1.bsr The job will require the following Volume(s) Storage(s) SD Device(s) =========================================================================== kk File FileStorage ll File FileStorage Volumes marked with "*" are online. 1 file selected to be restored. Run Restore job JobName: RestoreFiles Bootstrap: /tmp/regress/working/127.0.0.1-dir.restore.1.bsr Where: /tmp/regress/tmp/bacula-restores Replace: always FileSet: Full Set Backup Client: 127.0.0.1-fd Restore Client: 127.0.0.1-fd Storage: File When: 2011-08-17 14:07:41 Catalog: MyCatalog Priority: 10 Plugin Options: *None* OK to run? (yes/mod/no): Job queued. JobId=6 * * *m 17-Aug 14:07 127.0.0.1-dir JobId 6: Start Restore Job RestoreFiles.2011-08-17_14.07.43_10 17-Aug 14:07 127.0.0.1-dir JobId 6: Using Device "FileStorage" 17-Aug 14:07 127.0.0.1-sd JobId 6: Ready to read from volume "kk" on device "FileStorage" (/tmp/regress/tmp). 17-Aug 14:07 127.0.0.1-sd JobId 6: Forward spacing Volume "kk" to file:block 0:9544. 17-Aug 14:07 127.0.0.1-sd JobId 6: End of Volume at file 0 on device "FileStorage" (/tmp/regress/tmp), Volume "kk" 17-Aug 14:07 127.0.0.1-sd JobId 6: Ready to read from volume "ll" on device "FileStorage" (/tmp/regress/tmp). 17-Aug 14:07 127.0.0.1-sd JobId 6: Forward spacing Volume "ll" to file:block 0:186. 17-Aug 14:07 127.0.0.1-sd JobId 6: End of Volume at file 0 on device "FileStorage" (/tmp/regress/tmp), Volume "ll" 17-Aug 14:07 127.0.0.1-sd JobId 6: End of all volumes. 17-Aug 14:07 127.0.0.1-dir JobId 6: Bacula 127.0.0.1-dir 4.1.20 (21Jul11): Build OS: x86_64-unknown-linux-gnu archlinux JobId: 6 Job: RestoreFiles.2011-08-17_14.07.43_10 Restore Client: 127.0.0.1-fd Start time: 17-Aug-2011 14:07:45 End time: 17-Aug-2011 14:07:45 Files Expected: 1 Files Restored: 1 Bytes Restored: 5,120,000 Rate: 0.0 KB/s FD Errors: 0 FD termination status: OK SD termination status: OK Termination: Restore OK ---------------------------------------------------------------------- (0005947) kern (administrator) - 2011-08-18 07:46 http://bugs.bacula.org/view.php?id=1759#c5947 ---------------------------------------------------------------------- I think you should start by showing us the backup job output for the job that cannot be restored, and a listing of the JobMedia records that were produced with that Job. Include your bacula-dir.conf and bacula-sd.conf files. Then show us the job output for restore that fails -- include *all* the commands that you used to run the restore job. We will probably want this with some debug level at some point. It is clear that if EndBlock and EndFile are zero, something went wrong and a restore will not be possible, but there is no reason for Bacula to create such records unless there was a failure or perhaps your catalog was produced by a bscan. Why have you indicated btape in the category field? -- btape should not be part of what is happening here. Otherwise this bug report does not make sense. ---------------------------------------------------------------------- (0005948) bartosz.cisek (reporter) - 2011-08-18 14:03 http://bugs.bacula.org/view.php?id=1759#c5948 ---------------------------------------------------------------------- I've posted most of needed info in mail thread on bacula-users (linked in task). I didn't see the point to copy paste it here ;) btape category was used because I had no idea which one to choose. Attached bacula-dir.conf and bacula-sd.conf ---------------------------------------------------------------------- (0005949) kern (administrator) - 2011-08-19 07:31 http://bugs.bacula.org/view.php?id=1759#c5949 ---------------------------------------------------------------------- Not able to reproduce. Reporter refuses information requested. Bug closed. ---------------------------------------------------------------------- (0005950) bartosz.cisek (reporter) - 2011-08-19 07:46 http://bugs.bacula.org/view.php?id=1759#c5950 ---------------------------------------------------------------------- Hi! I really don't understand your comment. I wrote I already provided all needed information, and pointed to it (bacula-users list, link attached to task). I also attached file you asked for. If I can be more helpful please tell me how. I said that copy-paste is pointless as whole information is easyly accessilble and properly linked. If you wish I'll put it here. ---------------------------------------------------------------------- (0005951) kern (administrator) - 2011-08-19 16:59 http://bugs.bacula.org/view.php?id=1759#c5951 ---------------------------------------------------------------------- Have you tried the link? It does not work for me -- well it drops me into probably thousands of possible email conversations. Providing the information here saves us time and ensures it is here for future reference. With out the information (backup/restore logs and command sequences used for restore), it is not possible to draw any conclusions). >From what I see in your conf files, you are using a virtual disk changer which is probably not part of the project and thus not supported. Issue History Date Modified Username Field Change ====================================================================== 2011-08-17 12:12 bartosz.cisek New Issue 2011-08-17 13:11 ebollengier Note Added: 0005946 2011-08-17 13:11 ebollengier Assigned To => ebollengier 2011-08-17 13:11 ebollengier Status new => feedback 2011-08-18 07:46 kern Note Added: 0005947 2011-08-18 14:03 bartosz.cisek Note Added: 0005948 2011-08-18 14:03 bartosz.cisek Status feedback => assigned 2011-08-18 14:03 bartosz.cisek File Added: bacula-dir.conf 2011-08-18 14:04 bartosz.cisek File Added: bacula-sd.conf 2011-08-19 07:31 kern Note Added: 0005949 2011-08-19 07:31 kern Resolution open => unable to reproduce 2011-08-19 07:46 bartosz.cisek Note Added: 0005950 2011-08-19 16:59 kern Note Added: 0005951 ====================================================================== |