Compression and Excludes not working

Matt McCutchen hashproduct+rsync at gmail.com
Thu Jun 14 18:25:35 GMT 2007


On 6/14/07, Hussein Patwa <hspatwa at talktalk.net> wrote:
> Using rsync 2.6.9:

> Also this command:
> rsync -e "ssh -p 2222" -axzvc --progress --stats
> patwa at patwanet.co.uk:/home/patwa --exclude=/home/patwa/public_html/dl/
> --exclude=/home/patwa/public_html/jithwish/
> --exclude=/home/patwa/public_html/senaka/ /home/H/HGBackup13062007 ; sync
>
> Works in that it transfers the data, but completely ignores the exclude
> requests, transferring even the data in folders I want to exclude.

I can answer the second problem.  Rsync interprets exclude patterns
that start with / relative to the last slash in the source argument.
Thus, you should use

--exclude=/patwa/public_html/dl/
--exclude=/patwa/public_html/jithwish/
--exclude=/patwa/public_html/senaka/

instead.  Or you can tell rsync that your patterns are relative to the
root of the filesystem using a filter rule with a / modifier:

--filter='-/ /home/patwa/public_html/dl/'
--filter='-/ /home/patwa/public_html/jithwish/'
--filter='-/ /home/patwa/public_html/senaka/'

Matt


More information about the rsync mailing list