Keeping File Trees in Sync
David E. Meier
dev at eth0.ch
Fri Nov 12 11:13:39 GMT 2004
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
More information about the rsync
mailing list