On Fri, Jan 20, 2006 at 01:58:34PM +0100, Lars Tobias Børsting wrote:
> Hi,
>
> I've been using BackupPC for a month now, and I like it very much!
Same here. Great piece of software, kudos.
> 1. Is it possible to use regexps for the $Conf{BackupFilesExclude}
> variable?
I'm pretty sure that backuppc just hands your configuration entries
to the program doing the transfer (rsync, tar, smbclient, whatever).
I don't know about tar or smbclient. In the case of rsync, you cannot
use a simple regular expression. It has a fairly powerful grammar but
it is also somewhat obtuse (for instance, trailing slashes on directory
names matter). I'd suggest reading (carefully) the rsync man page,
experimenting, and then following up on the rsync mailing list with
questions. Look in the man page under EXCLUDE PATTERNS.
> The goal is to be able to exclude ay users
> TemporaryInternetFiles and mozilla-cache and any other cache that I
> can identify. Also, does anybody have ready-to-use-rules for this?
I have a followup question - is there a simple way to have a per-host
config.pl add entries to $Conf{BackupFilesExclude} rather than replace it?
I tried this:
push (@{$Conf{BackupFilesExclude}}, '/netflow','/var/log/lastlog');
But it doesn't work, it still gets overridden.
Here i think is the relevant code snippet from BackupPC/Lib.pm:
foreach $config ( @configs ) {
%Conf = ();
if ( !defined($ret = do $config) && ($! || $@) ) {
$mesg = "Couldn't open $config: $!" if ( $! );
$mesg = "Couldn't execute $config: $@" if ( $@ );
$mesg =~ s/[\n\r]+//;
return $mesg;
}
%{$bpc->{Conf}} = ( %{$bpc->{Conf} || {}}, %Conf );
}
It's this last line of code that confuses me. I'm wondering why
this is done:
%{$bpc->{Conf} || {}}
> 2. Is it possible for a user to register a folder in his $HOME to be
> excluded from backup? For example by creating a magick-file in the
> folder, like a .nobackup file in the respective folder, so no backups
> are made of this folder. Or perhaps a separate user-config in
> $HOME/.backuppc with the variable $Conf{BackupFilesExclude} in it?
This kind of capability would be cool but would i think it require an
somewhat smarter agent on the client. It probably wouldn't be that hard
to patch rsync to watch out for .rsync-exclude files in directories,
or something like that. There is already capability in rsync and gnu
tar to read exclusions from a file, but in rsync's case this file
has to be on the server, not the client.
danno
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
BackupPC-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/