Set up Unison for Two Way Syncing on 2 Centos Servers

Have been played with both Async and Unison, I found Unison is more powerful, especially on 2 way syncing include deletion. Unison is easy to get start as well.

You can setup Unison by compiling the source, but it is not as easy as I thought – I ran into some libraries dependency conflicts.

Luckily, I am working on Centos servers. I can just use Yum to install it.

Enable Fedora EPEL repos for your Yum with protectbase

wget http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
rpm -Uvh epel-release-5-4.noarch.rpm
yum install yum-protectbase.noarch -y
yum repolist

Install Unison via Yum

yum install unison -y

Enable SSH Access without Password

On local host, do these:

ssh-keygen
#followed by three ENTERs
ssh-copy-id -i .ssh/id_rsa.pub root@remotehost
ssh root@remotehost

Sample Unison Command

/usr/bin/unison /web/live1 ssh://remoteserver/web/live2 \
-ignore "Path WEB-INF/config" \
-ignore "Path WEB-INF/derby" \
-ignore "Path WEB-INF/test/test.xml"

Reference

HowTo Use unison File Synchronizer
3 Steps to Perform SSH Login Without Password Using ssh-keygen & ssh-copy-id

Why I choose Thunderbird with Google Service

With great Google App Service, many businesses go with Google — me too!

To get emails, calendar, contacts Sync with Google App, which program are you using?

Outlook? sure – it works when with Google Sync + Google App Premium ($50 per account).

How about you are using Google App Standard?

ThunderBird!

TB(ThunderBird) works smoothly with Google App Standard, you just need to install some plug-ins and fine turn some settings:

For Google Contact and TB Address Book

  1. Install TB Plug-in: http://www.zindus.com (Or install from TB Tools -> Add-On)
  2. Input your Google App Account User Name and Password
  3. TB, Tools -> Options, Compostion, Address (tab), Change Automatically add outgoing email address to my “Personal Address Book”. Since ZINDUS default syncs Google Contact with TB’s Personal Address Book, you may want to change default address book to Personal Address Book as blow:
  4. tb-address

For Google Calendar and Thunderbird (up to version 3.* – Suggest installing through Thunderbird Add-on Manager.)

  1. Install Lightning Plug-in for Thunderbird at https://addons.mozilla.org/en-US/thunderbird/addon/2313
  2. Then install plug-in Provider for Google Calendar at https://addons.mozilla.org/en-US/thunderbird/addon/4631?src=reco
  3. Then follow instruction here to set up your Google Calendar Sync.