intripoon
2009-Feb-12 23:32 UTC
Delete files specified in "--from-files"-file that don't exist on the sender side
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
Wayne Davison
2009-Feb-28 17:36 UTC
Delete files specified in "--from-files"-file that don't exist on the sender side
On Fri, Feb 13, 2009 at 12:31:54AM +0100, intripoon wrote:> 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.I added an option to the latest development version that supports this: --delete-missing-args. Can be used with or without --files-from. See the git repository or the latest "nightly" tar file if you'd like to try it out. ..wayne..
Maybe Matching Threads
- In Rsyncd not work options exclude, exlcude from and charset
- Extended attributes fail mactomac
- [Bug 11161] New: rare crash in hlink.c:536
- rsync: on remote machine: --drop-cache: unknown option
- [Bug 10226] New: fatal_unsafe_io_error and the version it reports