BackupPC-users

Re: [BackupPC-users] modify global excludes per host

2015-01-26 18:02:53
Subject: Re: [BackupPC-users] modify global excludes per host
From: Les Mikesell <lesmikesell AT gmail DOT com>
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Mon, 26 Jan 2015 17:01:08 -0600
On Mon, Jan 26, 2015 at 4:29 PM, Marki <jm+backuppcusers AT roth DOT lu> wrote:
> Hi there,
>
> I'm using backuppc with rsync for now on Linux boxes only.
>
> Say I have the following global config in config.pl:
>
> $Conf{BackupFilesExclude} = ['/proc/', '/swapfile*', '/var/lib/ntp/proc/',
> '/sys/'];
>
> How do I add something to that list in the per-client file 
> (_CONF_/pc/$host.pl)?
>
> I don't want to copy the list, just modify it in the client file, such that
> when the global config changes, those changes are applied to the hosts
> immediately without having to modify every individual host config.
>
> Maybe the problem is just that I am not very proficient in Perl, please
> excuse that :)
>
> Maybe the docs tell how to do this, but I couldn't find it...

First, you have to specify a sharename or '*' where that list applies:

$Conf{BackupFilesExclude} = { '*' => ['/proc/', '/swapfile*',
'/var/lib/ntp/proc/',/sys/']};

Also, there is no built-in way to add to, rather than replace the
global value.   However, if you use the web interface, when you edit a
per-host config you will see the inherited global setting and when you
add to it and save, the new value will override the global one.  Not
quite what you are asking for, but if you subsequently change the
global value you can go back to a per-host view, uncheck the override
box and get the (new) global values back to edit again.

It is probably possible to put perl code in the per-host config.pl to
add more entries or grow the arrays for a share but if you do that you
will likely break the ability to use the web config forms.

-- 
   Les Mikesell
     lesmikesell AT gmail DOT com

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
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/

<Prev in Thread] Current Thread [Next in Thread>