LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 04-13-2009, 02:34 PM   #1
genmaicha
Member
 
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.

Code:
$ 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:

Code:
$ 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)...

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

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
zer0x333
Member
 
Registered: Oct 2007
Posts: 31

Rep: Reputation: 16
Rsync

Hi,

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@127.0.0.1: in the target.

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

Cheers,

zer0x
 
  


Reply


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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

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