Bacula-users

[Bacula-users] Progress estimates for jobs

2014-03-12 18:18:44
Subject: [Bacula-users] Progress estimates for jobs
From: "Roberts, Ben" <Ben.Roberts AT gsacapital DOT com>
To: "bacula-users AT lists.sourceforge DOT net" <bacula-users AT lists.sourceforge DOT net>
Date: Wed, 12 Mar 2014 21:37:54 +0000

Hi,

 

I’ve built a simple dashboard internally for displaying the current status and most recent completion of each job in the director. It also makes an estimate of the average job size and run frequency (which we use for alerting when jobs run unexpectedly late or are abnormally sized). I pull this data directly from the catalog with a rather complex sql query.

 

The one additional feature I’d like to add is an estimate of progress based on current amount backed up, start time, and average size. I think I should be able to calculate this information from the JobMedia table. Indeed this works pretty well for tape-based backups but produces crazy numbers (many orders of magnitude too big) for disk-based backups.

 

I’m currently using a simplified query like this to extract the data, and have the dashboard deliberately throw away any numbers that look wrong:

SELECT JobId, SUM(EndBlock-StartBlock)*64512 AS 'CurrentBytes' FROM JobMedia GROUP BY JobId;

 

I’m obviously making a few assumptions here:

-          A block is always 63k. This seems to hold true for LTO4 tapes. Are blocks for disk-based backups always a fixed size, and is this also 63k?

-          That the start block and end block lie in the same file. Again this holds true for LTO4 backups, but often not for disk backups
Are files fixed numbers of blocks long? Can I make any inference as to how much data has been backed up for a job with a jobmedia record spanning over file numbers?  I couldn’t glean any useful answers to these questions from the schema documentation.

 

Is there a better, or indeed any other way to retrieve this data from the Catalog? I’d prefer to avoid scripting bconsole access and scraping the results of show storage, or show jobid.

 

For reference, this has been tested against 5.0.2 and 5.2.13, using a MySQL catalog.

 

Regards,

Ben Roberts



This email and any files transmitted with it contain confidential and proprietary information and is solely for the use of the intended recipient. If you are not the intended recipient please return the email to the sender and delete it from your computer and you must not use, disclose, distribute, copy, print or rely on this email or its contents. This communication is for informational purposes only. It is not intended as an offer or solicitation for the purchase or sale of any financial instrument or as an official confirmation of any transaction. Any comments or statements made herein do not necessarily reflect those of GSA Capital. GSA Capital Partners LLP is authorised and regulated by the Financial Conduct Authority and is registered in England and Wales at Stratton House, 5 Stratton Street, London W1J 8LA, number OC309261. GSA Capital Services Limited is registered in England and Wales at the same address, number 5320529.

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
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>