discrepancy in file count
Jim Salter
jim at jrssystems.net
Fri Jul 9 14:34:22 GMT 2004
Rsync counts directories as files when it's creating the file list, but
does not count them as files in the "files transferred" statistic.
Example output from my backup logs, when initializing a new backup
volume (rsyncing a set of data to a completely empty filesystem):
[2004-07-09 03:03:37] - Number of files: 75007
[2004-07-09 03:03:37] - Number of files transferred: 68512
[2004-07-09 03:03:37] - Total file size: 62405883706 bytes
[2004-07-09 03:03:37] - Total transferred file size: 62405883706 bytes
[2004-07-09 03:03:37] - Total bytes written: 1096302
Note that 75007 files - 68512 files transferred = 6495 left over. Now
I'll count the number of directories in that fileset that the logfiles
above show getting backed up:
% find /scans -type d | wc -l
6495
%
And there are my "untransferred files" - they're all the directories in
my backup set. Everything synch'ed perfectly, it's just that
directories are counted as files *to* transfer but aren't counted as
files that have *been* transferred.
Is that a bug, or is it desired behavior? It seems unnecessarily
confusing to me - the instinctive reaction is to see fewer files
transferred than total files in the fileset and say "hey, why am I
missing several thousand?"
Jim Salter
JRS Systems
More information about the rsync
mailing list