Hi list, I try to keep a local file tree synchronized with the remote one. However, using the --delete option does not work as expected or at least as I whish it would. Here is an example of the local tree I'd like to sync: /dirA/subDirA /subDirB /dirB/subDirC On the remote machine I have: /dirA/subDirA /subDirB /dirB/subDirC /dirC Here is the rsync call I use: Executing rsync with: -avvr --delete --temp-dir=temp -e "ssh -P -i .ssh/identity -o StrictHostKeyChecking=no -o PasswordAuthentication=no" --stats --files-from=files.inc --exclude-from=files.exc /data <user>@<host>:data where the include file contains: dirA/subDirA /subDirB dirB/subDirC and the exlude file contains: dirA/subDirA/excludeDir Syncing with the above example I would expect that the directory dirC would get deleted on the remote machine, however, it does not. I assume the --delete option only checks within the include paths specified. Is this the expected behaviour of rsync and what could be a workaround to the problem? Thanks, Dave
On Fri, Nov 12, 2004 at 12:13:39PM +0100, David E. Meier wrote:> However, using the --delete option does not work as expected or at > least as I whish it would.Your error report was too abbreviated: you mentioned copying /data, yet none of the directories you mentioned being on the source machine were relative to /data.> I assume the --delete option only checks within the include paths > specified.No. Rsync does not delete (by default) excluded items, but all items are included by default, so unless you have an exclude='*' you didn't mention, that is not the problem. ..wayne..
Seemingly Similar Threads
- mount.cifs is not working (smbclient does work), somekind of recursive content in mount-dir
- [Bug 1791] New: using --delete with single directory mirroring doesn't delete files
- --delete and explicitly listed files
- deleting remote dirs I no longer want to backup
- DO NOT REPLY [Bug 4378] New: Handling of symbolic links