The integration of Bacula into the rest of our company has been a very straightforward process. Amongst other things we have an internal control panel that is used to conduct most business operations like creating and changing customer subscriptions plus a billing component which continuously monitors resource consumption and informs our customer databases about changes in service plans and so on.
Now, we wanted to integrated job tracking into our control panel. The details would be exposed on a per client basis, enabling both staff, resellers and partners to monitor and check the backup status without going through our front-line support or bothering our tech heads. Furthermore we wanted to be able to check resource consumption (disk usage) on a per client basis to enable automated billing. Custom reporting and trending were also on our wishlist and so are nicely formatted email notifications for our customers.
Almost everything we needed was already in the Bacula Catalog databases. The only thing we had to do was to add
to our Message resources in the director configuration in order to store job logs in the databases as well. It took me about one day to research and less than a day to write a simple REST API that exposes this data as XML or JSON, depending on what the client wants. The Bacula DB schema is rather simple once you find your way around. Integration into the control panel was done in little more than a day.
An example of the generated XML can be seen here :
We will expand this in the future. I already have a prototype that enables us to create, modify and remove clients and their configuration as well as restarting failed job and so on directly from our control panel . It also uses collected metrics in order to allow the system to place new clients on the least utilised director / storage servers automagically, thus enabling an equal distribution across our Bacula infrastructure.
Part VI is now online