--delete question.

Matt McCutchen matt at mattmccutchen.net
Wed Mar 24 11:11:27 MDT 2010


On Wed, 2010-03-24 at 12:10 +0530, Satish Shukla wrote:
> Please advise on rsync usage.  --delete doesn’t work without
> recursion(--recursion). The recursion is causing huge overheads for
> me. My directory trees are huge.  Any suggestions through which I can
> cut overheads.  It used to work well in rsync-v2.5.5
> 
> /opt/rsync-v2.5.5/bin/rsync --delete --checksum -lptgoD
> --rsync-path=/opt/rsync-v2.5.5/bin/rsync --hard-links
> --timeout=5184000 --exclude=.snapshot --stats user at host::abc/xyz/*
>  /aaa/bb/cc   (Works Well for this version)
> 
> /opt/rsync-v3.0.7/bin/rsync --delete --checksum -lptgoD
> --rsync-path=/opt/SFI/rsync-v3.0.7/bin/rsync --hard-links
> --timeout=5184000 --exclude=.snapshot --stats
> user at host::abc/xyz/*  /aaa/bb/cc  (doesn’t work without –r)

You need to remove the * from the end of the source path for --delete to
work.  You can use -d (--dirs) instead of -r if you don't want rsync to
look beyond the immediate children of user at host::abc/xyz/ .

-- 
Matt



More information about the rsync mailing list