BackupPC-users

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

2009-09-03 19:03:23
Subject: Re: [BackupPC-users] Merge config in per-host config?
From: Les Mikesell <lesmikesell AT gmail DOT com>
To: backuppc-users AT lists.sourceforge DOT net
Date: Thu, 03 Sep 2009 17:59:43 -0500
Tino Schwarze wrote:
> On Thu, Sep 03, 2009 at 04:46:58PM -0500, Les Mikesell wrote:
> 
>>> But maybe the global config could be made available as $GlobalConf{xyz}
>>> within the per-host config? I remember having tried the same thing -
>>> that is, I want a set of default excludes, then extend then for one
>>> host. Currently, I have to repeat the whole default config just to
>>> append one more directory to the excludes.
>> Doesn't that happen by itself if you use the web interface to edit the 
>> per-host config?  That is, you see all of the default array elements 
>> from the main config file until you insert a new one and then the set 
>> becomes an override.  If you have enough machines that you don't want to 
>> use the web interface to make a change, you could use a script to make 
>> whatever edits you want.
> 
> I'm not using the web interface for configuring my hosts, for example
> because I've got a 
> do "somepath/DefaultRsync.conf";
> in several config.pl. I just would like to say "add this to the default
> excludes list" in config.pl which should be pretty easy given that it is
> Perl code already.

It is, but you can't just re-assign the existing variable without losing 
what's there.  If you are adding new perl code and have given up on the 
web edit mechanism, you can just push elements or define a new array and 
combine them:
@old = (@old, @new);

--
   Les Mikesell
    lesmikesell AT gmail DOT com

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