BackupPC-users

Re: [BackupPC-users] Includes and Excludes

2008-06-18 05:12:34
Subject: Re: [BackupPC-users] Includes and Excludes
From: Christoph Litauer <litauer AT uni-koblenz DOT de>
To: Craig Barratt <cbarratt AT users.sourceforge DOT net>
Date: Wed, 18 Jun 2008 11:11:59 +0200
Craig Barratt schrieb:
> Christoph writes:
> 
>> I try to backup a share /export/user1 containing user data starting with
>> a-f except for subdirectories ending on _DELETED. Is it possible?
> 
> BackupPC takes $Conf{BackupFilesOnly} and $Conf{BackupFilesExclude} and
> converts them into rsync include/exclude rules:
> 
>     > Sent include: /[a-z]*
>     > Sent exclude: /*
>     > Sent exclude: *_DELETED
>     > Sent exclude: search.sqlite
> 
> Rsync checks the include/exclude rules in order until it finds a match.
> The problem is that the wildcard /[a-z]* matches /aa_DELETED, so
> it assume that file is included, and the *_DELETED ruled is not
> checked.
> 
> One alternative is to not use $Conf{BackupFilesExclude} and
> $Conf{BackupFilesOnly} and instead to build your own
> include/exclude options in $Conf{RsyncArgs}.  I haven't
> tested this, but something like this should work:
> 
>     $Conf{RsyncArgs} = [
>       '--numeric-ids',
>       '--perms',
>       '--owner',
>       '--group',
>       '-D',
>       '--links',
>       '--times',
>       '--block-size=2048',
>       '--recursive',
>       '--checksum-seed=32761',
>       '--exclude=*_DELETED',
>       '--exclude=search.sqlite',
>       '--include=/[a-z]*',
>       '--exclude=/*',
>     ];

Craig,

thanks for your response! I will try this solution.

But: I thought of this potential filter rule problem, too. So I tried 
with a rsync client:

rsync -anv  --include='/[a-z]*' --exclude='*_DELETED/'
   root@client:/export/user1 /tmp
receiving file list ... done
user1/a/a
user1/b/b

And the other order:
rsync -anv  --exclude='*_DELETED/' --include='/[a-z]*'
   root@client:/export/user1 /tmp
receiving file list ... done
user1/a/a
user1/b/b


As you can see the order of include/exclude filter options doesn't seem 
to matter ...

-- 
Regards
Christoph
________________________________________________________________________
Christoph Litauer                  litauer AT uni-koblenz DOT de
Uni Koblenz, Computing Center,     http://www.uni-koblenz.de/~litauer
Postfach 201602, 56016 Koblenz     Fon: +49 261 287-1311, Fax: -100 1311
PGP-Fingerprint: F39C E314 2650 650D 8092 9514 3A56 FBD8 79E3 27B2


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
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>