1

I have tried many many different combinations of rsync commands, but whatever platform I use it on, from whatever source to whatever destination. It always transfers everything no matter if it's exactlyt the same or not. What is the secret? The last command I've used is this rsync -avz --progress source:somepath/specficfolder/* destination:otherpath/spceficfolder/

How do I get it to only transfer files that are modified?

UPDATE: Thank's to blackhats answer in pointing me the right direction I found a much better option for me to use was the --filesize option that only checks filesize to see if it needs to transfer the file or not. Checksome worked, but was extremely slow as most of my files are large mp3 files. I suppose it would a good option if your files are text files, source code, and other character data of that nature while large media files that wouldn't have changed are better transferred with the filesize option.

  • I've had this on file back-ups, and in my case the problem was that the back-up disc had a lower time resolution: when a file is copied, the source file has a sub-second time stamp, but the target file loses the sub-second part, so appears older on the next copy. My solution is to log the copy and run a script which analyses the log and increments the time-stamp by one second on each of the targets. You can check whether this is your problem by using ls --full-time on both the source and target files. – AFH Jun 30 '14 at 11:30
1

First, double check the files really didn't change. If they didn't try using --checksum option. Without, rsync uses filesize and modifictation time to determine which files changed.

Maybe the modification time is wrong.

If that doesn't help, issue some extra -v to get more verbose output, and read it very carefully.

Your Answer

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

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