Hello, Using rsync 2.6.9: --compress-level=9 brings up an error "Command not found". Also this command: rsync -e "ssh -p 2222" -axzvc --progress --stats patwa@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. Any help with this appreciated. Thanks. Hussein. -------------------------------- Hussein Patwa Tel: 0870 803 2824 Tel: 0789 47 595 62 --------------------------------
On 6/14/07, Hussein Patwa <hspatwa@talktalk.net> wrote:> Using rsync 2.6.9:> Also this command: > rsync -e "ssh -p 2222" -axzvc --progress --stats > patwa@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
On Thu, Jun 14, 2007 at 07:03:04PM +0100, Hussein Patwa wrote:> Using rsync 2.6.9: > > --compress-level=9 brings up an error "Command not found".The remote rsync needs to be at least 2.6.7 for it to understand that option.> rsync -e "ssh -p 2222" -axzvc --progress --stats > patwa@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 ; syncRead the manpage on anchoring excludes at the base of the transfer. The directory /home is not in the transfer, so should not be mentioned in an exclude. E.g. --exclude=/patwa/public_html/dl/ ..wayne..