[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bacula-devel] storing file size in the catalog

Kjetil Torgrim Homme <kjetilho@xxxxxxxxx> 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:


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.

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
Bacula-devel mailing list

This mailing list archive is a service of Copilotco.