Bacula-users

Re: [Bacula-users] Finding largest file(s) backed up for a specific job

2011-04-05 03:02:07
Subject: Re: [Bacula-users] Finding largest file(s) backed up for a specific job
From: Geert Stappers <Geert.Stappers AT vanadgroup DOT com>
To: John Stoffel <john AT stoffel DOT org>, "bacula-users AT lists.sourceforge DOT net" <bacula-users AT lists.sourceforge DOT net>
Date: Tue, 5 Apr 2011 08:59:16 +0200
Op 20110401 om 04:30 schreef John Stoffel:
> 
> John> I've been happily running bacula at home, and usualy it's pretty
> John> predictable about the size of data backed up each night, but
> John> last night I had an incremental run for a specfic client which
> John> used 8Gb of data, when I normally expect around 500mb or so.
> 
> John> Is there an easy mysql query I can use to:
> 
> John> a) find the largest file(s) backed up for a particular jobid?
> 
> Ok, I've googled, read back in the archives about the File.LStat field
> and how the file size is in a strange Base64 (almost) encodiing which
> needs to be hacked on to get out the sizes.
> 
> Looks like I'll just need to:
> 
> 1. write a perl script to read in a jobid, then pull out the files
> from that job.
> 2. For each file, pull out the File.LStat field and decode the info.
> 3. And finally then I can search for the largest file(s).  
> 
> I'll post something when I'm done.  I'd prefer to do it in mysql
> directly, but it looks too funky to parse the string properly without
> writing really crazy (to me!) SQL procedures or cursors.  Not worth
> it.

On march 15th posted Kjetil Torgrim Homme his "bacula-du" script
to this mailinglist. The 'du' in the name is from "disk usage",
same as the UNIX command `du`. Subject line was/is "file listing"

Find attached my modified version plus a diff.


Hope this helps
Geert Stappers
Sysadmin

Attachment: bacula-du
Description: bacula-du

Attachment: bacula-du.diff
Description: bacula-du.diff

------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
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>
  • Re: [Bacula-users] Finding largest file(s) backed up for a specific job, Geert Stappers <=