Re: Bacularis feature request - keep comments?

Rob Gerber <[email protected]>
Newsgroups gmane.comp.bacula.user
Message-ID <CAMKi9mT=oEStsF29YEB_uFjjko9drxmV-cd66XqWWEOQKvYVEQ@mail.gmail.com>
Marcin,

Thank you for the reply. That is all interesting information. I wasn't
aware of the description or tag functionality. I will look into this.

Regards,
Robert Gerber
402-237-8692
[email protected]


On Sat, Feb 22, 2025 at 12:09 PM Marcin Haba <[email protected]> wrote:

> On Sat, 22 Feb 2025 at 18:03, Rob Gerber <[email protected]> wrote:
> > I don't usually use bacularis to edit director or storage resources
> because it strips out all the comments (baculum also does this, IIRC). I
> understand why it does that, since it has to parse the configuration and by
> definition the data after a # sign shouldn't be parsed. Still, this is the
> main thing that prevents me from using bacularis to edit the director and
> storage configuration files. Do you think there is any way to change the
> way bacularis works to at least keep inline comments like this?
>
> Hello Rob,
>
> Thanks for your feature request and ideas for comments.
>
> Yes, I know this stripped comments issue well. The problem here is
> that when Bacularis gets configuration from Bacula, the configuration
> is already without comments. So, this does not happen on the config
> write, but on the config read. To read the Bacula configuration,
> Bacularis uses the Bacula JSON tools (b*json binaries) which so far do
> not support # (hash) comments. Bacula developers know about it, we
> discussed adding the comments support.
>
> I know a few workarounds to not lose comments. The first one is using
> the "Description" directive for leaving comments. It is available in
> every Bacula configuration resource and can store quite long texts.
>
> The second is using tags. They are available both for all Bacula
> configuration resources, for Bacula database resources and Bacularis
> resources (users, roles, hosts ...etc.) as well. These tags can
> contain spaces, colors, the severity and accessibility properties. It
> can be good for shorter comments. You can read about it here:
>
> https://bacularis.app/doc/tags/basic.html
>
> Both workarounds do not replace the inline # hash comments, but maybe
> they can be used instead of them.
>
> Best regards,
> Marcin Haba (gani)
>

_______________________________________________
Bacula-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.