Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'd like to try rsync in batch mode against a list of target hosts. The assumption is that all target hosts are at state X. I'd go and create the batch file for rsync against a reference host in that list and apply it to the remaining hosts. Big question is: What will happen if one of these remaining hosts is NOT at the same state as the reference host (Which may have happened because it was out of the loop the last time i synchronized all hosts). Will rsync tell me that something wrong happened? Or will it happily apply the batch file, producing garbage on the unsynchronised host? Any experience?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

From man rsync

The read-batch option expects the destination tree that it is updating to be identical to the destination tree that was used to create the batch update fileset. When a differ-
ence between the destination trees is encountered the update might be discarded with a warning (if the file appears to be up-to-date already) or the file-update may be attempted
and then, if the file fails to verify, the update discarded with an error. This means that it should be safe to re-run a read-batch operation if the command got interrupted. If you wish to force the batched-update to always be attempted regardless of the file's size and date, use the -I option (when reading the batch). If an error occurs, the destina- tion tree will probably be in a partially updated state. In that case, rsync can be used in its regular (non-batch) mode of operation to fix up the destination tree.

share|improve this answer
    
well you should probably downvote the question and rtfm me. thanks for the hint! –  zedoo Feb 25 '11 at 16:40

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.