srakaall.blogg.se

Unison synchronize
Unison synchronize












Also, we can set those options using a configuration file. Unison provides an extensive set of CLI options that we can use to establish the sync configuration. Configuration must be set in the master, which is responsible for launching the sync process. Unison must be installed on both master and slave. In this scenario, one of the servers acts as the master and the other as the slave. To keep things safe we will use SSH tunnels to transfer the data. Once installed we can sync two servers connected over the internet. We must use the -batch CLI option to launch the tool in batch mode to skip user intervention. Once installed, we can sync two directories running the following command: unison -batch dir1 dir2

#Unison synchronize install#

In OSX, we must use homebrew to perform the installation: brew install unison In order to use the binary from a terminal, we must place it in a directory included in the system path.Īlternatively, in a debian-like distribution, we can install the tool using apt: sudo apt-get -y install unison To install Unison we can download the precompiled binaries from here. Also, security is guaranteed because it can work over SSH tunnels. This tool works like rsync but it keeps stateful data supporting the bidirectional sync. It allows two replicas of a collection of files 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.

unison synchronize

Unison is a file-sync tool for OSX, Unix, and Windows. There are several options to carry out this task, such as clustered file systems, but I have chosen a simple approach using Unison, a user-level tool that can be used to sync two replicas.

unison synchronize

This approach is simple and functional, but there is a problem: the sync must be bidirectional if we need to keep two identical replicas and avoid integrity issues. Until now, I was performing this task using the rsync tool and a cron task. Currently I am managing two little servers and I need to keep some data in sync.












Unison synchronize