iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Antihost offers Linux VPS plans with full root access, unlimited traffic on a 1 Gbps port and a 14-day free trial.
Use Unison when you need two Ubuntu directory replicas to stay synchronized, whether they are on separate disks or different computers. It handles changes made on either side, can transfer only changed portions of large files, and can keep additional versioned copies for rollback. It is not an inherently one-way or immutable backup program: a deletion accepted during synchronization can be propagated to the other replica. A safe setup therefore combines a clearly mounted destination, an explicit profile, interactive testing, and separate Unison backup versions.
What Unison does—and what it does not
Unison maintains two replicas of a directory tree. It compares the state recorded for each replica with the current files, determines which side changed, and proposes updates so both sides converge. Unlike a simple mirror, it can reconcile independent edits made on both replicas. The roots may be two paths on one Ubuntu computer, two mounted disks, or a local path and a directory reached over SSH.
The second replica improves availability after a disk failure, but it is not automatically protected from user mistakes. If you delete a file and accept that deletion, synchronization can remove the other copy. Unison’s versioned backup preferences provide rollback copies, but those copies consume additional storage and need their own protection. For immutable, deduplicated, or retention-heavy archives, a dedicated backup system may be a better primary tool; Unison is strongest when two working trees must remain consistent.
Plan the storage before installing
Use genuinely separate storage
Put the destination on a disk, host, or storage service that is independent of the source. An external hard disk is a practical high-capacity option; network-connected drives and a separate file or backup server are other choices. Keep the drive physically apart from the computer when practical. Capacity must cover the source tree, filesystem overhead, and any retained Unison versions. A destination only slightly larger than today’s data can fill quickly when maxbackups retains old copies.
#1 Best Overall
- Slim durable design to help take your important files with you
- Vast capacities up to 6TB[1] to store your photos, videos, music, important documents and more
- Back up smarter with included device management software[2] with defense against ransomware
- Help secure your important files with password protection and hardware encryption
- 3-year limited warranty
Choose a filesystem that preserves what you need
Linux filesystems generally preserve Unix ownership, modes, links, and timestamps more naturally than removable FAT variants. Ubuntu’s Unison guidance warns that VFAT and FAT32 do not work well for permission-sensitive trees. If a removable disk must use such a filesystem, set perms = 0 deliberately and understand that permission bits will not be synchronized. Do not silently discard metadata that your applications require.
Decide what belongs in the tree
Large home directories often contain caches, build products, virtual-environment downloads, and other reproducible data. Excluding those items reduces scan time, transfer volume, and the chance that a transient file creates a conflict. Keep exclusions in the profile so every run applies the same rules.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Install Unison on Ubuntu and verify compatibility
Unison is distributed in Ubuntu’s Universe repository. Ubuntu’s package listings for Noble 24.04 LTS and newer suites show packages in the 2.53 series (2026 listing). Install it with the normal package manager:
sudo apt update
sudo apt install unison
For a remote profile, install Unison on both the local and remote endpoints. The client and server versions must be compatible; check the version shipped by each Ubuntu release before connecting. A package upgrade on only one host can turn a previously working profile into a protocol or archive-compatibility problem.
Confirm the executable and version after installation:
unison -version
Do not automate the first run. Start interactively so Unison displays every create, update, and deletion and you can verify its interpretation of the two roots.
Rank #2
- 【Plug-and-Play Expandability】 With no software to install, just plug it in and the drive is ready to use in Windows(For Mac,first format the drive and select the ExFat format.
- 【Fast Data Transfers 】The external hard drives with the USB 3.0 cable to provide super fast transfer speed. The theoretical read speed is as high as 110MB/s-133MB/s, and the write speed is as high as 103MB/s.
- 【High capacity in a small enclosure 】The small, lightweight design offers up to 500GB capacity, offering ample space for storing large files, multimedia content, and backups with ease. Weighing only 0.35 Lbs, it's easy to carry "
- 【Wide Compatibility】Supports PS4 5/xbox one/Windows/Linux/Mac and other operating systems, ensuring seamless integration with game consoles,various laptops and desktops .
- Important Notes for PS/Xbox Gaming Devices: You can play last-gen games (PS4 / Xbox One) directly from an external hard drive. However, to play current-gen games (PS5 / Xbox Series X|S), you must copy them to the console's internal SSD first. The external drive is great for keeping your library on hand, but it can't run the new games.
Prepare and test a local-disk synchronization
The basic local form is:
unison /home/$USER/data /media/$USER/backup/data
Before running it against valuable data, mount the destination and perform these checks:
- Confirm the mount rather than trusting that the directory exists:
findmnt --target /media/$USER/backup. - Check capacity and inode availability with
df -h /media/$USER/backupanddf -i /media/$USER/backup. - Check ownership and access on both roots with
ls -ldand, if needed, a small read/write test. - Run Unison interactively and inspect the proposed direction of every deletion and large update.
- Create a small test file in the source, synchronize it, and verify that it appears at the destination. Only then test the reverse direction.
- Unmount the destination and confirm that a later run aborts when the mount guard described below is enabled.
The first scan can take a long time for a large tree. Keep the terminal open and treat the displayed actions as an approval screen, not as a progress formality.
Create a repeatable profile in ~/.unison
Profiles prevent a long command line from becoming an unsafe script. Create ~/.unison/large-data.prf and adjust the paths and exclusions:
# ~/.unison/large-data.prf
root = /home/alice/data
root = /media/alice/backup/data
mountpoint = /media/alice/backup
path = Documents
path = Photos
ignore = Name *.tmp
ignore = Name .cache
confirmbigdel = true
perms = 0
rsync = true
stream = true
maxthreads = 4
log = true
Run the named profile interactively with:
unison large-data
Use perms = 0 only when the destination cannot represent source permissions, such as a deliberately accepted FAT-formatted disk. Otherwise leave permission synchronization enabled. The path lines limit synchronization to selected subtrees; omit them when the entire root should be synchronized. Patterns such as ignore = Name *.tmp apply consistently on every invocation.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchPC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Why the mountpoint guard matters
Linux leaves an ordinary directory visible at a mount location when the removable disk is absent. Without a guard, Unison could treat that empty directory as the destination and copy a large local tree into the source filesystem—or propose destructive changes based on the wrong contents. The mountpoint preference tells Unison that the expected mount must really be present; if it is not, the run stops instead of using the underlying directory.
Understand the important profile preferences
| Preference | Purpose | Operational guidance |
|---|---|---|
root |
Defines each replica. A profile has two roots. | Use unambiguous absolute paths. For SSH, use the remote-root form shown below. |
path |
Restricts synchronization to named subpaths. | Use only when partial-tree synchronization is intentional. |
ignore |
Excludes matching files or directories. | Exclude caches and reproducible outputs; keep rules in the profile. |
mountpoint |
Requires a real mounted destination. | Essential for removable-drive roots. |
confirmbigdel |
Requests confirmation before whole-replica or path deletions. | Keep it enabled while learning the workflow; it is enabled by default in current Ubuntu manpage documentation. |
perms |
Controls permission synchronization. | Set to 0 only when the destination filesystem cannot represent permissions. |
rsync |
Uses rsync-style delta transfer for changed file contents. | Leave true for large files unless a documented compatibility issue requires otherwise. |
stream |
Streams file contents between endpoints. | Enable when the storage and link benefit from sequential streaming; test with your workload. |
maxthreads |
Limits concurrent transfers. | Tune for CPU, disks, and network capacity; lower it on constrained links. |
log |
Enables logging. | For unattended jobs, direct logs to a persistent location with appropriate permissions. |
Synchronize to another Ubuntu host over SSH
For a remote machine, keep the local root and replace the second root with an SSH URL:
Rank #3
- Slim durable design to help take your important files with you
- Vast capacities up to 6TB[1] to store your photos, videos, music, important documents and more
- Back up smarter with included device management software[2] with defense against ransomware
- Help secure your important files with password protection and hardware encryption
- 3-year limited warranty
root = /home/alice/data
root = ssh://backup.example:/srv/backup/alice-data
The remote account must be able to read the source-side data as presented to Unison and write to /srv/backup/alice-data. Test SSH access and directory permissions as that account before the first Unison run. Install compatible Unison versions on both hosts and use the same profile assumptions about permissions and exclusions. SSH supplies transport and authentication; it does not turn Unison’s bidirectional synchronization into a one-way backup.
Tune Unison for very large trees
Keep delta transfer enabled
With rsync = true, Unison can transfer only changed portions of a large file rather than retransmitting the entire file. This is especially useful for disk images, database exports, virtual-machine files, and other large files with small edits. It does not eliminate the initial scan or the need to read metadata across the tree.
Recommended Free Tools
Choose concurrency for the bottleneck
maxthreads controls concurrent work. More threads can improve throughput on fast local storage and high-bandwidth links, but they also increase contention for CPU, random I/O, and network bandwidth. A low-bandwidth connection often performs better with a lower value such as maxthreads = 1. Start conservatively, observe disk and network saturation, then raise the value in small steps. The default is designed for high concurrency, not for every storage device or WAN.
Use streaming where it helps
stream = true can benefit endpoints and networks that prefer sequential content transfer. Keep it in the profile only after a representative run behaves correctly; a setting that helps a remote spinning disk may not improve a busy SSD or a link already limited by latency.
Set a sensible error policy
The documented default for maxerrors is 1. Raising it can allow most of a large directory to finish when a few unrelated files fail, but an excessively high value can postpone recognition of systemic problems such as a full destination disk, broken permissions, or a failing connection. Increase it only when you have a recovery plan and monitor the log for every skipped item.
Protect Unison’s archives
Unison maintains archive and fingerprint information, normally under ~/.unison, to detect what changed since the previous run. Deleting those files casually can force a complete rescan; Ubuntu’s Noble manpage notes that rescanning may require reading gigabytes of file contents. Back up or preserve the archive directory, and do not share one archive between concurrent processes.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Rank #4
- Slim durable design to help take your important files with you
- Back up smarter with included device management software[2] with defense against ransomware
- Help secure your important files with password protection and hardware encryption
- 3-year limited warranty
Add versioned rollback copies
A synchronized replica and a rollback history solve different problems. The replica gives you a second current copy; Unison’s backup preferences retain older file versions so an accidental edit or deletion can be reversed. Example profile settings:
backup = Name *
backuploc = central
backupdir = /srv/unison-backups
maxbackups = 7
backupprefix = .unison-$VERSION-
backupsuffix = .bak
backup = Name * selects files for versioning. backuploc = central stores those versions in the directory named by backupdir, rather than beside each source file. maxbackups = 7 retains seven versions; it is a retention count, not a guarantee of seven complete copies of the whole tree. backupprefix and backupsuffix control names; the $VERSION variable is replaced by the version number.
The backupcurr preference keeps the current version as version number 000 when you need an explicit copy of the pre-update state. Central backups need sufficient free space, suitable permissions, and security controls. They may live on a different filesystem with different failure and access characteristics, so protect that location separately. Versioned backups do not stop an accepted deletion from reaching the second replica; they give you a way to recover afterward.
Make removable-drive runs fail safely
Use this preflight routine whenever the destination is a USB or other removable disk:
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problems- Mount check: run
findmnt --target /media/alice/backupand verify the expected device and filesystem. - Space check: run
df -hfor bytes anddf -ifor inodes; either can exhaust first. - Identity check: confirm the destination label or device, not merely the path name.
- Permission check: verify the account running Unison can create, modify, and delete test files.
- Interactive preview: inspect update and deletion directions with
confirmbigdelenabled. - Unmount test: remove the disk, run the profile, and confirm the
mountpointguard aborts without writing to the underlying directory.
Do not rely on a desktop file manager’s visual indication alone. A stale mount path can look normal while pointing at the source filesystem.
Schedule synchronization without overlapping jobs
Cron example
After several successful interactive runs, a cron entry can invoke the profile in batch mode:
Best Value
- No wall warts: Work freely with its bus-powered USB-C. No wall outlet required.
- Big on space: High-capacity storage to store all your files in one place.
- Reliable backup: Safeguard assignments, projects, or sensitive files with trusted performance.
- Fuss-free, clutter-free: One port, one cord, quick connect.
- Peace-of-mind: Comes with two-year limited warranty and Rescue Data Recovery Services.
*/15 * * * * /usr/bin/unison large-data -batch -logfile /var/log/unison-large-data.log
Ensure the cron account can access both roots and write the log. The destination must already be mounted; a mountpoint guard should make an absent disk a clean failure. Fifteen-minute scheduling is only an example cadence—choose one that matches how quickly your data changes and how long a run takes.
Use a systemd service and timer when ordering matters
A systemd unit is preferable when you need journal logging, resource limits, or explicit ordering after a mount unit. A minimal service might be:
[Unit]
Description=Unison large-data synchronization
After=media-alice-backup.mount
Requires=media-alice-backup.mount
[Service]
Type=oneshot
User=alice
ExecStart=/usr/bin/unison large-data -batch -logfile /var/log/unison-large-data.log
Pair it with a timer that triggers at the interval you choose. Use the actual mount-unit name generated by your system, and make sure the service cannot start a second Unison process while the first still holds the profile’s archive. Never run overlapping instances against the same archive; concurrent-access options are safe only when you can prove that no other process will touch those archives.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Restore and validate instead of assuming success
A backup is useful only when files can be restored. At a cadence appropriate to the value and change rate of the data, restore representative files into a clean directory. Compare checksums, directory structure, permissions, and timestamps. Test both recovery paths:
- Individual-file rollback: retrieve a prior version from the Unison backup location and verify that it opens correctly.
- Replica recovery: copy a representative directory from the second synchronized root into a new location, then compare it with the source using checksums and metadata inspection.
- Failure simulation: perform the test without modifying the production tree, and record the commands needed so another administrator can repeat it.
There is no universal restore-test interval prescribed by the cited Ubuntu and Unison documentation. Set one based on how often the data changes and how costly its loss would be; critical, frequently changing data deserves more frequent tests than an archival tree.
Quick Recap
Troubleshoot common failures
| Symptom | Likely cause | Corrective action |
|---|---|---|
| The run proposes copying everything again. | Archives or fingerprints were removed, a root changed, or the destination is a different filesystem. | Stop, verify both roots and the mount, and preserve ~/.unison. Allow a full rescan only when you have confirmed the paths. |
| An absent USB disk receives files in the mount directory. | The path existed but was not mounted and no guard was configured. | Stop the run, remove the accidental copy if appropriate, add mountpoint, and test with the disk unplugged. |
| Permission changes fail on the destination. | FAT/VFAT cannot represent Unix permissions, or ownership is wrong. | Use a Linux-compatible filesystem, or explicitly set perms = 0 after accepting the metadata trade-off; fix ownership for the running account. |
| SSH synchronization cannot write remotely. | The remote account lacks directory permissions, the path is wrong, or versions are incompatible. | Test SSH as the same account, verify the remote path and free space, and install compatible Unison packages. |
| Transfers overwhelm a slow link. | Too many concurrent threads or unnecessary files are included. | Lower maxthreads, consider maxthreads = 1, enable delta transfer, and exclude caches or generated outputs. |
| The destination fills during a run. | The source grew, retained versions consume space, or inode capacity is exhausted. | Check both df -h and df -i, reduce exclusions or retention intentionally, and expand storage before rerunning. |
| A scheduled run reports a locked archive. | Another Unison process is still running or a previous process ended abnormally. | Confirm no active process is using the profile, then investigate the lock; do not enable concurrent archive access blindly. |
Unison compared with one-way synchronization and backup software
| Capability | Unison | One-way synchronizer such as rsync | Dedicated backup system |
|---|---|---|---|
| Direction | Bidirectional reconciliation between two replicas. | Normally source to destination unless separately scripted. | Usually source to backup repository. |
| Independent edits | Designed to detect and reconcile updates on both sides. | Requires an explicit policy for which side wins. | Typically records source history rather than reconciling two working trees. |
| Rollback history | Available through backup preferences and retention settings. |
Not inherent; requires snapshots or extra scripts. | Often central to the product design, with retention and deduplication features. |
| Transport | Local disks or SSH-connected hosts. | Local, SSH, and other transports depending on invocation. | Varies by implementation; repositories may be local, networked, or online. |
| Deletion protection | Use confirmation and versioned backups; accepted deletions can propagate. | Requires careful deletion flags and separate snapshots. | Often provides retention policies that decouple backup history from source deletions. |
| Best fit | Two usable trees that must converge, with optional rollback copies. | Fast, intentional one-way replication. | Long-term, immutable, deduplicated, or compliance-oriented recovery. |
Operational checklist
- Install compatible Unison versions on every endpoint.
- Keep source and destination on separate, sufficiently large storage.
- Use absolute, unambiguous roots in a named profile under
~/.unison. - Configure
mountpointfor removable destinations. - Keep
confirmbigdel = trueuntil deletion behavior is familiar. - Exclude caches and reproducible outputs with profile rules.
- Leave
rsync = true; tunestreamandmaxthreadsfor the actual link. - Preserve Unison archives and do not run overlapping jobs.
- Add versioned backups when protection from accidental edits or deletions matters.
- Review logs, monitor free bytes and inodes, and perform documented restore tests.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

