Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 04-13-2009, 02:34 PM   #1
Registered: Apr 2009
Posts: 38

Rep: Reputation: 15
Rsync problem: copying entire file when almost identical

Hello. I'm practicing my rsync-skills. Can anyone tell me why rsync insists on copying the entire source file when syncing two almost identical files, instead of just the diff? My example file is an 677 MB iso file.

$ ls -l 
total 661920
-rw-r--r-- 1 rick users 677138432 2009-04-13 12:26 original.iso
I create a slightly modified version by copying and appending some bytes to the end:

$ cp original.iso modified.iso

$ echo hello >> modified.iso
rsync insists on transfering the entire file (yes, I know it's all local in this example)...

$ rsync -av --stats original.iso modified.iso 
sending incremental file list

Number of files: 1
Number of files transferred: 1
Total file size: 677138432 bytes
Total transferred file size: 677138432 bytes
Literal data: 677138432 bytes
Matched data: 0 bytes
File list size: 42
File list generation time: 0.001 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 677221182
Total bytes received: 31

sent 677221182 bytes  received 31 bytes  26557694.63 bytes/sec
total size is 677138432  speedup is 1.00
As you can see, 677138432 bytes are sent and 0 bytes match... what am I missing?
Old 04-14-2009, 10:56 AM   #2
Registered: Oct 2007
Posts: 31

Rep: Reputation: 16


This only seems to happen when both files are local, when a remote target is specified it matches the duplicate data.

It also matched the duplicate data when I specified username@ in the target.

I assume it is less work for Rsync to operate this way locally?




Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
copying an entire syste - where did I go wrong? oskar Linux - General 1 01-21-2008 09:08 AM
Copying entire directory with subdirectory? centosfan Linux - Newbie 1 04-20-2007 09:14 PM
Rsync Entire Filesystem? sutley Linux - Newbie 4 10-04-2006 06:29 PM
copying multiple different files in different directories with identical file names nickleus Linux - Software 4 03-09-2006 01:25 PM
copying entire intallation viniosity Linux - Newbie 4 03-17-2003 11:22 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:57 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration