--delete --force Won't Remove Directories With Dotnames

Sabahattin Gucukoglu mail at sabahattin-gucukoglu.com
Fri Mar 2 06:29:05 GMT 2007

--delete --force Won't Remove Directories With Dotnames

rsync 2.6.9

Me, personally, I reckon this to be an irritant ... but perhaps (and having 
thought about this a bit I decided it's a good chance) this is an 
intentional and useful behaviour.  But it's a nuisance if you call 
your --partial-dir .partial, as I happen to do, since now if you remove a 
directory which was aborted in a recent transfer on source (leaving a 
.partial mirror at dest) the .partial directory won't go away on next 
rsync, ever.  You'd have to look for it, even when the rsync command is 
identical and the tree copied has the same name as before.  Rsync just sees 
right through .dirs, as if they weren't part of the source and therefore 
don't need deleting at dest (even if they clearly are under a directory 
which is).

Example: rsync --partial-dir=.partial /foo /bar.  Abort the transfer, and 
/foo/biguns/bigfile gets left in /bar/foo/biguns/.partial/bigfile.  Now 
remove /foo/biguns and do the transfer again, to completion.  The 
/bar/foo/biguns/.partial/bigfile is still there.

What do we think?


Sabahattin Gucukoglu <mail<at>sabahattin<dash>gucukoglu<dot>com>
Address harvesters, snag this: feedme at yamta.org
Phone: +44 20 88008915
Mobile: +44 7986 053399

More information about the rsync mailing list