\label{ManualPruning}
\item [prune]
\index[general]{prune}
- The Prune command allows you to safely remove expired database records
- from Jobs and Volumes. This command works only on the Catalog database
- and does not affect data written to Volumes. In all cases, the Prune
- command applies a retention period to the specified records. You can
+ The Prune command allows you to safely remove expired database records from
+ Jobs, Volumes and Statistics. This command works only on the Catalog
+ database and does not affect data written to Volumes. In all cases, the
+ Prune command applies a retention period to the specified records. You can
Prune expired File entries from Job records; you can Prune expired Job
records from the database, and you can Prune both expired Job and File
records from specified Volumes.
-prune files|jobs|volume client=\lt{}client-name\gt{}
+prune files|jobs|volume|stats client=\lt{}client-name\gt{}
volume=\lt{}volume-name\gt{}
For a Volume to be pruned, the {\bf VolStatus} must be Full, Used, or
\item [DirAddress = \lt{}IP-Address\gt{}]
\index[dir]{DirAddress}
\index[dir]{Directive!DirAddress}
- This directive is optional, but if it is specified, it will cause the
- Director server (for the Console program) to bind to the specified {\bf
- IP-Address}, which is either a domain name or an IP address specified as a
- dotted quadruple in string or quoted string format. If this directive is not
- specified, the Director will bind to any available address (the default).
- Note, unlike the DirAddresses specification noted above, this directive only
- permits a single address to be specified. This directive should not be used if you
- specify a DirAddresses (N.B. plural) directive.
-
-
+ This directive is optional, but if it is specified, it will cause the
+ Director server (for the Console program) to bind to the specified {\bf
+ IP-Address}, which is either a domain name or an IP address specified as a
+ dotted quadruple in string or quoted string format. If this directive is
+ not specified, the Director will bind to any available address (the
+ default). Note, unlike the DirAddresses specification noted above, this
+ directive only permits a single address to be specified. This directive
+ should not be used if you specify a DirAddresses (N.B. plural) directive.
+
+\item[Statistics Retention = \lt{}time\gt{}]
+ \index[dir]{StatisticsRetention}
+ \index[dir]{Directive!StatisticsRetention}
+ \label{PruneStatistics}
+
+ The \texttt{Statistics Retention} directive defines the length of time that
+ Bacula will keep statistics job records in the Catalog database after the
+ Job End time. (In \texttt{JobStat} 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.
+
+ Theses statistics records aren't use for restore purpose, but mainly for
+ capacity planning, billings, etc. See \ilink{Statistics chapter} for
+ additional information.
+
+ See the \ilink{ Configuration chapter}{Time} of this manual for additional
+ details of time specification.
+
+ The default is 5 years.
\end{description}
This directive is ignored with tape and FIFO devices.
+\item [Use Statistics = \lt{}yes|no\gt{}]
+ \label{JobUseStatistics}
+ \index{dir}{Use Statistics}
+ \index{dir}{Directive!Statistics}
+
+ This directive is optional (default \textbf{no}) and if specified will cause
+ the Director to keep job record in \texttt{JobStat} catalog table. This table
+ can be used to make longterm statistics. This table will not be pruned by
+ standard prunning algorithm. See \ilink{Prunning
+ Statistics}{PruneStatistics} for more information.
+
\end{description}
The following is an example of a valid Job resource definition: