<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!--Converted with LaTeX2HTML 2008 (1.71) original version by: Nikos Drakos, CBLU, University of Leeds * revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan * with significant contributions from: Jens Lippmann, Marek Rouchal, Martin Wilck and others --> <HTML> <HEAD> <TITLE>Using Bacula catalog to grab information</TITLE> <META NAME="description" CONTENT="Using Bacula catalog to grab information"> <META NAME="keywords" CONTENT="main"> <META NAME="resource-type" CONTENT="document"> <META NAME="distribution" CONTENT="global"> <META NAME="Generator" CONTENT="LaTeX2HTML v2008"> <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> <LINK REL="STYLESHEET" HREF="main.css"> <LINK REL="next" HREF="ANSI_IBM_Tape_Labels.html"> <LINK REL="previous" HREF="Data_Spooling.html"> <LINK REL="up" HREF="Bacula_Main_Reference.html"> <LINK REL="next" HREF="ANSI_IBM_Tape_Labels.html"> </HEAD> <BODY > <!--Navigation Panel--> <A NAME="tex2html1785" HREF="ANSI_IBM_Tape_Labels.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> <A NAME="tex2html1779" HREF="Bacula_Main_Reference.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> <A NAME="tex2html1773" HREF="Data_Spooling.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> <A NAME="tex2html1781" HREF="Contents.html"> <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> <A NAME="tex2html1783" HREF="Thanks.html"> <IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> <BR> <B> Next:</B> <A NAME="tex2html1786" HREF="ANSI_IBM_Tape_Labels.html">ANSI and IBM Tape</A> <B> Up:</B> <A NAME="tex2html1780" HREF="Bacula_Main_Reference.html">Bacula Main Reference</A> <B> Previous:</B> <A NAME="tex2html1774" HREF="Data_Spooling.html">Data Spooling</A> <B> <A NAME="tex2html1782" HREF="Contents.html">Contents</A></B> <B> <A NAME="tex2html1784" HREF="Thanks.html">Index</A></B> <BR> <BR> <!--End of Navigation Panel--> <!--Table of Child-Links--> <A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A> <UL> <LI><A NAME="tex2html1787" HREF="Using_Bacula_catalog_grab.html#SECTION003510000000000000000">Job statistics</A> </UL> <!--End of Table of Child-Links--> <HR> <H1><A NAME="SECTION003500000000000000000"></A> <A NAME="UseBaculaCatalogToExtractInformationChapter"></A> <BR> Using Bacula catalog to grab information </H1> <A NAME="18248"></A> <P> Bacula catalog contains lot of information about your IT infrastructure, how many files, their size, the number of video or music files etc. Using Bacula catalog during the day to get them permit to save resources on your servers. <P> In this chapter, you will find tips and information to measure bacula efficiency and report statistics. <P> <H1><A NAME="SECTION003510000000000000000"> Job statistics</A> </H1> If you (or probably your boss) want to have statistics on your backups to provide some <I>Service Level Agreement</I> indicators, you could use a few SQL queries on the Job table to report how many: <P> <UL> <LI>jobs have run </LI> <LI>jobs have been successful </LI> <LI>files have been backed up </LI> <LI>... </LI> </UL> <P> However, these statistics are accurate only if your job retention is greater than your statistics period. Ie, if jobs are purged from the catalog, you won't be able to use them. <P> Now, you can use the <B>update stats [days=num]</B> console command to fill the JobHistory table with new Job records. If you want to be sure to take in account only <B>good jobs</B>, ie if one of your important job has failed but you have fixed the problem and restarted it on time, you probably want to delete the first <I>bad</I> job record and keep only the successful one. For that simply let your staff do the job, and update JobHistory table after two or three days depending on your organization using the <B>[days=num]</B> option. <P> These statistics records aren't used for restoring, but mainly for capacity planning, billings, etc. <P> The Bweb interface provides a statistics module that can use this feature. You can also use tools like Talend or extract information by yourself. <P> The <B>Statistics Retention = time</B> director directive defines the length of time that Bacula will keep statistics job records in the Catalog database after the Job End time. (In <TT>JobHistory</TT> table) When this time period expires, and if user runs <TT>prune stats</TT> command, Bacula will prune (remove) Job records that are older than the specified period. <P> You can use the following Job resource in your nightly <B>BackupCatalog</B> job to maintain statistics. <PRE> Job { Name = BackupCatalog ... RunScript { Console = "update stats days=3" Console = "prune stats yes" RunsWhen = After RunsOnClient = no } } </PRE> <P> <HR> <!--Navigation Panel--> <A NAME="tex2html1785" HREF="ANSI_IBM_Tape_Labels.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> <A NAME="tex2html1779" HREF="Bacula_Main_Reference.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> <A NAME="tex2html1773" HREF="Data_Spooling.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> <A NAME="tex2html1781" HREF="Contents.html"> <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> <A NAME="tex2html1783" HREF="Thanks.html"> <IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> <BR> <B> Next:</B> <A NAME="tex2html1786" HREF="ANSI_IBM_Tape_Labels.html">ANSI and IBM Tape</A> <B> Up:</B> <A NAME="tex2html1780" HREF="Bacula_Main_Reference.html">Bacula Main Reference</A> <B> Previous:</B> <A NAME="tex2html1774" HREF="Data_Spooling.html">Data Spooling</A> <B> <A NAME="tex2html1782" HREF="Contents.html">Contents</A></B> <B> <A NAME="tex2html1784" HREF="Thanks.html">Index</A></B> <!--End of Navigation Panel--> <ADDRESS> 2010-06-14 </ADDRESS> </BODY> </HTML>