Bacula-users

Re: [Bacula-users] FW: Client last backup time report

2013-11-18 04:17:44
Subject: Re: [Bacula-users] FW: Client last backup time report
From: Uwe Schuerkamp <uwe.schuerkamp AT nionex DOT net>
To: Robyn <rholmes.opubco AT gmail DOT com>
Date: Mon, 18 Nov 2013 10:14:25 +0100
Hi,

add the lines below to your query.sql and you should be good to go,
adding a time period parameter should be trivial (check the other
examples in query.sql). 

HTH Uwe 
######################################################################
:List all clients without a backup in the last week
SELECT C.name FROM Client C WHERE NOT EXISTS
 ( SELECT jobid
   FROM Job J
   WHERE J.endtime > date_sub( now(),INTERVAL 1 week )
   AND J.clientid = C.clientid
 )
ORDER BY name

######################################################################

BTW, is it possible to select a query by cmd line parameter and pipe
it to bconsole like so? 

echo "query id=14 <param>" | bconsole

Uwe 


-- 
NIONEX --- Ein Unternehmen der Bertelsmann SE & Co. KGaA



------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users