Prompted by Adrew, and with the help if the information provided by Richard, I've knocked up a daily report from the DB with the addition of two tables to translate the codes from the Job table into a more readable format since I'm running 1.36-3.1 and it doesn't have the Status table. I suspect 1.38-0 may have an equivalent Level table too?
create table LevelType (LevelType binary(1), LevelTypeLong tinyblob); insert into LevelType (LevelType,LevelTypeLong) values ("F","Full"), ("D","Diff"), ("I","Inc"); create table StatusType (StatusType binary(1), StatusTypeBrief tinyblob, StatusTypeLong tinyblob); insert into StatusType (StatusType, StatusTypeBrief, StatusTypeLong) ("C","Created","Created, not yet running"), ("R","Running","Running"), ("B","Blocked","Blocked"), ("T","OK","Completed successfully"), ("E","Error","Terminated with errors"), ("e","Error","Non-fatal error"), ("f","Error","Fatal error"), ("D","Verify","Verify found differences"), ("A","Cancelled","Canceled by user"), ("F","Waiting","Waiting for Client"), ("S","Waiting","Waiting for Storage daemon"), ("m","Waiting","Waiting for new media"), ("M","Waiting","Waiting for media mount") ("s","Waiting","Waiting for storage resource"), ("j","Waiting","Waiting for job resource"), ("c","Waiting","Waiting for client resource"), ("d","Waiting","Waiting on maximum jobs"), ("t","Waiting","Waiting on start time"), ("p","Waiting","Waiting on higher priority jobs"); Now running the following every morning... /usr/bin/mysql -t -Dbacula -e ' select t1.Name, time(t1.StartTime) as StartTime, time(t1.EndTime) as EndTime, t2.LevelTypeLong as Level, t3.StatusTypeBrief as Status, format(t1.JobBytes, 0) as Bytes from Job as t1, LevelType as t2, StatusType as t3 where t1.Level = t2.LevelType and t1.JobStatus = t3.StatusType and t1.StartTime > curdate() order by t1.StartTime' | mail -s "Bacula combined backup report for `date`" [EMAIL PROTECTED] ... produces a mail containing... +---------------+-----------+----------+-------+--------+---------------+ | Name | StartTime | EndTime | Level | Status | Bytes | +---------------+-----------+----------+-------+--------+---------------+ | client1 | 00:17:02 | 00:18:30 | Diff | OK | 594,579,101 | | client2 | 00:18:32 | 00:19:15 | Diff | OK | 152,292,758 | | client3 | 00:19:25 | 00:59:06 | Full | OK | 3,668,013,557 | | client4 | 00:59:08 | 01:04:02 | Diff | OK | 339,755,306 | | client5 | 01:04:04 | 01:09:04 | Diff | OK | 3,580,512,305 | | client6 | 01:09:10 | 01:36:33 | Diff | OK | 2,687,051,992 | | client7 | 01:36:36 | 01:36:42 | Diff | OK | 24,065,994 | | client8 | 01:36:45 | 01:37:43 | Diff | OK | 363,044,522 | | client9 | 01:37:45 | 01:39:55 | Diff | OK | 563,397,969 | | client10 | 01:39:57 | 01:41:05 | Diff | OK | 111,971,961 | | client11 | 01:41:07 | 03:42:17 | Diff | OK | 462,830,817 | | BackupCatalog | 03:42:19 | 03:47:29 | Full | OK | 1,222,076,725 | +---------------+-----------+----------+-------+--------+---------------+ Will. ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_idv28&alloc_id845&op=click _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users