Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am using rsync to copy ~10GB of small files. What happens if the files in the source directory are modified while rsync is running?

share|improve this question

2 Answers 2

rsync first scans the files and builds a list. so once the file is listed for sync, rsync will sync the latest change of file. but if the file is not in the list of files to be synced, which was built before starting the sync operation, then it will not sync it.

share|improve this answer
    
Can you reword that please, specifically the line that reads "but if the file is not listed earlier". –  puk Nov 21 '13 at 23:07
1  
@puk, done. check it. –  Sachin Divekar Nov 22 '13 at 1:53

What happens if the files in the source directory are modified while rsync is running?

That depends if they are modified before rsync is running as well. As @Sachin said if they are not modified before the transfer then modifications during the transfer won't be picked up, however:

if you are modifying a file while it's being transferred, then probably the checksum will fail and it'll go round again. And if it goes around twice, and it still fails, then it prints a message saying; Error, checksum failed, file changed during transfer?

share|improve this answer

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.