HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Server Operation (http://www.howtoforge.com/forums/forumdisplay.php?f=5)
-   -   Using Unison to sync /var/vmail/ (http://www.howtoforge.com/forums/showthread.php?t=55453)

SwOsHiE 19th December 2011 10:01

Using Unison to sync /var/vmail/
 
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

falko 20th December 2011 12:56

Should work without problems. :)

SwOsHiE 20th December 2011 12:57

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...debian-squeeze

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

Quote:

# Roots of the synchronization
root = /var
root = ssh://192.168.1.2//var

# Paths to synchronize
#path = current
#path = common
#path = .netscape/bookmarks.html
path = www
path = vmail

SwOsHiE 20th December 2011 13:00

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

MaddinXx 12th April 2013 21:32

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!

dgeho1 23rd November 2013 08:15

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.


All times are GMT +2. The time now is 16:48.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.