Using Unison to sync /var/vmail/

Discussion in 'Server Operation' started by SwOsHiE, Dec 19, 2011.

  1. SwOsHiE

    SwOsHiE New Member

    Hello,

    I've successfully installed Unison to sync /var/www/ and now I want to sync /var/vmail. But before I do this, I want to know if there is some common problems using this method? Has anyone done this before? Is there something to think of when doing this?

    Best regards,
    Mattias
     
  2. falko

    falko Super Moderator Howtoforge Staff

    Should work without problems. :)
     
  3. SwOsHiE

    SwOsHiE New Member

    Just solved it on my own :) this is how i did it:

    I followed this guide for syncing /var/www

    http://www.howtoforge.com/setting-up-unison-file-synchronization-between-two-servers-on-debian-squeeze

    Then I modified the config file for Unison to use /var as a root and sync both /var/www and /var/vmail:

     
  4. SwOsHiE

    SwOsHiE New Member

    Thank you Falko, was to eager to set this up so tried just before you posted :p
     
  5. MaddinXx

    MaddinXx Member

    Hi there

    Thanks from me as well for the unison tutorial - it's great!

    One question: Is it enough to have the cron running on one server only?
    E.g. will it behave like:

    Code:
    if 1st server goes down and changes take place on 2nd server, will the 1st server update itself to the state of 2nd server?
    Thx!
     
  6. dgeho1

    dgeho1 Member

    I am relatively new to unison, but as I understand it (plz correct me if I'm wrong)

    if prefer=newer is set in whichever .prf file the cron on the main server

    when the main server comes back up and runs the cron, that the newer files that have been updated on the slave while the main was down should be copied back up to the master.

    Hope this helps

    I'll do a test and let you know if it turns out different.
     

Share This Page