Use Unison when you need two Ubuntu directory replicas to stay synchronized, whether the second replica is on another disk or a remote host over SSH. It reconciles changes made at either location, transfers only changed parts of large files when possible, and can keep separate versioned copies for rollback. It is not an inherently one-way, append-only backup program: a deletion accepted during synchronization can be propagated to the other replica. The safe setup is therefore an interactive first run, a reusable profile, a mount check for removable storage, and tested restores.
Antihost offers Linux VPS plans with full root access, unlimited traffic on a 1 Gbps port and a 14-day free trial.
What Unison does—and what it does not
Unison maintains two replicas of a directory tree. It records the state it has already synchronized, compares each root on the next run, and applies non-conflicting changes in the appropriate direction. If a file changes only on the source, the change goes to the other root; if it changes only on the destination, the destination change can go back to the source. When both sides changed the same item, Unison stops for a conflict rather than silently choosing one version.
As an Amazon Associate I earn from qualifying purchases.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Repair Windows errors before they cause bigger problems3Scan for outdated or missing drivers - takes under a minuteThat bidirectional model is useful for a desktop and an external drive, or for two Ubuntu machines used by the same project. It is also the reason a second replica is not the same thing as an immutable backup. If you delete a directory and approve that deletion, the delete can reach the other root. Unison’s versioned backup preferences, described later, create rollback copies in addition to the synchronized replica.
| Need | What Unison provides | Important qualification |
|---|---|---|
| Two locations kept current | Two-way synchronization on local disks or over SSH | Updates can travel in either direction. |
| Efficient updates to large files | Rsync-style delta transfer and optional streaming | Unison still scans metadata and maintains archive information. |
| Rollback after an accidental change | Named or central versioned backup copies | These consume additional storage and are separate from the second replica. |
| One-way, retention-heavy, immutable history | Not Unison’s primary design | A dedicated backup system may be a better fit for that requirement. |
Prepare Ubuntu and the destination storage
Install a compatible Unison package
Ubuntu distributes Unison in the Universe repository. The Ubuntu package index listing from 2026 shows 2.53-series packages for Ubuntu 24.04 LTS (Noble) and newer suites. Install it with the normal package manager:
#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
sudo apt update
sudo apt install unison
For a local synchronization, install Unison on the one computer that owns both roots. For an SSH synchronization, install a compatible Unison version on both the local and remote endpoints. The client and server do not have to be built for the same distribution, but their Unison versions must be compatible; check the package and manpage supplied by each Ubuntu release before automating the job.
Use storage that is genuinely separate
Ubuntu’s backup guidance recommends keeping backup copies somewhere separate from the computer, such as an external hard disk. Choose capacity for the source data plus any retained Unison versions, not merely the current size of the source. A network-connected drive, file server, or other machine can also serve as a second location. Physical separation matters: a drive left permanently beside the computer is still vulnerable to theft, fire, power damage, or an operator mistake that affects both devices.
- Use a Linux-compatible filesystem when ownership and permission bits matter.
- Check free blocks with
df -hand free inodes withdf -i; a disk can have free gigabytes but no inodes for a many-file tree. - Confirm that the account running Unison can read the source and write the destination.
- For a removable drive, decide the exact mount directory before writing the profile.
Choose local-disk or SSH roots
Synchronize to a mounted local disk
Mount the external disk first, then verify where Ubuntu mounted it. For example:
findmnt /media/alice/backup
df -h /media/alice/backup
df -i /media/alice/backup
The basic local invocation documented by Ubuntu is:
unison /home/$USER/data /media/$USER/backup/data
Replace both paths with the real source and destination. On the first run, Unison builds its archive and presents proposed creates, updates, and deletions. Keep this run interactive; do not add batch mode until you have confirmed that the roots and directions are correct.
Synchronize with a remote Ubuntu host over SSH
For a remote root, use an SSH URL in a profile or on the command line. A profile entry can look like this:
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 →Clear out junk files and repair common Windows errorsFree Scan →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.
root = /home/alice/data
root = ssh://backup.example:/srv/backup/alice-data
The remote account must be able to read the local data path as appropriate for the operation and write the destination directory. Configure and test ordinary SSH access first, then run Unison interactively so host-key prompts, permissions, and the proposed directions are visible. Keep compatible Unison versions at both ends; an SSH connection alone does not make incompatible archives safe.
Create a repeatable profile for a large tree
Unison reads named profiles from ~/.unison/. A profile prevents a long command line from changing between runs and keeps exclusions, transport choices, and safety settings together. Save the following as ~/.unison/large-data.prf, changing the roots and paths for your data:
root = /home/alice/data
root = /media/alice/backup/data
path = Documents
path = Photos
ignore = Name *.tmp
ignore = Name .cache
confirmbigdel = true
perms = 0
rsync = true
stream = true
maxthreads = 4
log = true
Invoke it by its profile name:
unison large-data
path entries limit synchronization to named subdirectories. Omit them when the entire root should be synchronized. The sample ignores temporary files and cache directories; add only data that is reproducible or intentionally excluded. Keep the same profile on every machine that runs the job so one invocation does not unexpectedly include files another invocation omits.
| Preference | Purpose | How to use it safely |
|---|---|---|
confirmbigdel |
Requests confirmation before whole-replica or path deletions. | Leave it enabled while learning the workflow; current Ubuntu manpage documentation enables it by default. |
perms |
Controls permission synchronization. | Use perms = 0 only when the destination filesystem cannot represent source permissions. |
rsync |
Uses rsync-like delta transfer for changed file contents. | Keep rsync = true unless a documented compatibility issue requires otherwise. |
stream |
Streams file contents between endpoints. | Set it to true when the endpoints and network benefit from streaming; verify behavior during an interactive run. |
maxthreads |
Limits concurrent file operations. | Balance CPU, disk, and link capacity; lower it for a constrained connection. |
maxerrors |
Controls how many errors can accumulate before the run stops. | The documented default is 1. A higher value can finish more of a tree, but can also postpone discovery of repeated failures such as a full disk. |
mountpoint |
Requires a path to be a mounted filesystem before proceeding. | Set it to the removable-drive mount directory so a missing drive causes an abort instead of a copy into an ordinary empty folder. |
log |
Enables logging for the profile. | Use a persistent, writable log location when scheduling the profile. |
Run the first synchronization without risking the wrong root
- Mount and identify the destination. Run
findmntand verify that the expected filesystem, device, and mount directory appear. Do not rely on an empty directory name alone. - Check capacity and access. Run
df -handdf -ion the destination. Confirm ownership and test that the Unison account can create a temporary file there. - Start the profile interactively. Use
unison large-datawithout-batch. Read each proposed create, update, and deletion, especially changes that point from the destination back to the source. - Perform a small directional test. Create a harmless test file in the source, synchronize, and verify it at the destination. Make a separate test change in the other root only if you intend to allow two-way updates, then observe the proposed direction.
- Remove the test data deliberately. Delete it only after confirming which side should receive the deletion. Keep
confirmbigdel = trueuntil the workflow is routine. - Test the mount guard. Unmount the destination, run the profile, and confirm that Unison aborts because the configured
mountpointis absent. Remount it before the real run.
This process catches the most dangerous local mistake: a disconnected USB disk leaving its former mount directory behind as a normal folder. Without a guard, Unison can treat that empty directory as the destination and create a misleading local copy on the system disk.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallTune transfers for large directories
Use delta transfer for large changed files
Unison’s transfer protocol uses rsync-like compression and delta transfer for small changes in large files. With rsync = true, changing a small region of a large file can avoid sending the entire file when the endpoints can calculate matching blocks. This does not eliminate the initial full copy, metadata scanning, or the cost of traversing millions of entries.
Choose concurrency instead of assuming maximum is best
The Ubuntu manpage describes the default thread setting as intended for high concurrency. More parallel operations can help a fast local SSD, but can make a spinning disk, a busy system, or a narrow network link slower. Set maxthreads according to the slowest part of the path. On a low-bandwidth connection, the documentation specifically notes that a value such as 1 may be beneficial. Start with a modest value such as 4 for a mixed local workload, then adjust from observed CPU, disk, and network utilization rather than increasing it blindly.
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
Stream when the path supports it
stream = true allows file contents to be streamed between endpoints. It can help when the connection and storage path favor sequential transfer. Keep it in the profile only after an interactive test confirms that the endpoint versions and transport behave as expected.
Exclude data that can be regenerated
Every excluded cache, build output, or temporary file reduces scanning and transfer work. Use stable profile rules such as ignore = Name *.tmp and ignore = Name .cache. Do not exclude irreplaceable saves, configuration, source material, or other files merely because they are large. An exclusion is a data-loss decision: Unison will not protect what the profile never synchronizes.
Protect Unison’s archive and fingerprints
Unison stores archive and fingerprint information under ~/.unison. These records let it distinguish an independent update from a change it has already propagated. Deleting a fingerprint cache can force a rescan; the Noble manpage warns that rescanning may require reading gigabytes of file contents. Do not remove archive or fingerprint files casually, and do not copy a profile to a second account while assuming the new account has the same synchronization history.
Add versioned rollback copies
A synchronized second root protects against a failed primary disk, but it can also receive an accidental deletion. Use Unison’s backup preferences when you need older file versions:
backup = Name *
backuploc = central
backupdir = /srv/unison-backups
maxbackups = 7
backupprefix = .unison-$VERSION-
backupsuffix = .bak
backup = Name * selects the files for backup. backuploc chooses local or central storage; backupdir names the central directory in the example; and maxbackups = 7 retains seven versions according to Unison’s versioning rules. The backupcurr preference can keep the current version with version number 000 when that is useful for recovery.
Central backups are not magically free or isolated. The directory needs enough capacity for retained versions, and the account needs suitable permissions. The Unison manual notes that central backups may be on a different filesystem with different security properties and available space. Treat that location as another protected data store: monitor capacity, restrict access, and include it in restore tests. Versioned copies supplement the second synchronized replica; they do not replace a separate destination.
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
Filesystem and removable-drive pitfalls
Permission-limited USB filesystems
Ubuntu’s Unison guide warns that VFAT and FAT32 USB media do not work well when Unix permissions must be preserved. Prefer a Linux-compatible filesystem for a backup disk that must retain ownership and mode bits. If the destination cannot represent those permissions and that loss is acceptable, deliberately set perms = 0 rather than letting every run produce misleading permission differences.
Missing mounts and wrong mount paths
Always verify the mount with findmnt before a manual run. Put the same path in the profile’s root and mountpoint settings. To prove the protection works, unmount the disk and run the profile; the job should stop instead of writing into the bare directory. Remount only after checking the device and filesystem shown by findmnt.
Full disks and inode exhaustion
A run that stops after many successful files may have reached a block or inode limit. Check both df -h and df -i on the destination and on the central backup directory if one is configured. Do not raise maxerrors simply to hide repeated failures. The documented default of 1 surfaces the first error quickly; increase it only when you have a reason to let independent files continue and a plan to inspect every reported failure.
Schedule synchronization only after the manual workflow is proven
Cron
The Ubuntu community guide documents cron scheduling. A simple fifteen-minute entry is:
Free tools Windows power users keep installed
One-click scans. No signup required.
*/15 * * * * /usr/bin/unison large-data -batch -logfile /var/log/unison-large-data.log
Use -batch only after interactive runs have established the correct roots, exclusions, mount guard, and deletion policy. The scheduled account must be able to read both roots, write the log, and access the SSH key or other non-interactive authentication required by a remote root. Choose a persistent log location and review it for conflicts, errors, and unexpected deletions.
Repeat mode and filesystem monitoring
Unison also supports repeat mode with a filesystem monitor. This can react to changes instead of polling on a fixed cron interval. It still needs the same mount protection and conflict policy, and it must not run at the same time as another process using the same archive.
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.
When to use a systemd service and timer
A systemd service and timer are preferable when the job must wait for a particular mount unit, have explicit resource limits, or write to the journal. Whichever scheduler you choose, enforce one active Unison process per archive. The manpage warns that archive-lock and concurrent-access settings are safe only when you can guarantee that no other instance accesses those archives.
Validate that you can restore
A successful synchronization is not proof that a usable backup exists. At a cadence based on how often the data changes and how costly loss would be, restore representative files into a clean directory.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →- Choose several file types, including a large file, a small file, a directory with nested content, and any data whose permissions or timestamps matter.
- Restore an individual file from Unison’s versioned backup copies, when those preferences are enabled, and verify that the expected older content is present.
- Restore a complete directory from the second replica into a separate test location rather than overwriting the live source.
- Compare checksums for file contents, inspect directory structure, and check permissions and timestamps where they are part of your requirements.
- Record which profile, backup location, and version you used so the procedure can be repeated after an incident.
Ubuntu’s guidance does not prescribe one universal restore-test interval. More frequently changing or more valuable data justifies more frequent tests; the useful standard is that a person can recover selected files and a whole directory without guessing how the profile was configured.
Decide whether Unison is the right layer
| Criterion | Unison | One-way synchronizer such as rsync | Dedicated backup system |
|---|---|---|---|
| Direction | Bidirectional; independent updates can be reconciled. | Usually source to destination unless custom logic is added. | Usually source to backup repository. |
| Conflict handling | Detects conflicting edits and asks for a decision. | Normally follows the chosen source and options. | Uses the backup product’s snapshot or version policy. |
| Rollback history | Optional backup, backupcurr, and retention settings. |
Requires separate snapshots, rotations, or scripts. | Usually a central retention feature, often with deduplication or immutability. |
| Transport | Local disks and SSH roots. | Local, SSH, and other transports depending on invocation. | Depends on the product and repository. |
| Large-file changes | Rsync-style deltas; concurrency and streaming are configurable. | Strong one-way transfer tooling, with its own option set. | May deduplicate or chunk data, depending on implementation. |
| Best fit | Two working replicas that both may receive edits. | A straightforward mirror where the source is authoritative. | Retention-heavy, immutable, or disaster-recovery backups. |
Choose Unison when the defining requirement is reconciling changes made independently on two replicas. Choose a one-way tool when the destination should never send updates back. Choose a dedicated backup system when immutable history, deduplication, or policy-driven retention matters more than keeping two working directories alike.
Troubleshoot common failures
The job wants to copy everything again
Check that you are running the same profile and account as before and that ~/.unison still contains the archive and fingerprint files for those roots. A deleted fingerprint cache can force a complete rescan. Verify that both root paths are spelled identically and that the destination has not been mounted at a different directory.
Unison reports permission differences on every run
Inspect the destination filesystem. VFAT and FAT32 cannot represent Unix permissions in the same way as a Linux filesystem. Move the destination to a Linux-compatible filesystem, or set perms = 0 only when preserving those bits is not required.
Recommended Free Tools
A removable-drive run stops before transferring
Confirm the drive is mounted at the path in mountpoint, then inspect findmnt output for the expected device. This is the desired failure when the mount is absent; it prevents a copy into the system disk’s empty mount directory.
Transfers are slow over a narrow link
Keep rsync = true for delta transfers, reduce maxthreads—a value of 1 is specifically suggested for low-bandwidth links—and consider whether streaming helps this endpoint pair. Exclude caches and build outputs that do not need protection.
A deletion appeared on both replicas
That is consistent with Unison’s synchronization model when the deletion was approved. Recover the previous version from configured Unison backups if available, then review confirmbigdel, the interactive prompts, and the profile’s roots before the next run. A synchronized replica alone cannot provide rollback against an accepted deletion.
Quick Recap
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.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.




