Kjetil Torgrim Homme <[EMAIL PROTECTED]> writes: > I wanted to make a du(1) style report for Bacula, but was a bit > surprised to see that this information is not readily available in the > File table -- it's encoded as quasi-base64 in the LStat column. I > modified base64.sql[1] to support Bacula's format, but it's running > too slow to be useful, ie. less than 10k filesizes extracted per > second on my relatively beefy database server.
I forgot to include the link to the MySQL code for those interested: http://users.linpro.no/kjetilho/bacula_base64.sql Usage is like this: SELECT DISTINCT PathId, SUM(bacula_lstat_size(LStat)) AS diskusage FROM File WHERE JobId = 103 GROUP BY PathId ORDER BY diskusage; The above is not particularily useful on its own, since it behaves like du -S, ie. it doesn't accumulate usage of subdirectories. -- regards, Kjetil T. Homme Linpro AS ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Bacula-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/bacula-devel
