9:08pm, John Rouillard wrote:
> Hi all:
>
> We tell our users that ~user/bak will be backed up and they can
> symbolically link in any directories/files they want backed up.
>
> To make this work with backuppc and rsync, it means adding the -L or
> --copy-links option to the rsync command. However I only want it when
> backing up those particular directories (shares) and not say when
> backing up / or /usr.
>
> Does anybody have any ideas for modifying the rsync options on a per
> share basis? I was thinking of something similar to the structure for:
>
> $Conf{BackupFilesExclude} = {
> 'c' => ['/temp', '/winnt/tmp'], # these are for 'c' share
> '*' => ['/junk', '/dont_back_this_up'], # these are for other shares
> };
>
> Does this seem reasonable? Then I could do:
> $Conf{RsyncShareArgs} = {
> '/home/user1/bak' => ['--copy-links' ],
> };
>
> The only workaround I can thing of right now is to define a new host
> and override the $Conf{RsyncArgs} in there. However this is less than
> optimal since I can't inherit the RsyncArgs from the main
> configuration file and augment them, I have to maintain them
> separately from the main config file.
>
> This is also a problem when I have hosts over the wan and I have to
> bandwidth limit them. I can't just add in some way --bwlimit=128 I
> have to duplicate the entire $Conf{RsyncArgs} variable definition.
>
> Does anybody have another workaround?
>
> --
I haven't tested this, but I believe the order is to source the main config
file and then source the config file for the individual host being backed up
So you should be able to do something like this:
$Conf{RsyncArgs} = [ @$Conf{RsyncArgs}, '--copy-links' ];
Since you're dealing with Perl, you could probably create a file with a list
of slow hosts, read that into a hash (say, %slow_hosts, since I don't like
CamelCase)), and then you can say:
$Conf{RsyncArgs} = [ @$RConf{RsyncArgs}, '--bwlimit=128' ] if defined
$slow_hosts{$host};
Paul
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
BackupPC-users mailing list
[email protected]
List: https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki: http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/