From: Eric Bollengier Date: Sat, 25 Oct 2008 14:04:11 +0000 (+0000) Subject: ebl Add chapter about statistics X-Git-Tag: Release-3.0.0~701 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=30b28515b624004266fbef93b77dd3997fc60b6b;p=bacula%2Fdocs ebl Add chapter about statistics --- diff --git a/docs/manuals/en/concepts/concepts.tex b/docs/manuals/en/concepts/concepts.tex index ea008605..b15e7957 100644 --- a/docs/manuals/en/concepts/concepts.tex +++ b/docs/manuals/en/concepts/concepts.tex @@ -88,6 +88,7 @@ \include{autochangers} \include{supportedchangers} \include{spooling} +\include{statistics} \include{python} \include{ansi-labels} \include{win32} diff --git a/docs/manuals/en/concepts/newfeatures.tex b/docs/manuals/en/concepts/newfeatures.tex index c7bd8438..b6943e69 100644 --- a/docs/manuals/en/concepts/newfeatures.tex +++ b/docs/manuals/en/concepts/newfeatures.tex @@ -702,7 +702,8 @@ following packages are needed: \section{Display Autochanger Content} \index[general]{StatusSlots} -The {\bf status slots storage=\lt{}storage-name\gt{}} command displays autochanger content. +The {\bf status slots storage=\lt{}storage-name\gt{}} command displays +autochanger content. \footnotesize \begin{verbatim} @@ -783,8 +784,8 @@ Job { } \end{verbatim} -A new Client RunScript {\bf RunsWhen} keyword of {\bf AfterVSS} has been implemented, which -runs the command after the Volume Shadow Copy has been made. +A new Client RunScript {\bf RunsWhen} keyword of {\bf AfterVSS} has been +implemented, which runs the command after the Volume Shadow Copy has been made. Console commands can be specified within a RunScript by using: {\bf Console = \lt{}command\gt{}}, however, this command has not been diff --git a/docs/manuals/en/concepts/statistics.tex b/docs/manuals/en/concepts/statistics.tex new file mode 100644 index 00000000..57bca3bf --- /dev/null +++ b/docs/manuals/en/concepts/statistics.tex @@ -0,0 +1,61 @@ +\chapter{Using Bacula catalog to grab information} +\label{UseBaculaCatalogToExtractInformationChapter} +\index[general]{Statistics} + +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. + +In this chapter, you will find tips and information to measure bacula +efficiency and report statistics. + +\section{Job statistics} +If you (or probably your boss) want to have statistics on your backups to +provide some \textit{Service Level Agreement} indicators, you could use a few +SQL queries on the Job table to report how many: + +\begin{itemize} +\item jobs have run +\item jobs have been successful +\item files have been backed up +\item ... +\end{itemize} + +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. + +Now, you can use the \textbf{update stats [days=num]} console command to fill +the JobHistory table with new Job records. If you want to be sure to take in +account only \textbf{good jobs}, 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 \textit{bad} 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 \textbf{[days=num]} option. + +These statistics records aren't used for restoring, but mainly for +capacity planning, billings, etc. + +The Bweb interface provides a statistics module that can use this feature. You +can also use tools like Talend or extract information by yourself. + +The {\textbf Statistics Retention = \lt{}time\gt{}} director directive defines +the length of time that Bacula will keep statistics job records in the Catalog +database after the Job End time. (In \texttt{JobHistory} table) When this time +period expires, and if user runs \texttt{prune stats} command, Bacula will +prune (remove) Job records that are older than the specified period. + +You can use the following Job resource in your nightly \textbf{BackupCatalog} +job to maintain statistics. +\begin{verbatim} +Job { + Name = BackupCatalog + ... + RunScript { + Console = "update stats days=3" + Console = "prune stats yes" + RunsWhen = After + RunsOnClient = no + } +} +\end{verbatim}