Delete files specified in "--from-files"-file that don't exist on the sender side

intripoon intripoon at gmx.de
Thu Feb 12 23:31:54 GMT 2009


Hi !

I have a tree of files on PC A and a tree of files on PC B. PC B runs 
rsync in server mode. PC A connects to the rsync server.

There is a file containing the files that rsync should copy efficiently 
from PC A to PC B. This works.

Now there are files I want to have deleted on PC B. They don't exist on 
PC A. I hoped I could just add them to the list of files given to 
--from-files, but the sender just tells me "failed: No such file or 
directory (2)" and goes on. Is there a switch/a way to make rsync delete 
the file if it exists on PC B? This surprised me because when you crawl 
through a directory completely, rsync deletes files on the receiver side 
as well, even though -  or better because - they don't exist an the 
sender side.

I use cwrsync on windows.
This is rsync --version:

rsync  version 3.0.0  protocol version 30
Copyright (C) 1996-2007 by Andrew Tridgell, Wayne Davison, and others.
Web site: http://rsync.samba.org/
Capabilities:
    64-bit files, 64-bit inums, 32-bit timestamps, 64-bit long ints,
    socketpairs, hardlinks, symlinks, no IPv6, batchfiles, inplace,
    append, ACLs, no xattrs, iconv, symtimes

rsync comes with ABSOLUTELY NO WARRANTY.  This is free software, and you
are welcome to redistribute it under certain conditions.  See the GNU
General Public Licence for details.

Best regards
    Marc


More information about the rsync mailing list