Filter file: selected directories only

rsync at rsync at
Sat Oct 3 14:29:55 MDT 2009

I'm trying to create a filter file for rsync what saying which dirs to
copy. For example  i need only /lib and /var/lib dirs from remote server.
I say:
 rsync -f ". /tmp/rsync_dirs"  --dry-run --verbose "remote:/"

File /tmp/rsync_dirs looks like:
+ /lib/
+ /var/
-! /var/lib/*
- /*

This doesnt work: it copies all /var/ dir except contents of /var/lib/.
What's wrong?

More information about the rsync mailing list