Hi,
Jason Hughes wrote on 24.01.2007 at 15:45:16 [Re: [BackupPC-users] Exclude not
working]:
> James Kyle wrote:
> >I figure I'm doing something wrong here, but I wish to backup
> >/usr/local, but not /usr/local/var/backups
> >
> >_TOPDIR_/pc/localhost/config.pl:
> >
> >$Conf{RsyncShareName} = ['/usr/local'];
> >$Conf{BackupFilesExclude} = ['/usr/local/var/backups'];
> > [...]
>
> Shouldn't your exclude path be _relative_ to that directory
> then?
correct, you should have
$Conf {BackupFilesExclude} = [ '/var/backups' ];
Note that
$Conf {BackupFilesExclude} = [ 'var/backups' ];
would work too, but it would also exclude something like
'/usr/local/some/further/directories/var/backups', should it exist.
I wrote a while back in another thread that exclude paths are anchored to
the root of the "share" by BackupPC. That is wrong. *Include paths* are
($Conf {BackupFilesOnly} that is), exclude paths aren't. You need to specify
a leading slash if you want to guarantee that only /usr/local/var/backups
matches. Note also that you *could* append a trailing slash ('/var/backups/')
to make /usr/local/var/backups (and its contents) be excluded *only if* it is
a directory. If you, at a later point, replaced it with a softlink to some
place else, the softlink (but not the directory it points to, unless that is
also below /usr/local and not excluded) would then be backed up. It probably
doesn't make much difference in this case, but it would if you, for example,
used something like
$Conf {BackupFilesExclude} = [ '/var/backups/*/' ];
(backup all files in /usr/local/var/backups but not the directories). That
is probably not a particularly good example, unless it is coincidentally
the backuppc user's home directory ... you might even be able to do fancy
stuff like
$Conf {BackupFilesExclude} = [ '+ /var/backups/.ssh/', '/var/backups/*/' ];
though that is unfortunately untested (and possibly counter-intuitive). What
I *did* test though, is that rsync [2.6.4] matches '.ssh' with '*', though
the man pages claims that "shell filename matching rules" are used.
I hope that was not too confusing :).
Regards,
Holger
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
BackupPC-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/