Matt McCutchen
2006-Nov-28 04:39 UTC
Question about deleting a file from the server via Rsync
On 11/27/06, Ben Anderson <ben@capecomputing.com> wrote:> I'm using cwrsync (with rsync 2.6.9) via sshCareful: when we say "rsync via ssh", we usually mean that the client rsync invokes a second instance of rsync on the server as the ssh remote command. Your setup counts as talking directly to an rsync daemon; rsync doesn't care that the connection goes through ssh port forwarding.> I'm trying to delete C:\ba\myFile.ico from the server by using > --delete-excluded and > --exclude="/cygdrive/C/ba/myFile.ico". > > Command to run: "c:\cwRsync\bin\rsync.exe" -vvv -R -r --delete-excluded > --exclude="/cygdrive/C/ba/myFile.ico" > /cygdrive/C/ba/myFile.ico > rsync://myUser@localhost:9119/modName/BensComputer/The trouble is that the receiving rsync only deletes files from a directory if the entire directory is part of the transfer. So you should specify /cygdrive/C/ba , not /cygdrive/C/ba/myFile.ico , as the source. Keep in mind that you must continue to specify the --exclude rule on future runs if you don't want rsync to copy myFile.ico to the server again. Matt