Bacula-users

[Bacula-users] scripts for holding configuration in database

2011-05-28 08:39:52
Subject: [Bacula-users] scripts for holding configuration in database
From: Silver Salonen <silver AT ultrasoft DOT ee>
To: bacula-users AT lists.sourceforge DOT net
Date: Sat, 28 May 2011 15:35:24 +0300
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 :)

-- 
Silver

------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery, 
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now. 
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users