Creating a $Conf{BackupFilesFilter} hash analogous to $Conf{BackupFilesExclude} and $Conf{BackupFilesOnly} would allow for more general --filter= rules for the popular rsync transport method.
The general --filter= methodoolgy is very powerful and allows for much more granular and powerful include/exclude rules than the simple concatenation of all the --include elements followed by all the --exclude elements (and to respond to the code in Rsync.pm, they don't always commute). For example, I would like to *exclude* '/var/cache/*/*' but *include* '/var/cache/apt'. Without a filter, one would need to add a separate share just to capture '/var/cache/apt' The feature addition should be pretty trivial as you would just need to add a stanza like the following to Rsync.pm after the foreach loop for BackupFilesExlude: if ( defined($conf->{BackupFilesFilter}{$t->{shareName}}) ) { foreach my $file2 ( @{$conf->{BackupFilesFilter}{$t->{shareName}}} ) { # # just append additional filter lists onto the end # my $file = $file2; $file = encode($conf->{ClientCharset}, $file) if ( $conf->{ClientCharset} ne "" ); push(@fileList, "--filter=$file"); Corresponding minor changes to the following files would be required: - Config.pl - EditConf.pm - Meta.pm - Text.pm - Protocols.pm - Lib.pm _______________________________________________ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List: https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki: https://github.com/backuppc/backuppc/wiki Project: https://backuppc.github.io/backuppc/