On Fri, 18 Jan 2013 at 08:07 -0000, SilverTip257 wrote:
If you change a directory name, rsync has no way of knowing that you moved it. And since the new directory doesn't exist on the rsync source that new directory is removed and those items are rsynced again.
Bottom-line: Change things on the source and don't fiddle with them on the destination. Or if you really want to eliminate that data being transferred, I suppose you could do the extra work and rename the directory at the same time on the source and destination. Not ideal in the least.
I use a home grown rsync based backup process (for 15+ years).
When traveling or otherwise worried about large directory tree renames, I will sometimes do a 'cp -rpl' instead of a rename. This will allow rsync to notice the new hard links and it just create the new directory structure without transferring the data again. After the rsync is complete I can then remove the original directory tree and rsync again. The rsync needs to use --hard-links for this to work.
I only recommend doing this if you understand and are comfortable with hard links and rsync.
Stuart