What's best and easiest to check sync result ?

Paul Johnson pauljohn32 at gmail.com
Tue Jun 10 14:26:04 UTC 2008


On Mon, Jun 9, 2008 at 9:22 PM, SYNass IT Ubuntu / Linux
<i-ubux at synass.net> wrote:
> Hello Ubuntuans,
> Recently we discussed rsync quite intensively ! ;-)
> Since I was experimenting with it was very interesting to hear and
> learn !! ;-))
>
> I already have done some "sync's" from my HDD to an external HDD quite
> sucessfully and
> I only have some questions how to check and control the result best and
> easiest.
>
> My rsync closes with this statement:
> sent 7565493096 bytes  received 1457080 bytes  819865.67 bytes/sec
> total size is 7557361145  speedup is 1.00
>
> and properties shows following for:
> Source: 4054 files / 6GB
> Target: 4054 files / 6GB
>
> So, Source and Target, show identical values ! ;-)
> Why is rsync's closing statement showing a difference ? :-|
>
> How can / does one check exactly these difference ???
> Well, there are diff or Meld but ways to extensive and
> very difficult to discover the difference and its reasons,
> i.e. their files ??
>
> Is there a better solution available ?
>
> TIA for your advice and guidance,
> cheers, svobi
>
>
>
> PS - My command:
> rsync -av --progress /source /target
>

Please note that rsync does not give a "speedup" with local copies.
WHen it copies a file, it copies the whole file.  The selective
copying of portions of files is only done on network transfers.

To check to see if 2 directories are the same, sometimes I do

rsync -ravn  /source /target

that will report back files that have different ownership, sizes,
modification times, and/or checksums, depending on your options.  If
you need to compare across 2 file systems, say ext2 to MSDOS, then you
need to add an option --size-only so that it doesn't get distracted by
the ownership.

On a local comparison, you can do this to see if 2 drives are the same:

diff -r /source /target

That should tell you exactly which items differ. (I just got curious
how it compares. See:
http://www.network-theory.co.uk/docs/diff/Binary.html. It says GNU cmp
can report byte-by-byte differences among binary files).   It doesn't
tell how they are different, it just reports "binary files differ"
I'm new to Ubuntu, but I notice it also has tools "dirdiff" for
comparing directories and "rdiff", a binary diff tool. dirdiff looks
like fun, I've just installed it to see what it does.

If you are using target as a backup, I'd suggest you consider this
tool "rdiff-backup".  I notice it is in the Ubuntu repositories.  It
uses the rsync "copy only the changed part" power, even on a local
system.  The first backup copies the entire file, but then on the
following ones, it only saves the "changed part", and it layers those
things so that, in the future, you can restore "that file from 14 days
ago" or such.  Its quite impressive.


> An extra question for parameter "Backup":
> How and when does one need this being set !
> Only at the first time to get a full set ??
>
> The following link shows a dsicussion about sync's options:
> http://linuxgazette.net/147/misc/lg/rsync_options.html
>
> Unfortunately "Backup" isn't mentioned. ;-(
>
> Once more TIA for your help. ;-)
>
>
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>



-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas




More information about the ubuntu-users mailing list