Peter Risdon
2006-May-23 09:43 UTC
cross platform rsync avz lists all directory names in tree
Hi, I have tried googling and reading the docs and examples but haven't yet managed to solve this issue. rsyncing from Mac OS X to FreeBSD and from Linux to Windows XP, with the arguments avz I get the same thing in the reports (mailed from cron): path/ path/to/ path/to/directories/ path/to/directories/changedfile.txt another/path/ another/path/withoutanychangedfiles/ yet/anotherpath/ yet/anotherpath/withoutanychangedfiles/ ... and so on. With biggish directories this results in huge lists which have to be trawled through if manual checks are to be made that changed files were successfully copied/updated. I have a feeling that this stems from differences in permission/uid/gid values but haven't managed to find a combination of arguments that give a useful report. rsyncing between Linux and FreeBSD boxes is fine (of course). Can anyone advise how to limit the output to just files/directories that have been added, removed (if --delete is used) or changed when running across platforms like this? TIA. Please cc me, because I'm not a list subscriber. Regards, Peter Risdon.
Matt McCutchen
2006-May-23 14:04 UTC
cross platform rsync avz lists all directory names in tree
On Tue, 2006-05-23 at 10:18 +0100, Peter Risdon wrote:> Can anyone advise how to limit the output to just files/directories that > have been added, removed (if --delete is used) or changed when running > across platforms like this?Maybe you could use -i (--itemize-changes). That will produce lines like the following for a file with unchanged content but a lot of changed attributes: .f..tpog. myfile Then you could use grep -v '^\.' to filter out lines beginning with a dot, i.e., those indicating that only attributes were changed. If file content is changed or a regular file is created, the line will begin with < or >. If a non-regular file is created, the line will begin with c. If something is deleted, the line will begin with *. Matt McCutchen
Wayne Davison
2006-May-23 16:07 UTC
cross platform rsync avz lists all directory names in tree
On Tue, May 23, 2006 at 10:18:23AM +0100, Peter Risdon wrote:> another/path/ > another/path/withoutanychangedfiles/ > yet/anotherpath/withoutanychangedfiles/ > ...If this is caused by a change in timestamps, you can avoid the updating of directory timestamps by using the -O option. If you still see updates to the directories, then using -i will at least tell you what attributes rsync thinks are different (and, as Matt indicated, you could filter the -i output to get rid of any updating-attribute lines). One other potential cause for a timestamp difference: if you're copying to a FAT filesystem, you should use the option --modify-window=1 because the timestamps can't store an odd value. ..wayne..