This whitepaper describes howto use JasperReports to create and generate reports based on the Bareos database. There is plenty of information inside the catalog. To extract useful information visualize and analyze it, the widely used open source tools from JasperSoft suite can be used to create those reports.
We focus on Bareos here but the basic idea and most reports apply to Bacula, too.
You need to have read access to the Bareos catalog database from the system where you run the report engine. For Jaspersoft beginners we recommend to use the Java desktop client iReport (runs on Linux, MacOS and Windows). This means you need to grant select-access to a database user, connecting from your desktop to the catalog database, including all tables.
Make sure that you can connect from iReport to your Bareos database and use this connection for the next reports. If you have more than one catalog database, you can configure all of them and connect to them by selecting one from the picklist "Datasources" in the iReport toolbar.
This sample report has been succesfully tested with Postgres as database backend. A quick test with MySQL did not succeed.
Now load the first sample definition report3.jrxml and the subreport report3_subreport1.jrxml. This sample creates a report for a dedicated client and produces to charts: a graph showing the number of bytes according to the last full backup jobs. The second graph shows the allocation of stored client backup's to pools.
You can run the report by clicking on the "Preview " tab. Now a popup window asks for a client name (here the name as configured in the client resource), after specifying a valid client name, a pdf document with your report should appear.