cd src make #Copy unison binary to /usr/bin cp unison /usr/bin/ #On the source server create SSH key-pair and copy public key to destination: ssh-keygen ssh-copy-id root@destination-ip #Following tasks are required on source server only: Edit /root/.unison/default.prf # Roots of the synchronization root = /var/www root = ssh://192.168.0.101//var/www
# Paths to synchronize #path = current #path = common #path = .netscape/bookmarks.html
# Some regexps specifying names and paths to ignore #ignore = Path stats ## ignores /var/www/stats #ignore = Path stats/* ## ignores /var/www/stats/* #ignore = Path */stats ## ignores /var/www/somedir/stats, but not /var/www/a/b/c/stats #ignore = Name *stats ## ignores all files/directories that end with "stats" #ignore = Name stats* ## ignores all files/directories that begin with "stats" #ignore = Name *.tmp ## ignores all files with the extension .tmp
auto=true
batch=true
confirmbigdel=true
fastcheck=true group=true
owner=true
prefer=newer
silent=true
times=true
# set log file log = true logfile = /var/log/unison.log
How to use
Just run unison or you can creating a Cron Job for Unison run it every 5 mins.