

Unison is very easy to use and requires no extra effort. _168_43_165 ~]# unison -batch /root/Files ssh:// //root/FilesĬheck the information on the second server /root/Files Folder, whether the file is synchronized: _168_43_165 ~]# unison -testServer /root/Files ssh:// //root/FilesĬonnected Īfter the connectivity is OK, we can execute the command to synchronize the file Use below -testServerOption to test connectivity between local and remote servers. _168_43_165 ~]# mkdir Files Create a folder on the second server. Now create two folders under the root directory of the two servers to synchronize files. If remote file synchronization is required, unison must be installed on both local and remote servers. You can see that the contents of the backup folder are synchronized to files

Now modify a file in the backup folder, then add the given file, and finally perform the above steps commandTo see if it will be synchronized to the files folder: _168_43_165 ~]# unison -batch /root/Files /root/BackupĬheck the backup folder and find that the files are synchronized. Run it now unison commandTo synchronize files to the backup folder. Create files in files and synchronize them to backup. Unison is used to synchronize a set of files in a directory to another location with similar structure, which can be a local host or a remote host.Ĭreate two folders under the root home directory, one is “files” and the other is “backup”.

Two operating systems are configured with SSH password free login
#Unison synchronize install#
In both systems, install the EPEL source, and then install unison Unison is a cross platform file synchronization tool, which is very useful in synchronizing data between computers or storage devices.
