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.

Say I have a file in a directory mysite/a.php on machine A and machine B. The files will not have any difference initially.

On machine A if a.php is changed and then when a sync is done from machine B to A, will a.php have the change or will it be overwritten? What about directories?

share|improve this question

migrated from stackoverflow.com Nov 25 '10 at 1:15

This question came from our site for professional and enthusiast programmers.

    
Did you have any particular flags that you wanted to use? –  Ignacio Vazquez-Abrams Nov 25 '10 at 2:33

1 Answer 1

Rsync synchronizes only in one direction.

If you sync from B to A, then the content in A is overwritten (and vice versa). Basically you should to select one master machine and make all changes there.

If changes have to be done at both machines, then you'll need bidirectional synchronization. Unison is a good program for that purpose.

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.