On 28.05.2011 15:35, Silver Salonen wrote:
Hello Bacula users :)
For a long time I've been thinking about and trying to create a web-based tool
for configuring Bacula. For keeping things simple and flexible, I'd thought on
keeping all the configuration in a database. So I've created a database layout
and a few Ruby scripts (60KB) that use this database for quering and
manipulating configuration.
The point for writing about it is to ask whether anyone would be interested in
these scripts. If so, I could create a software project (eg. in Sourceforge)
for that and share the scripts with everybody. If the scripts would turn out to
be of use, we could then make them better together etc :)
So a bit more about the scripts..
I have named the Ruby classes beginning with 'BaculaConf' and they are:
- BaculaConf - configuration consisting of multiple sections
- BaculaConfSection - configuration section having all the parameters and
sub-sections
- BaculaConfMysql - MySQL backend for querying and manipulating
configuration in MySQL
- BaculaConfFileParser - backend for parsing configuration from files (eg.
for importing configuration into MySQL)
So far I've used the classes for importing my quite complex Bacula
configuration into the database and I've also created a Ruby on Rails
application for managing the configuration.
Using the configuration in bacula-dir.conf would be just like this:
@"|baculaConf_dir.rb", and baculaConf_dir.rb would have something like:
=====
#!/usr/bin/env ruby
dirConfig = BaculaConf.new(BaculaConfMysql.new({"host" => "localhost", "user" => "baculauser", "password" =>
"baculapassword", "database" => "bacula-conf"}, false), nil, true, true, false)
dirConfig.printSections
=====
All the comments and questions are very welcome :)
Hello.
This thing has been on hold for another year, but I've now decided to
move on with it and put it into production.
I have put this project into Sourceforge under the name of Rubycula. I
have also uploaded my SVN in there and made available the rdoc
documentation of the code.
https://sourceforge.net/projects/rubycula
http://rubycula.sourceforge.net/rdoc/
https://sourceforge.net/p/rubycula/wiki/Examples/
Should anyone be interested in more, just ask :)
--
Silver
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users