Deleted remote directories not being removed locally

Wayne Davison wayned at
Fri Dec 2 17:21:08 GMT 2005

On Fri, Dec 02, 2005 at 10:00:14AM -0500, David Filion wrote:
> rsync -v --stats -d --include='+ */' --include='- *' --force 
> --delete-during --backup \
> --backup-dir=/mnt/backups/_DELETED'ucp/*' .

Read the first two paragraphs from the --delete option in the rsync

It explains why the '*' is not appropriate and also that -r is
(currently) required to be used (the CVS version will delete inside
directories sent via -d, but not older versions of rsync).  If you
don't want subdirectories inside the top-level dirs to be copied,
you can either exclude them (add --exclude='*/*' prior to your first
include and add -r to the options) or upgrade to the CVS version.


More information about the rsync mailing list