BackupPC-users

Re: [BackupPC-users] Merge config in per-host config?

2009-09-05 10:06:03
Subject: Re: [BackupPC-users] Merge config in per-host config?
From: Davide Brini <dave_br AT gmx DOT com>
To: backuppc-users AT lists.sourceforge DOT net
Date: Sat, 5 Sep 2009 14:32:48 +0100
On Saturday 05 September 2009, Craig Barratt wrote:
> Davide,
>
> The basic problem with putting perl expressions in the config file
> (to make settings cumulative) is that it isn't compatible with the
> CGI config editor. 

Yeah I understand that. It's not a big problem for me because I don't use the 
web interface to edit the configuration anyway. Of course, I'm not saying 
that this is true for every user, so your objection makes perfect sense.

> The config editor will get the intended computed 
> values, but when it re-writes the config file it will just write the
> values, not the original expression.

Yes, the way the web interface works currently makes it quite difficult to 
incorporate my change there. Not being a web interface user, it's also hard 
for me to suggest something that could be effective without breaking the 
existing way people use and work with it. Maybe some kind of free-form 
editor, but then there wouldn't be much difference from using a real editor 
from the command line.

However, I still think that having the ability to do per-host additions to the 
default config without having to copy over the whole thing would be useful in 
a number of circumstances, and probably something some user might expect 
given that the config file is normal Perl code (and evaluated with "do"). How 
this could be implemented without too much pain, however, I'm not the best 
person to say. I just did something that "works for me" (tm). I hope that my 
patch could be useful to some user with similar needs, as long as the code 
where it must be applied doesn't change too much. If everything else fails, 
we can always resort to the 'do "/etc/backuppc/config.pl"' trick in the 
per-host config file.

Thank you.

-- 
D.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/