Re: [Bacula-users] Bacula Query
2012-06-22 10:54:35
On 2012-06-21 19:54, Mike Hobbs wrote:
> Hello, I was wondering if anyone has written a bacula query that you
> can
> run to find out what clients haven't been backed up within a certain
> time period? If so could you share? I'm not an SQL guy which is why
> I
> am asking.
This query provides a list of all clients who have not had a backup
finish within the past week:
SELECT C.name
FROM client C
WHERE NOT EXISTS (SELECT jobid
FROM job J
WHERE J.endtime > (now() - interval '1 week')
AND J.clientid = C.clientid)
ORDER BY name
This was written for PostgreSQL. I hope it runs on MySQL with minor
modifications.
--
Dan Langille - http://langille.org/
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
|
|
|