rsync keeps writing files over

Simon Hobson linux at thehobsons.co.uk
Fri Jun 3 09:16:39 UTC 2016


"McDowell, Blake" <McDowellH at si.edu> wrote:

> The storage is just an regular HDD in a mac pro tower.

Ah, is this the version of rsync that comes with OS X ? Are these HFS+ filesystems ?

I vaguely recall that the OS X version is "hacked" to handle the file semantics of HFS+ filesystems. Hopefully someone else actually knows the details, I could be a bit wrong here, but IIRC it's something like :
On a "*nix" filsystem, a file is a file - a chunk of data and some filesystem metadata. On HFS+, a file is comprised of up to 3 parts - the data fork, the resource fork (I don't believe this is widely used these days), and a chunk more metadata. "Regular" rsync only copies the data fork and that part of the metadata that maps to *nix filesystem semantics, the OS X version of rsync copies the whole file by way of quite a kludge - can't remember if it needs an extra cmd line switch to do this.
The kludge is to treat the data fork as one file, and the resource fork plus metadata as another file. I vaguely recall that this means it does something like :

1) copy/sync data fork as one file
2) copy/sync resource fork as another file - put the bits together at the destination

From memory (it's a while since I last used rsync for doing backups), in step 1 the files don't match because the destination file was modified during step 2 of the last copy - thus the file gets synced again. Again from memory, I think I used to see that every file with a resource fork would be copied in it's entirety every time.

This could be a complete red herring of course, but it's something I've come across in the past/





More information about the rsync mailing list