Hi there, We have a variable population of client machines being backed up by bacula. What I'd like to do is build a query for the bacula DB that will detect eg. if any clients haven't had a full backup within the last week. (Yes -- I know there are configuration options to automatically promote incrementals etc. to fulls in that situation: we're using them.) We'll then hook this up to our Nagios so the Ops team gets alerted.
So I have come up with this query:
SELECT clientid, name, max(endtime) FROM job
WHERE level = 'F' AND type = 'B' AND jobstatus = 'T'
GROUP BY clientid, name
HAVING max(endtime) < now() - interval '7 day'
ORDER BY name
(We're using Postgresql)
This does pretty much what I want, except that the output includes job
records from clients that have been decommissioned and removed from
bacula-dir.conf. Now, for the life of me, I can't see anything in the
DB that indicates whether a client backup job is active or not. Is it
just me being blind or am I going to have to parse that out of the
bacula config files?
Cheers,
Matthew
--
Matthew Seaman
Systems Administrator
E [email protected]
Squiz Ltd. A Zetland House, 109-123 Clifton Street, London EC2A 4LD
P +44 (0) 207 101 8300 F +44 (0) 870 112 3394 W www.squiz.co.uk
UNITED KINGDOM AUSTRALIA NEW ZEALAND EUROPE UNITED STATES
LONDON EDINBURGH
SUPPORTED OPEN SOURCE SOLUTIONS
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ The Next 800 Companies to Lead America's Growth: New Video Whitepaper David G. Thomson, author of the best-selling book "Blueprint to a Billion" shares his insights and actions to help propel your business during the next growth cycle. Listen Now! http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________ Bacula-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/bacula-users
