Its only size that matters
I have for a long time, been using brute force to mate my two computers and keep their tiny brains in sync with each other.
When I try to rsync my desktop and laptop’s FAT32 partitions, it always tried to transfer all the files even when most of them existed unmodified in both locations. A while ago I tried to play with the –modify-window value, but that didn’t make any difference. I relied entirely upon the -c (checksum) command, which went through every byte of the massive amount of data to calculate the checksum for each file on both computers, before deciding that they existed in both locations and so didn’t need to copy it. This understandably took a while, especially on my laptop where the hard drive access speed is less than desirable.
FAT32 is a farily restrictive file system in terms of permissions and has very little file metadata in comparison to a journal file system, like ext3 and so there is little for rsync to go off when trying to find out if a file has been modified, accessed or created. On top of that, the basic mtime for windows uses one less byte, and so has a resolution of 2 seconds which can create interesting scenarios. As if that is not enough, if the two computers are in different time zones (or windoze decides that it will cleverly change to BST even though linux has updated the system clock to that effect, so you still end up an hour out) you can have the same file with different metadata.
Today I got fed up waiting for my desktop and laptop to checksum themselves, and so decided to read the man rsync pages. There I found an option named –size-only, which only compares files based on size rather than the mtime metadata. Now it only takes a second or two to compare the file lists on my computers. Perhaps occasionally I should include the checksum to make sure there are no files that I have edited but are still the same size, but for now I am happy with –size-only.
andy@laptop:~$ rsync -rv –size-only –delete andy@desktop:/file_storage/ /laptop_storage/








