Unison (software)
{{Short description|Software that synchronizes file storage}}
{{refimprove|date=July 2021}}
{{For|the Usenet client|Unison (Usenet client)}}
{{Infobox software
| name = Unison
| logo = File:Unison Logo.png
| screenshot = 250px
| caption =
| released = {{Start date and age|1998}}{{Cite web|url=https://alliance.seas.upenn.edu/~bcpierce/wiki/index.php?n=Main.UnisonFAQGeneral|title=Unison Wiki {{pipe}} Main / UnisonFAQGeneral|website=alliance.seas.upenn.edu}}
| latest release version = {{wikidata|property|reference|P348}}
| latest release date = {{start date and age|{{wikidata|qualifier|P348|P577}}}}
| developer = Benjamin Pierce and contributors
| operating_system = Linux, macOS, Windows
| programming_language = OCaml
| genre = Synchronization
| license = GPLv3
| website = {{URL|https://github.com/bcpierce00/unison}}
}}
{{Portal|Free and open-source software}}
Unison is a file synchronization tool for Windows and various Unix-like systems (including macOS and Linux).{{Cite web|url=https://repology.org/project/unison/information|title=unison packages dissection - Repology|website=repology.org}} It allows two replicas of a collection of files and directories 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.Pierce, Benjamin C., and Jérôme Vouillon. "What's in Unison? A formal specification and reference implementation of a file synchronizer." Technical Reports (CIS) (2004): 40. https://repository.upenn.edu/cgi/viewcontent.cgi?article=1045&context=cis_reportsUppoor, Sandesh, Michail D. Flouris, and Angelos Bilas. "Cloud-based synchronization of distributed file system hierarchies." 2010 IEEE International Conference on Cluster Computing Workshops and Posters (Cluster Workshops). IEEE, 2010. https://ieeexplore.ieee.org/abstract/document/5613087{{Cite web|url=https://www.linuxjournal.com/content/file-synchronization-unison|title=File Synchronization with Unison {{pipe}} Linux Journal|work=Linux Journal |last=Diehl |first=Mike |date=April 14, 2008}}{{Cite web|url=https://www.techrepublic.com/article/how-to-use-unison-to-sync-files-on-linux-machines-across-a-network/|title=How to use Unison to sync files on Linux machines across a network|website=TechRepublic|date=29 October 2020 }} Syncing replicas directly Unison is independent of third-party providers.
Features
Features of Unison include to handle file changes on both sides of replication; conflicts (same file changed on both sides) are displayed and can be resolved manually, optionally creating backups of changed files. Unison allows synchronization via computer networks (LAN, Internet) by direct connection (socket) or tunneled via ssh.{{Cite web|url=http://www.linux-magazine.com/Issues/2020/231/Unison|title=In Sync » Linux Magazine|first=Werner|last=Hein|website=Linux Magazine}} By using the rsync algorithm only changed blocks of files have to be transferred, thus saving bandwidth.
Use
Unison can be called via the command line with parameters or controlled via profile files.{{Cite web|url=https://www.linuxjournal.com/article/7712|title=File Synchronization with Unison {{pipe}} Linux Journal|work=Linux Journal |author=Erik Inge Bolso |date=March 1, 2005}}{{Cite web|url=http://www.linux-magazine.com/Issues/2019/221/The-Kitchen-Sync|title=Command Line – unison » Linux Magazine|first=Bruce|last=Byfield|work=Linux Magazine}} It can be executed interactively or batch-controlled automatically. In batch mode, unique changes are automatically synchronized. Files with replication conflicts are skipped.
After startup, Unison checks the file inventory per directory or computer and compares the timestamps of the files. If it detects changes, the changes to the corresponding files are analyzed in more detail. Afterwards Unison creates a replication list with suggestions for their synchronization and marks conflicts that cannot be resolved automatically.
GUI versions of Unison exist for interactive use. Under Windows and Linux they are generally based on GTK+. The GUI versions allow an easier overview of the replicas and the proposed synchronization. Changes can be marked individually by keyboard or mouse and then implemented in bundles.
Advantages and disadvantages, comparison with other open-source software
Compared to rsync, Unison is fully bi-directional and allows the user to detect and reconcile conflicts when both copies of a file have been changed since the last synchronization.
Before version 2.52, a frequent hassle for users was that both computers needed to run the same version of Unison, compiled with the same version of the OCaml libraries.{{cite web | url=https://github.com/AlterDepp/unison-docker | title=Unison-docker | website=GitHub | date=3 June 2022 }} This creates problems, since, e.g., Debian Linux's APT system will not provide the ability to install an arbitrarily chosen version of the software or one compiled with any desired version of the OCaml libraries, if that is what is required by a second machine running a different operating system or packaging system. This was solved in version 2.52: both client and server can run different versions of Unison, compiled with different OCaml versions, as long as both sides are running at least version 2.52. If one end is running version 2.48 or 2.51, the other end may run any version from 2.52 but the OCaml version must match.{{cite web | url=https://github.com/bcpierce00/unison/wiki/2.52-Migration-Guide | title=2.52 Migration Guide | website=GitHub | date=25 Feb 2022 }}
Unison differs from Syncthing in several ways, the main one being that Syncthing is designed for always-on, automated synchronization, whereas Unison is designed for synchronization that is triggered and monitored by the user. Syncthing is peer-to-peer, while Unison is not.
See also
References
{{Reflist}}
External links
- [https://github.com/bcpierce00/unison Unison home page]
- [https://www.cis.upenn.edu/~bcpierce/unison/ Unison old home page]
- [https://github.com/bcpierce00/unison Unison source code]
{{DEFAULTSORT:Unison (Software)}}