Hi! On Sunday 09 December 2007 16:51, Dirk Bartley wrote: > Hello Silver > > I'd like to discover what is causing this. Please turn on sql debugging > in preferences and we should be able to isolate the sql command that is > getting the list of files. The result should be an sql query that > should look alot like this: > > bat: restore/restoretree.cpp:534 Query cmd : SELECT DISTINCT > Filename.Name AS FileName, Filename.FilenameId AS FilenameId FROM File > INNER JOIN Filename on (Filename.FilenameId=File.FilenameId) WHERE > File.PathId=269827 AND File.Jobid IN (3641,3632,3619,3606,3593) AND > Filename.Name!='' ORDER BY FileName
I use MySQL 5.0.45, but I don't see such a query in Bat's output - should I see this command when pressing Refresh in Version Browser? In my case I see this: ===== $ bat -c bat-baculaclient.conf bat: restore/restoretree.cpp:771 Query cmd : SELECT Job.Jobid AS Id, Job.EndTime AS EndTime, Job.Level AS Level, Job.Name AS JobName, Job.purgedfiles AS Purged FROM Job INNER JOIN Client ON (Job.ClientId=Client.ClientId) INNER JOIN FileSet ON (Job.FileSetId=FileSet.FileSetId) WHERE Client.Name='baculaclient-fd' AND Job.name = 'baculaclient-userdata' AND FileSet.FileSet='userdata-snap' ORDER BY Job.EndTime DESC LIMIT 150 bat: restore/restoretree.cpp:214 Query cmd : SELECT FilenameId FROM Filename WHERE name='' bat: restore/restoretree.cpp:238 Query cmd : SELECT DISTINCT Path.Path AS Path, File.PathId AS PathId FROM File INNER JOIN Path ON (File.PathId=Path.PathId) WHERE File.FilenameId=1 AND File.Jobid IN (13291,13267,13243,13219,13194,13170,13146,13087,13063,13039,13015,12991,12943,12919,12775,12607) ORDER BY Path bat: restore/restoretree.cpp:589 did not perform query, pathid=-1 not found bat: restore/restoretree.cpp:589 did not perform query, pathid=-1 not found ===== > The first big question is if the sql query is returning the files in > question. Once I know that I can recommend the next step in figuring > out what is happening. When I enter commands restore/restoretree.cpp:771 or restore/restoretree.cpp:238 in mysql console, I get "Empty set". I noticed smth while looking at Restore's browser: all of the missing folders have: * mode ---------- * user root * group wheel * size 0 * date 1970-01-01 03:00:00 > In psql, I get results like: > filename | filenameid > ---------------+------------ > ATTXX_001.pdf | 1067479 > CINTA_001.pdf | 1250307 > COVER_001.pdf | 1063069 > COVER_002.pdf | 1266269 > ENGPR_003.pdf | 1411193 > ENGPR_004.pdf | 1664069 > OUTSO_001.pdf | 1320048 > RELST_001.pdf | 1640153 > (8 rows) > > On Thu, 2007-12-06 at 14:47 +0200, Silver Salonen wrote: > > Hello > > > > I have Bat installed from 2.2.5 version on FreeBSD-6.2. The problem is that > > Version Browser doesn't show some of the folders. If I browse files > > via "Restore" command, they're there though. > > > > I just checked what does debugging show me and I see that while querying > > folders, Bat continues querying subfolders of the next folder when it meets > > an estonian word "Töögraafikud" in foldername: > > ===== > > ... > > bat: console/console.cpp:623 got: /mnt/snap/usr/home/rakvere/Palgalipikud/ > > > > 15631 > > bat: console/console.cpp:623 got: /mnt/snap/usr/home/rakvere/Töögraafikud/ > > > > 12861 > > bat: console/console.cpp:623 got: /mnt/snap/usr/home/roccaalmare/Maildir/ > > > > 8164 > > ... > > bat: console/console.cpp:623 got: /mnt/snap/usr/home/sikupilli/Raport/ 13415 > > bat: console/console.cpp:623 got: /mnt/snap/usr/home/sikupilli/Töögraafikud/ > > 12857 > > bat: console/console.cpp:623 got: /mnt/snap/usr/home/silver/ 7840 > > ... > > ===== > > May it be related to it? I also see that there's another folder "Töötajad", > > which contains subfolders, and its subfolders are queried OK. > > > > Also (here comes the second issue ;), if I browse files in Version Browser, > > some of the jobs are marked dark-yellow-green and cannot be selected - why is > > that? One of these jobs is full backup done a month ago and its volume is not > > purged from database yet (although there's a newer full backup of the same > > job that was not completed successfully and its volume is purged now). > > After inspecting the code, I tend to think that your assesment of the > volumes showing up yellow as not being purged as possibly being > inaccurate. Unless I've done something usually correct like with the > above case seems like it may be. Please double check, all jobs which > have been purged should show up as uncheckable and darkYellow. Grey is > for jobs that are not purged but have been unchecked and then a refresh > has been done. In Media section I see full backup volumes: frontier-userdata-full-0002 Purged 2007-12-03 ... frontier-userdata-full-0004 Used 2007-11-05 ... The associated job query for frontier-userdata-full-0002 returns nothing, but for frontier-userdata-full-0004 it lists 18 rows of the same job (Id 12439) with status "Completed successfully". In Version Browser the only full backup I see is dark yellow job (Id 12439) with end-time 2007-11-05. In another Bacula 2.2.5 (with similar setup) there are 4 volumes (Status Used) with full backups of userdata (2 oldest are actually done with a different fileset). In Version Browser I see 4 full jobs total, but 2 of them are wrong - both of them are green, level F, Name frontier-userdata, but in JobList they have actually status "Fatal error" (other metadata is correct). However, these failed jobs are newer than 2 oldest jobs I mentioned before. What's next? :) -- Silver ------------------------------------------------------------------------- SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users