<div class="gmail_quote">On Mon, Mar 1, 2010 at 3:35 PM, Khalid J Hosein <span dir="ltr"><kjh at pobox dot com></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> "rsync --rsh=ssh user@remote.server.com:/backups/stuff /localbackup" </div><div><br></div><div>Of course, I use a # of options, but the main ones are "-axS" </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'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've scoured the lists and Web for solutions and tried things like --size-only, --ignore-times, --checksum and --whole-file. I've broken down my list of options to nothing and tried countless combinations (using dry runs), but haven't had any luck. I keep getting the notorious "Matched data: 0 bytes" 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'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've discovered the problem - the delete flags. I used: "--delete --delete-excluded --force". 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'ing from the target. Even changing the --delete flag to --delete-after didn't change this.</div><div><br></div>
<div>It's not ideal, but it's much better than re-sync'ing all of the data on every backup. Thanks for the suggestions.</div><div><br></div><div>_KJH</div>