--delete not working

Sylvain Viart sylvain.viart at easyrencontre.com
Tue Sep 25 09:07:10 GMT 2007

Hi Matt,

Matt McCutchen a écrit :
> On 9/24/07, Sylvain Viart <sylvain.viart at easyrencontre.com> wrote:
>> from the source host I do :
>> rsync -rtlv  --exclude='.svn/**' --exclude=.svn --delete preprod/
>> rsync://remote-host/deploiement/preprod/
>> the --dry-run gives me some file to delete.
>> but when I run the command without --dry-run, nothing is deleted?
> I bet the discrepancy has to do with your exclude filter.  The
> --exclude=.svn tells the receiver never to delete a file named .svn,
Exactly what I've also found. See my post : Re: --delete not working  => 
+filtering disable delete!
> https://bugzilla.samba.org/show_bug.cgi?id=3825
> If this isn't your situation, give me some more information and I'll
> try and figure out what the problem is.

It's clearly the same behavior. In fact it's also lack some good doc 
about hide and protect filter. Which seems to to exactly what I need:

    * remove .svn folder on the deployment destination host.
    * keep some other filter to not care file that may reside on the
      deployment host, but doesn't exist on the source. Which introduce
      conflict on the --delete and filtering rules.

ex :

rsync -rtlv  --filter='H .svn' --filter='P cache/**' --filter='P conf/**' \
    --delete preprod/ rsync://remote-host/deploiement/preprod/

In the doc: http://samba.anu.edu.au/ftp/rsync/rsync.html
> See also the hide (H) and show (S) rules, which are an alternate way 
> to specify sending-side includes/excludes.

rules hide, show, protect, are not really documented.

> but unfortunately, rsync 2.6.9
> and earlier incorrectly itemize them on a dry run.  For more

rsync  version 2.6.9  protocol version 29
Copyright (C) 1996-2006 by Andrew Tridgell, Wayne Davison, and others.
Capabilities: 64-bit files, socketpairs, hard links, symlinks,
              batchfiles, inplace, IPv6, ACLs,
              64-bit system inums, 64-bit internal inums

The bug 3825 is marked as fixed since "Last modified: 2006-11-11 11:30:15 CST."

Why it's still bugged on rsync packaged version?

Thanks Matt, I will try to use Hide filter to produce the expected behavior as suggested in the bug report.


-------------- next part --------------
HTML attachment scrubbed and removed

More information about the rsync mailing list