Hidden in the back pockets of a few savvy system administrators is a free, mature, and open source file synchronization tool called Unison. Like sound coming together from two speakers, Unison does a solid job synchronizing smaller files and directories between (at most) 2 systems.
Unison provides bidirectional (two-way) file synchronization software. What’s different from other file synchronization tools like Rsync is that Unison is truly bidirectional: Users may create or change files and directories on either system. In Unison vernacular, each system is known as a replica. Unison also tracks file changes. In situations where Unison detects a conflict (e.g., when two users are updating the same file) it must be resolved manually.
Unison also works in client-server, hub-and-spoke topology for backup & sync. Each spoke pairs with the hub; thus, changes are only propagated between the hub and the one spoke. This is by no means real-time nor scalable, but may suffice for basic file backup use cases.
Unison runs on a variety of Unix-like operating systems (Linux, macOS/macOS X, Solaris, FreeBSD, et al) and Microsoft Windows. You can install a graphical user interface or drive Unison from the command line. Unison is cross platform and you can backup & sync files between different operating systems (e.g. from Unix to Windows) but according to the Unison Readme each system must include an OCaml compiler. The Unison FAQ recommends keeping the same software versions on all replicas.
Unison is a bit like a bidirectional version of Rsync that handles some level of version control. The big difference between Unison and Rsync is that Rsync is only unidirectional—i.e., syncs files one-way, from a source to a target system. Practically speaking, both Rsync and Unison were designed in the 90’s—Unison being released in 1998—when file sizes and file systems were much smaller, and there were fewer numbers of files. In modern implementations, as the number of files grows, or file sizes increase, Unison may bog down. Like Rsync (and other free tools like DirSync Pro to Synctoy), Unison also relies on scanning the file system and reading all files into memory to build an index of which files have changed.
Unison’s major limitations are primarily architectural: each of the 2 Unison systems are points of failure. And Unison file synchronization jobs don’t scale beyond the 2 systems. There are the caveats mentioned earlier around file sizes, number of files, network conditions, and so forth. Another limitation is that changes to files may not always be captured and replicated.
Without the ability to capture file changes in real-time, Unison (as well as rsync and other point-to-point tools) are not practical solutions for systems containing larger numbers of files. That said, the Unison file synchronizer may be useful in scenarios such as:
- Basic two-way sync between 2 locations. The locations can be remote if the network is low latency, or connected on the same LAN, and the payload is relatively small.
- Hub-and-spoke (client/server) synchronization where each remote replica (the spoke) can synchronize back and forth between one central hub; and vice versa. NB: the hub is a point of failure and can not concurrently transfer files to each replica (each spoke).
- Laptop or desktop sync for basic file backup. Instead of synchronizing the “documents” folder in Windows or home directories in Linux, you can use freemium or free products like Unison to sync files and keep a remote backup copy. For command line and Unison savvy admins, this may be a preferred alternative to using Microsoft OneDrive, Google Drive, or Dropbox. Or you could use a cloud provider like Amazon AWS to host the Unison instance—but that may be cost prohibitive, depending on your budget.
- Basic file transfer, FTP, or file copy (SCP, Robocopy, Rsync) replacement including SSH: This is a good option if replication and file sync is contained to two endpoints—files are relatively small, and network conditions good.
- Open source: If you need to compile, recompile, or adapt your own C-based solution and prefer to use an open source tool, Unison is available under the GNU Public License, v3. And stored on Git (see GitHub for install instructions).
In these scenarios above, you might also consider Resilio Sync for basic two-way file synchronization or “freefilesync”.
Unison Alternatives: When to consider Resilio Connect
As a Unison file sync alternative, consider using Resilio Platform for scenarios such as:
- Remote Work: In remote work, users often need to sync one file to many (one-to-many) destinations or other people, in real-time or scheduled. Resilio Platform enables users to concurrently sync files and folders to N-number of systems. Resilio’s peer-to-peer architecture enables file synchronization jobs to run across up to many thousands of destinations on popular devices running Windows, macOS / OS X, a variety of Linux distros (Ubuntu et al), Android, FreeBSD, and directly on select NAS devices).
- Real-time, Server Sync. Resilio Platform is incredibly fast and flexible for synchronizing app servers, web servers, and servers of any type. Resilio’s N-way file and folder synchronization can be bidirectional, one-to-many, many-to-one, or many-to-many (full mesh).
- Enterprise Readiness. Resilio offers an enterprise-class solution deployed in the world’s most demanding environments. Unison is maintained by at most 1 or 2 people part-time.
- Scalability to support large capacity file systems (measured in TBs and PBs) containing up to many millions of files (Resilio has validated 200M files per sync job, although this is not a hard limit). Resilio Platform 3.0 further advances system scalability and performance.
- Unlimited file sizes–any payload. Both Resilio Sync and Resilio Platform have no limits on file size. Unison will encounter errors sending files that are too large to handle.
- Turnkey WAN Optimization. Resilio Platform is WAN-optimized and versatile for use over any network, with built-in compression, delta detection, and efficient recovery from failures to minimize data transfer.
- Edge to far edge deployments for logistics, maritime, transportation, and remote operations. Resilio Platform reliably moves data over unreliable networks such as VSAT and Cell (2G, 3G, 4G, 5G) and WiFI connections.
- Easy, centralized management: Resilio Platform enables all jobs to be centrally managed and easily configured for Distribution, Sync, Consolidation, and Scripting.
- DevOps Automation: all data movement jobs can be automated, scheduled, scripted, or integrated into workflows through a complete REST API.
- Cloud capabilities. And integration with cloud storage. Resilio makes it easy connecting any S3-compatible cloud storage vendor for hybrid or cloud native deployments.
Technical considerations in a Unison file sync alternative
For larger customers or users with more extreme scale data movement requirements, some challenges with Unison and other conventional point-to-point file sync tools may include:
Large files not supported: Unison may not be able to transfer or sync files, leading to “lost connection to the server” and other errors. Resilio Platform has no limits on file sizes or types.
No real-time file change detection: Unison, Rsync, and other conventional folder comparison and file synchronization tools are not real-time. Unison could theoretically be configured to track iNotify file system notifications in Linux but Unison is not real-time nor file-change-aware out of the box. By contrast, Resilio Platform offers highly efficient, real-time file change replication for a variety of operating systems (Windows, Linux, et al) to detect and replicate changes on-the-fly in real-time.
Poor file system scalability: As file sizes and file system sizes grow into the many thousands to millions of files, Unison may bog down and reach its limits. Unison’s architecture is limited by resources within two systems (replicas) such as memory, CPU, and storage IO—as well as the indexing architecture. Larger files and larger numbers of files may not synchronize; or be limited by the time it takes to index a file system or directory, find, coalesce, and propagate changes to the replica.
WAN connections problematic: Unison is not WAN optimized. Wide-area networks (WANs) or unreliable networks (such as Cell, VSAT, et al) may incur latency and long retransmission times and varying degrees of packet loss which will degrade Unison’s transfer and file sync performance, or cause failures. By contrast, Resilio Platform includes WAN optimization. With Connect you can utilize 100% of the available bandwidth in your network independent of distance, latency, or loss. You can read more about Resilio WAN optimization here.
Sheer scalability limitations: In the Unison model, the synchronization job will always be limited to 2 replicas. While Unison supports a hub-and-spoke topology, files can not be concurrently synchronized to multiple replicas. Thus, a common approach with rsync and other basic sync tools is to “follow the sun”, executing jobs individually; once the previous job completes, a second job is started, and so forth. What was reasonably quick for one-to-one transfers becomes very slow when it has to be repeated many times, serialized in sequence.
By contrast, Resilio Platform uses a distributed, peer-to-peer approach that leverages networking between all offices/servers and significantly speeds up data transfers. Resilio’s optimized approach dramatically speeds up syncing operations: Resilio transfers concurrently to N-number of destinations. Resilio also makes efficient use of all the available network capacity that may otherwise be left unused.
Problems with firewalls, NATs, DHCP: Unison includes some basic networking capabilities. Resilio Platform makes it incredibly easy to deal with firewalls, NAT, and DHCP. Resilio Platform also includes a Proxy Server to simplify the configuration for remote users and systems administrators needing the flexibility to traverse a variety of home networks, remote offices, and on-prem firewalls and DMZs.
Data protection and encryption: While Unison supports SSH and using VPNs, the product lacks native encryption for files at rest and in transit. Resilio Platform protects and encrypts files at rest and in flight. Resilio uses AES256 in CTR mode to encrypt all the traffic sent between endpoints.
A Modern Unison File Sync Alternative: Resilio Connect
Through real-time file synchronization and other key capabilities, Resilio Connect accelerates file delivery concurrently across any network, up to 10x faster than Unison and other conventional file sync software. Resilio enables true multi-directional (N-way) file synchronization to overcome file sharing and transfer bottlenecks over WANs.
Architecturally, Resilio Platform is an agent-based solution. Resilio Agents are installed on all devices participating in data movement jobs. Job types include Distribution, Consolidation, Scripting, and Synchronization. Resilio Platform agents support popular operating systems such as Windows, Mac, Linux, FreeBSD, and Android. Connect also supports popular virtualization platforms, servers, storage, NAS devices, networks, and cloud providers.
The Resilio Platform Management Console is a centralized, web-based management system used to manage and monitor all job functions through an easy-to-administer graphical user interface. Optionally, Resilio offers a complete API set to expose and automate all functions performed by the Management Console. The Management Console may be installed on Windows and Linux servers.
Resilio Platform vs. Unison – Feature Comparison
Here is a handy summary table of the features needed in a synchronization solution today, and how Resilio Platform stacks up as a solid Unison file sync alternative.
Resilio Connect | Unison | |
Support more than 2 endpoints (replicas) | + | – |
Sync large file systems with many millions of files | + | – |
Unlimited file sizes | + | – |
Real-time file sync | + | – |
Two-way (bidirectional) sync | + | + |
One-to-many sync (concurrent) | + | – |
Many-to-one sync | + | – |
Many-to-many sync | + | – |
Compression | + | + |
Dynamic IP support | + | – |
Encryption | + | – |
WAN optimization | + | – |
NAT traversal | + | – |
Cross-platform | + | + |
Proxy Server | + | – |
S3 cloud storage support | + | – |
Large directory support | + | – |
Active-active high availability / no SPOF | + | – |
Summary
While Unison does a solid job with basic 2-way file synchronization, Resilio is enterprise-grade—keeping all of your files current and accessible to users and applications—across as many endpoints as needed. Files can be of any size and type. Distribution and file synchronization jobs may contain a few to hundreds of millions of files.
Resilio gives you peace of mind and saves countless hours of management time. Files are resilient to failures. Resilio’s peer-to-peer architecture ensures there is no single point of failure (SPOF). File backup & sync for Disaster Recovery (DR) and upgrades are easier and faster. Files are continuously protected and highly available across as many servers as needed. Moreover, you can accelerate performance on-demand. Simply add endpoints and increase bandwidth to increase performance.
The Resilio solution is also cross platform. Servers can be of any type. Physical, virtual, containerized. Running Windows, Linux, macOS, or FreeBSD. Use storage and networks you already own. Resilio Platform also supports any S3-compatible cloud storage.
We’d love to show a demo of Resilio Connect and discuss your Unison environment. Or feel free to schedule a Resilio Platform demo or start a free trial to see how much faster and easier file synchronization could be for you.