Bacula-users

Re: [Bacula-users] scripts for holding configuration in database

2011-05-29 12:23:43
Subject: Re: [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: Sun, 29 May 2011 19:20:48 +0300
> On 05/28/2011 02:35 PM, 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 :)
>>
>
> Hi Silver,
>
> I don't want to stop you, but firstly this kind of tools already exist see
> http://www.bacula-konferenz.de/historie/2010/dassmodus-bacula-konfiguration-gui/at_download/file
>
> It's only available on the enterprise edition, but yeap it's enterprise
> ready!

Yes, I know there are some GUIs Bacula configuration, but the main purpose
of my web-based configurator was to let my customers configure their own
backups and to my mind, for that, a web-based tool is the only
possibility. Currently I don't have my RoR app that far and I'm still
working on getting it ready for everyday configuration done just by
admins.

> The second thing where I saw a trouble with your draft is the use of
> Mysql. Bacula is in a way db agnostic, so you have to
> support as a minimal : postgresql, mysql, sqlite (will be drop), libdbi,
> and don't forget the enterprise like Oracle, sysbase,
> DB2 etc.
> Without that, I don't expect a large adoption.

Well, my purpose is not to gain a large adoption - I just thought that
maybe there's anyone that have been thinking on doing similar stuff and so
we could join our forces :)

And I'm not sure that you can compare this thing using MySQL to Bacula
being DB agnostic, because that project does not interact with Bacula's
database at all. All it does is just to use DB instead of text files for
configuration. Anyhow, the used SQL-queries are not so MySQL-centric and
abstracting it from MySQL should be very easy to do.

> For example I can tell you that I don't love your configuration line. I
> already have all my information in the MyCatalog dir
> conf. Why would I add yet another configuration.

Hmm.. I don't understand what you meant by that. My example was to show
how would the bacula-dir.conf (as a file) look like when using these
scripts.

--
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