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
On Fri, Jul 09, 2004 at 10:34:22AM -0400, Jim Salter wrote:> And there are my "untransferred files" - they're all the directories in > my backup set.It's an unintentional side-effect of how directories are handled that they aren't counted in the transferred-file stats, even if they got created (since the generator is the one that creates the missing dirs, but the receiver creates (and counts) the updated files). It would be nice to make this clearer somehow, but it would require a protocol update to get the count of created directories into the created file count, and that may not be worth it. If you have a suggestion for how to improve things, let me know. ..wayne..