Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .