Bug 6080 - Rsync not transferring anough file
Summary: Rsync not transferring anough file
Status: RESOLVED INVALID
Alias: None
Product: rsync
Classification: Unclassified
Component: core (show other bugs)
Version: 3.0.5
Hardware: x86 FreeBSD
: P3 normal (vote)
Target Milestone: ---
Assignee: Wayne Davison
QA Contact: Rsync QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-01 14:49 UTC by Francois
Modified: 2009-02-01 15:00 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Francois 2009-02-01 14:49:56 UTC
Hi everyone!

I have a problem with rsync (wonderful tool by the way!).

I use FreeBSD 7.0.

I use it to backup data from our file server to our nas.

There is about 20Go of data to copy.

During the first copy, i also use rsync.

The problem is that *apparently* not all files are copied. (In fact i cannot check if it's true since rsync doesn't produce any errors)

I copy files accross a mounted samba share.

I use a script to copy all those things (using cron).

Here is my script:

#!/usr/local/bin/bash


if mount_smbfs -I <IP> -E UTF-8:CP850 //francois@nas/backup /mnt/nas;
then
	check=$(date '+%A')

	if [ -d /mnt/nas/$check ]
	then 
		/usr/local/bin/rsync -a --stats --delete --delete-before /usr/home/<user>/data /mnt/nas/$check	
	else
		mkdir /mnt/nas/$check
		/usr/local/bin/rsync -a --stats --delete --delete-before /usr/home/<user>/data /mnt/nas/$check
	fi
	umount /mnt/nas

else
	echo "Impossible to mount samba share!"
	exit
fi

It just mount samba shares and set charset to avoid encoding problems.

The problem I see is when --stats shows me his statistics:

Number of files: 707443
Number of files transferred: 695454
Total file size: 24010667438 bytes
Total transferred file size: 24010667438 bytes
Literal data: 24010761646 bytes
Matched data: 0 bytes
File list size: 8206592
File list generation time: 27.429 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 24051362502
Total bytes received: 13249605

sent 24051362502 bytes  received 13249605 bytes  702790.83 bytes/sec
total size is 24010667438  speedup is 1.00

Why does:
      Number of files > Number of files transferred
      Total file size > Total transferred file size
      Literal data  >  Total bytes sent

Rsync does not produce any errors during or after transert.

Since it's a backup solution very important for the office, i'm a little bit scared of that i output.

Thanks a lot for any reply 

François Van Ingelgom
Comment 1 Matt McCutchen 2009-02-01 15:00:43 UTC
This is not a bug.  You should first post to the mailing list, rsync@lists.samba.org, unless you are pretty sure you have a bug rather than a misunderstanding.

(In reply to comment #0)
> The problem I see is when --stats shows me his statistics:
> 
> Number of files: 707443
> Number of files transferred: 695454
> Total file size: 24010667438 bytes
> Total transferred file size: 24010667438 bytes
> Literal data: 24010761646 bytes
> Matched data: 0 bytes
> File list size: 8206592
> File list generation time: 27.429 seconds
> File list transfer time: 0.000 seconds
> Total bytes sent: 24051362502
> Total bytes received: 13249605
> 
> sent 24051362502 bytes  received 13249605 bytes  702790.83 bytes/sec
> total size is 24010667438  speedup is 1.00
> 
> Why does:
>       Number of files > Number of files transferred

"Number of files" is the number of source files rsync considered on the current run, including all types (directories, etc.).  "Number of files transferred" is the number of regular files that rsync transferred because the destination did not have an up-to-date copy.  Directories probably account for the difference you saw.

>       Total file size > Total transferred file size

No, in the output you posted, the "Total file size" and "Total transferred file size" are both 24010667438 bytes.

>       Literal data  >  Total bytes sent

Again, this is not true in the output you posted.  But one way that could happen is the -z option.