I found rsync redoing files that have no modification. One file is >1gb so it takes a bit to do. My command is below. I'm running the command via ssh. The filesystem in question is a NTFS usb HDD to a ext3 filesystem. Both connected to the same virtual machine running ubuntu

rsync --stats --progress -r src dst
  • 1
    Always use rsync -a unless you know there's something you don't want to preserve. Without any options, you're asking rsync to not preserve times, so it can't use the modification time as an optimization not to copy the file the second time. – Gilles 'SO- stop being evil' Nov 13 '12 at 22:12

It's possible that you don't have permissions to set the modification times on the destination, you should see this if it is happening when you explicitly use rsync -t.

Also, you may want to account for variances since some data is lost in the transition from Unix to NTFS mtimes: --modify-window=2 should do the job.

  • ah, -t fixed it. I can't believe that isnt enabled by default. – user4069 Nov 13 '12 at 20:37
  • 3
    Why would one make behaviour that's required non-linux file-systems the default for a linux tool? – tink Nov 13 '12 at 20:56
  • @tink was that at me? I am using linux and it thinks the file didnt change because i didnt include -t – user4069 Nov 13 '12 at 22:28
  • @acidzombie24 Yes, but NTFS is a non-Linux filesystem. That's the point he's making. – Chris Down Nov 13 '12 at 22:29
  • I see. Then how does it know if a file was modified or not? – user4069 Nov 13 '12 at 22:30

Your Answer

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