Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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
share|improve this question
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 Nov 13 '12 at 22:12
add comment

1 Answer 1

up vote 3 down vote accepted

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.

share|improve this answer
    
ah, -t fixed it. I can't believe that isnt enabled by default. –  acidzombie24 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 –  acidzombie24 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? –  acidzombie24 Nov 13 '12 at 22:30
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.