Stop recursive transfer

Wayne Davison wayned at samba.org
Sun Jul 3 15:43:22 GMT 2005


On Sun, Jul 03, 2005 at 02:03:17PM +0200, Henning Wangerin wrote:
> Would it be possible/an idea to include a "stop-file"-argument in rsync
> to let rsync do it all?

You can use rsync's .rsync-filter files to instruct rsync on localized
filter rules.  So, instead of using a stop-file name, the user would
create a file named .rsync-filter in the directory they don't want to
have backed up, and put this line in it:

- *

That would tell rsync to not backup anything from inside that directory
hierarchy.  The user could even fine-tune the rules to eliminate just
some of the files via other rules (e.g. "- *.gz").

Finally, the invocation of rsync would need to use the -F option to tell
rsync to pay attention to the .rsync-filter files.  If you don't like
the filename, you can choose your own by switching from the -F option to
your own --filter option:

    --filter='dir-merge /.any-name-you-like'

You should be running rsync 2.6.4 or (preferably) 2.6.5 for the --filter
option to be supported.

..wayne..


More information about the rsync mailing list