<div class="gmail_quote">On Mon, Mar 1, 2010 at 3:35 PM, Khalid J Hosein <span dir="ltr">&lt;kjh at pobox dot com&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Hello all,<div><br></div><div>I have a strange problem where rsync is copying over all files instead of just the ones that have changed.</div><div><br></div><div>My setup:</div><div>--------------</div><div>Backup server runs a script that calls rsync in more or less this form:</div>


<div>   &quot;rsync --rsh=ssh user@remote.server.com:/backups/stuff /localbackup&quot; </div><div><br></div><div>Of course, I use a # of options, but the main ones are &quot;-axS&quot; </div><div><br></div><div>Just in case, here are the other options I use: --delete --force --stats --cvs-exclude --bwlimit=100 --exclude-from=rsync-excludes.txt --delete-excluded </div>


<div><br></div><div><br></div><div>Backing Up Other Machines</div><div>----------------------------------------</div><div>I&#39;ve tried and use this same script from the same backup machine against other servers (on different hosts) and found that the exact same set of options worked just fine.</div>


<div><br></div><div>Other Tests</div><div>-----------------</div><div>I&#39;ve scoured the lists and Web for solutions and tried things like --size-only, --ignore-times, --checksum and --whole-file. I&#39;ve broken down my list of options to nothing and tried countless combinations (using dry runs), but haven&#39;t had any luck. I keep getting the notorious &quot;Matched data: 0 bytes&quot; in my stats.</div>


<div><br></div><div>At this point, the only thing that I can think of is something to do with the target server (CentOS release 5.4, 2.6.18.8, i686), but I can&#39;t think of what exactly.</div><div><br></div><div>Any help would be appreciated. TIA.</div>


<div><br></div><font color="#888888"><div>_KJH</div>
</font></blockquote></div><br><div>Well I think I&#39;ve discovered the problem - the delete flags. I used: &quot;--delete --delete-excluded --force&quot;. Once I got rid of those, it started behaving as expected, both from the script and directly from the command line.</div>

<div><br></div><div>I noticed that it seemed to be deleting every file in the destination before sync&#39;ing from the target. Even changing the --delete flag to --delete-after didn&#39;t change this.</div><div><br></div>

<div>It&#39;s not ideal, but it&#39;s much better than re-sync&#39;ing all of the data on every backup. Thanks for the suggestions.</div><div><br></div><div>_KJH</div>