Bacula-users

Re: [Bacula-users] Webacula 7. Coming…

2014-10-28 06:44:54
Subject: Re: [Bacula-users] Webacula 7. Coming…
From: Kern Sibbald <kern AT sibbald DOT com>
To: Yuriy Tim <tim4dev AT gmail DOT com>, Victor Hugo dos Santos <listas.vhs AT gmail DOT com>
Date: Tue, 28 Oct 2014 08:41:47 -0200
Hello,

It is not particularly easy to parse Bacula configuration files, particularly the FileSet resource, and I am not sure it can be done with regex.  However, Bacula does read its own conf files, and there is a program named DassModus (posted on Internet) that reads Bacula conf files in Python partially using regexes ...

Concerning your "conf" file listed below.  I am 99% sure it is not a valid conf file and could not even be scanned by Bacula.

If you are worried about all the things that Bacula permits such as spaces in names, simply define a simpler Bacula syntax where names cannot have spaces.  Another way is to choose your own format (such as xml, which as you know, I do not like) and use it since it is easy to parse with web tools, then convert it into Bacula syntax before giving it to Bacula.  Converting xml, json, or any other representation into Bacula should be a lot easier than going the other way.

Best regards,
Kern

On 14-10-28 04:19 AM, Yuriy Tim wrote:
I kept my old letter (2011 :)

I tried to parse the bacula-dir.conf.
However, this is probably not possible with simple regexp's.
It turned out that some applications, for example, Webmin does this
with a regexp.

But they're doing it wrong!

For example, here is test configuration (which is written according to
"Bacula Main Reference: Customizing the Configuration Files")
contains no errors in terms of Bacula (I checked it) but it would be
wrong parsed (I have not tested it, but I'm sure of it) by 3rd parties
parsers (not native) :

-----------------------------------------
# comment1
 # comment2

   c  o n s o l e
{ Name=name1; Password = "p; \\\a s s w o rd"; J o b A C L = *all\*
}Con sole { N a m e = "name 2"; Pass word = "password"; JobACL =
job/\1, job2, job3
}

-----------------------------------------


I.e. in other words to parse with regexp any Bacula configuration will
be very difficult.


2014-10-28 7:08 GMT+03:00 Victor Hugo dos Santos <listas.vhs AT gmail DOT com>:
On Sat, Oct 25, 2014 at 3:09 PM, Kern Sibbald <kern AT sibbald DOT com> wrote:
> On 14-10-05 03:36 AM, Yuriy Tim wrote:
>
> What I have in mind:
> 1 store all config files in the database
> 2 to store all the jobs in the database (for example, scheduled tasks, and
> not only already made)
> 3 to store other information in the same database
> 4 to have a function that preserves the tree to the the database for select
> the files and restore. Now it makes BVFS,but for Web-UI is useless.
>
> I once wrote in the bacula-devel but ....
>
> Bacula "configuration files editing" ? NOOOOOO! :)
>
>
> I am not sure why any one would object to doing configuration file editing
> in a Web based GUI -- we have that in Bacula Enterprise.  Also who you asked
> to program it and when could make a big difference in the response ...
>
> Where I am not very enthusiastic is to put the configuration files in the
> SQL database.  This would make it harder to recover Bacula during disaster
> recovery, and if you destroyed your database, it could make it impossible to
> even start Bacula.

Hi

I think the same with you about the posibility to store the
configuration in database (is a very, very, very bad idea) !!!
but, maybe the idea of this mail (If not, Yuriry can use this idea to
improve webacula) is to use a database to save all the hosts, files,
storages and others "only to webacula" interface... After the end, the
user will apply the changes and so, the GUI get all the information
from the database and generate a new bacula-dir.conf for example.

that is the same idea that the Centreon project use to make the nagios
configuration files, and IMHO, I believe that is a good idea.

salu2


--
--
Victor Hugo dos Santos
http://www.vhsantos.net
Linux Counter #224399



--
with best regards

------------------------------------------------------------------------------
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
<Prev in Thread] Current Thread [Next in Thread>