1

I am using rsync to synchronize my files but I have come to a problem when in source I add some tags (or in general probably modify xattrs) to the file, no other changes and it seems that this does not change the modified date of the file. Therefore, rsync is unaware that it should copy the file over. Further, the hashes are also the same. So is there a way to keep synchronized files the attributes of which are different?

At this moment I am using:

rsync --dry-run -vhzrXte ssh user@server:dir1/dir2/dir3 dir1/dir2/dir3

but if I change e.g. tags of some files in dir3, the files do not get synced, apparently, the modified date/time is the same and so seems to be the size.

  • Provide your full rsync command. Normally using rsync -AX will pickup xattr changes + this will only work if xattr support exists at both source + target of your rsync operation. For example, if you rsync -AX from Linux to OSX, then your xattr changes will be a NOP (no operation/zero action), because OSX has no concept of xattrs. – David Favor Nov 15 '17 at 14:51
  • @DavidFavor I am syncing between to almost identical Debian distributions (both at 9.2) both supporting xattr. – leosenko Nov 15 '17 at 14:54
  • I find that rsync does transfer the changes, but claims the file is up to date with -vv – Stéphane Chazelas Nov 15 '17 at 14:59
  • With 3 -vs (and no --dry-run), the only difference in output between a case where there has been a change in attrs and one with no change is a set modtime of file.test to (1510757291) Wed Nov 15 14:48:11 2017 line (even though the modtime has not changed). I see no difference at all with --dry-run. Looks like a bug to me (was between 3.1.2 client and 3.1.0 server) – Stéphane Chazelas Nov 15 '17 at 15:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.