--filter, missing in action.

istrice istrice at autistici.org
Thu Apr 23 12:02:26 GMT 2009

I must be seriously misunderstanding the man page coverage of --filter.
If I have a dir 'foo/' in the reciver with content 'bar' that I must
keep and a 'foo/' on the sender side empty what could possibly be the
best way to get the job done? 
Till now the filter option gone ignored..
Not to mention that at the moment (may be because my bad english,
sorry!) I can not find the right syntax..

my script is this:
SHORTHOST=`hostname | awk 'BEGIN { FS="." } { print $1 }'`

cd $HOME || exit 1

rsync -n -v  -stats -z -a -x \
--filter=':r .bar' --filter=':r foo/' \
--delete-after --delete-excluded --exclude-from=$HOME/.rsync/exclude \
--timeout=999 --log-file=/home/user/log.rsync  \
-e 'ssh -p 3434 -c 3des  -i .ssh/identity -ax -o
ClearAllForwardings=yes' \
$HOME/ root at server:/home/.BKP/$SHORTHOST

and my exclude is :

- .cache
- .gvfs
- .gconf
- .gconfd
- .mozilla/**/Cache
- .mozilla/firefox/*/lock
- .mozilla/firefox/*/.parentlock
- Desktop/Exclude
- media

Where I get it wrong?
Thanks folks for reading this long post!


istrice <istrice at autistici.org>

More information about the rsync mailing list