Hello, I want to avoid transferring a file which is present both on the source tree and on the target tree when calling rsync with -a --delete.
mkdir -pv src/ dst/ echo file1 > src/file echo file2 > dst/file rsync -navi --delete --exclude file src/ dst/ works as expected. The file is not transferred nor is it deleted at the receiver. rsync -navi --delete --filter '- file' src/ dst/ also works as expected. The file is not transferred nor is it deleted at the receiver. echo '- file' > src/.rsync-filter rsync -navi --delete -F -F src/ dst/ file is now deleted at the receiver, which is unexpected. I expect this to be the same as the earlier two invocations. Am I missing something - or is this a bug? I think the manual could be clearer on the s and r modifiers with regard to --delete. For now neither of the following works to protect file from being deleted at the receiver echo '-s file' > src/.rsync-filter rsync -navi --delete -c -F -F src/ dst/ echo '-r file' > src/.rsync-filter rsync -navi --delete -c -F src/ dst/ ---Madhu -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html