Bi-Directional File Sync Using UNISON


UNISON File Synchronizer can be used to perform bi-directional sync between two directories (local or remote)



UNISON file synchronizer can be install through yum by the below command

yum install unison -y

Note: Make sure that you have EPEL repository installed/enabled on the server


apt-get install unison


Synchronizing Local Directories:

unison -batch /path/to/directory1  /path/to/directory2

Local to Remote Synchronization:

unison -batch /path/to/local/directory ssh://

Note: Make sure that the both the servers are configured with Key Based SSH Authentication to avoid password prompts during sync..