Does rsync delete unmatched files by default?

Kevin Cozens kevin-4dS5u2o1hCn3fQ9qLvQP4Q at public.gmane.org
Tue Jan 4 03:12:20 UTC 2011


Lennart Sorensen wrote:
> It does NOT delete excluded files on the target, unless you also add
> --delete-excluded.  But otherwise it does delete things that are not
> on the source when --delete is specified.  If no --delete option is
> specified at all, it only modifies or adds files.  Tends to cause a mess
> of a backup after a while littered with obsolete deleted files.

I haven't used rsync very often but my observation is that it copies 
changed/new files *before* it does the deletion. Normally, this is fine but 
if the target drive does not have a lot of spare space on it you run the 
risk of filling the target drive when rsync copies the changed/new files 
before it gets around to deleting files that no longer exist on the source 
drive.
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list