[Tutorial] How to use unison for replication, synchronization folder for Ubuntu

Unison is a file-synchronization tool for Unix and Windows. It allows two replicas of a collection of files and directories to be stored on different hosts (or different disks on the same host), modified separately, and then brought up to date by propagating the changes in each replica to the other

Replication folder /tmp/srv238 (on 192.168.2.238) <-> /tmp/srv239 (on 192.168.2.239) (master-master) with user: super.

S1. Setup login ssh without password
- Create public key and private key in ssh client:
ssh-keygen -t dsa
- Copy public key from client to ssh server:
ssh-copy-id -i ~/.ssh/id_dsa super@webserver2
S2. Config file Unison, auto answer request
sudo nano /home/super/.unison/default.prf
Edit file
root = /tmp/server238
root = ssh://192.168.2.239//tmp/server239
auto=true
batch=true
S3. Start
Manual start:
unison default
Auto start every 1 minute:
crontab -e
and add line:
  1 * * * * unison default
S4. Log
tail -f /home/super/.ssh/unison.log