BackupPC-users

Re: [BackupPC-users] Exclude directory based on dot file?

2009-01-27 03:38:28
Subject: Re: [BackupPC-users] Exclude directory based on dot file?
From: Juergen Harms <Juergen.Harms AT unige DOT ch>
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Tue, 27 Jan 2009 09:36:28 +0100
Rsync supports precisely what you want: place the following item into 
your RsyncArgs argument list (the name .rsyncPerDirFilter is just a name 
choosen for this example - but the space between the : and the name is 
mandatory, possibly needs to be backslashed).

--filter=: .rsyncPerDirFilter

In each directory where a user wants files to be excluded, he can create 
a file of that name, with a content like

- suchafile
- /suchafile*
- /suchadir/***

to exclude all files/directories that match one of the patterns (be 
carefull, rsync reads these lines one after the other and triggers on 
the first match it finds - later matches are not seen, even if they 
would be more restrictive). Have a look at the "INCLUDE/EXCLUDE PATTERN 
RULES" in the rsync man page.

I found this slightly dangerous - you introduce a filter file and than 
forget about it or dont tell about it ...


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
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>