Skip to content

Kopia vs restic vs Borg vs Duplicacy: which backup tool to run

Kopia vs restic vs Borg vs Duplicacy compared on deduplication scope, repository locking, restore speed and prune cost — with a decision tree for a Linux fleet.

Choose Kopia when you want one tool that also gives you a repository server, per-user policies and a UI. Choose restic when you want a single binary talking to object storage and nothing else running. Choose Borg when a compromised client must never be able to erase history. Choose Duplicacy when many clients write to one storage target at the same time. All four do content-defined chunking and client-side encryption; the repository lock model decides the rest.

What you’ll accomplish

  • A written, defensible choice of one backup tool for one specific fleet, with the reason recorded next to it.
  • Four throwaway repositories built against the same dataset, so the comparison rests on your data rather than someone else’s benchmark.
  • Measured numbers for first backup, incremental backup, full restore and prune on each tool.
  • A verification and maintenance schedule you can hand to whoever owns the backup host.
  • End state: one tool in production, the other three test repositories deleted, and a restore drill that someone has actually run.

Prerequisites

  • A Linux host you can throw away, with at least twice the free space of your test dataset.
  • A backend both object-storage and SSH flavoured: an S3-compatible bucket (AWS S3, Backblaze B2, MinIO, Garage) plus one SSH-reachable box, because Borg does not speak S3 directly.
  • A representative dataset, ideally a real copy of production rather than a synthetic tree. Fifty to a few hundred gigabytes is enough to expose the differences.
  • Root or sudo, plus time, du and df for measurement.
  • Written against restic 0.18.x, BorgBackup 1.4.x, Kopia 0.21.x and Duplicacy CLI 3.2.x. These projects move fast: run each binary’s version subcommand first, and check --help before copying any flag from this or any other page. Borg 2.x in particular changes repository layout and command syntax.
  • A secret store that already holds infrastructure credentials. All four lose your data permanently if the repository password or key is lost.

How it works

Every one of these four splits files into variable-length chunks using content-defined chunking: a rolling hash over a sliding window picks the boundary, so inserting a byte near the front of a large file shifts one chunk instead of all of them. Each chunk is hashed, compressed, encrypted on the client, and written to the backend under a name derived from its hash. Deduplication is a side effect of that naming — two hosts that produce an identical chunk store it once, but only if they write into the same repository, with the same chunking parameters and the same key.

That shared mechanism is why feature checklists are unhelpful here. What actually separates them is three things: where the index of chunks lives and who maintains it, who must take a lock and for which operation, and what happens to unreferenced chunks when snapshots expire.

Comparison of restic, Borg, Kopia and Duplicacy repository chunking, index, locking and dedup

The matrix

resticBorgBackupKopiaDuplicacy
Repository indexPack files plus index objects in the repositoryRepository index plus a per-client local cacheIndex blobs in the repository, cache on the clientNo central index; chunks addressed by name
Lock during backupNo exclusive lockExclusive lock for every operationShared lock, or mediated by the repository serverNone
Reclaiming spaceforget --prune rewrites packsprune then compactMaintenance, quick and fullTwo-pass fossil collection
Cross-client dedupYes, in a shared repositoryNo, one writer per repositoryYes, repository or repository serverYes, many snapshot IDs into one storage
Server componentOptional REST serverborg serve over SSHOptional repository server with web UINone
EncryptionAES-256 with Poly1305, repository passwordAuthenticated encryption, repokey or keyfileAES-256-GCM or ChaCha20-Poly1305Per-chunk, optional RSA for asymmetric mode
LicensingFree and open sourceFree and open sourceFree and open sourceFree source-available CLI for personal use; commercial fleet use needs a paid licence

Kopia vs restic

This is the closest pair, and the one most people are actually deciding. Both are single Go binaries, both talk to S3 natively, both dedup across clients in one repository.

Kopia adds three things restic does not have: policies (retention, compression, exclusions) stored in the repository and inherited from global to host to path, a repository server that clients connect to instead of holding storage credentials, and a web UI. If you manage ten hosts with different retention rules, Kopia lets you express that once in the repository rather than in ten systemd unit files.

restic wins on predictability. There is less machinery, the on-disk format has been stable for a long time, and its maintenance is one command from one host. Practical rule: if the answer to “who edits the retention policy” is “an engineer editing a file in git”, pick restic. If it is “several people, some of whom will not use a terminal”, pick Kopia.

Kopia vs Borg

These two barely overlap. Borg is a client that talks to borg serve over SSH; it does not speak object storage. One writer at a time per repository, enforced with an exclusive lock, so the normal fleet layout is one repository per host.

The reason to accept that is Borg’s append-only mode. Behind an SSH forced command, a client can add archives and cannot delete them. A host that gets compromised at 3 a.m. cannot purge its own history. Kopia’s repository server gets you part of the way with per-user ACLs, but the trust boundary is a service you wrote the config for, not a two-line authorized_keys restriction.

Kopia wins on everything else: object storage, cross-host dedup, central policy, restore from a browser. Pick Borg when an auditor is going to ask what stops a compromised client from destroying backups, and you want a one-sentence answer.

Kopia vs Duplicacy

Kopia coordinates; Duplicacy avoids needing to. Duplicacy’s design uses no locks during backup at all — clients write chunks under content-addressed names, and deletion happens in a separate two-pass process that marks unreferenced chunks as fossils, then collects them only after every active snapshot ID has been seen again. Dozens of build agents can back up concurrently to one storage without contention.

The costs are real. There is no server component, so there is no central place to enforce policy or hold credentials on the clients’ behalf — every client needs storage credentials. The fossil process means space is not reclaimed on the same schedule you asked for; it is reclaimed when the collector is confident. And commercial fleet use requires a paid licence, which is a procurement conversation Kopia does not force.

Pick Duplicacy when concurrency is the binding constraint. Pick Kopia when governance is.

restic vs Borg vs Duplicacy, briefly

restic and Borg differ mostly on backend and trust model, as above. restic and Duplicacy differ on maturity of tooling versus concurrency: restic serializes prune behind an exclusive lock, so a fleet backing up around the clock needs a maintenance window, while Duplicacy does not. Borg and Duplicacy sit at opposite ends — Borg is the most restrictive concurrency model in the set and the strongest trust model; Duplicacy is the reverse.

Decision tree picking Kopia, Borg, Duplicacy or restic by policy, threat model and concurrency

Step-by-step

Run this against one dataset on one host. It takes an afternoon and it settles the argument.

  1. Fix the dataset and record its size, so every later number is comparable.
du -sh /srv/data && find /srv/data -type f | wc -l
41G	/srv/data
182451
  1. Initialize a restic repository against object storage.
export RESTIC_REPOSITORY="s3:s3.amazonaws.com/lab-backup-test/restic"
export RESTIC_PASSWORD_FILE=/root/.restic-pass
restic init
created restic repository 0a1b2c3d4e at s3:s3.amazonaws.com/lab-backup-test/restic
  1. Initialize a Borg repository over SSH. Borg needs a repository directory on a host running borg serve; there is no S3 target.
borg init --encryption=repokey-blake2 borg@backup01:/srv/borgrepo
borg info borg@backup01:/srv/borgrepo
Repository ID: 6b8f...
Encrypted: Yes (repokey BLAKE2b)
All archives: 0 B  0 B  0 B
  1. Create and connect a Kopia repository on the same bucket, different prefix.
kopia repository create s3 \
  --bucket=lab-backup-test \
  --prefix=kopia/ \
  --password-file=/root/.kopia-pass
Connected to repository.
NOTICE: Kopia will check for updates on GitHub every 7 days.
  1. Initialize Duplicacy from inside the directory it will back up. Duplicacy keeps its config in a .duplicacy directory at the root of the backed-up tree.
cd /srv/data && duplicacy init web01 s3://lab-backup-test/duplicacy
/srv/data will be backed up to s3://lab-backup-test/duplicacy with id web01
  1. Run the first backup on each and time it. Do them one at a time so they are not competing for bandwidth.
time restic backup /srv/data
time borg create --stats borg@backup01:/srv/borgrepo::web01-{now} /srv/data
time kopia snapshot create /srv/data
cd /srv/data && time duplicacy backup -stats
processed 182451 files, 41.918 GiB in 6:12
snapshot 7f3c9a11 saved
  1. Change roughly two percent of the data, then run every tool again. The second number is the one that matters — it is what you will pay for nightly.
restic backup /srv/data --tag second
Files:        4102 new,  1847 changed, 176502 unmodified
Added to the repository: 912.402 MiB (804.117 MiB stored)
snapshot b21e7c04 saved
  1. Restore each repository to an empty directory and time it. Restore is the operation you will do under pressure, so measure it properly rather than trusting the backup number.
restic restore latest --target /restore/restic
kopia snapshot restore <snapshot-id> /restore/kopia
borg extract --strip-components 2 borg@backup01:/srv/borgrepo::web01-2026-09-03T21:04:11
cd /srv/data && duplicacy restore -r 1 -stats
restoring <Snapshot 7f3c9a11> to /restore/restic
Summary: Restored 182451 files, 0 dirs, 41.918 GiB in 0:00
  1. Prune each repository to a short retention and time that too. This is where the four diverge most sharply against object storage, because pruning rewrites or deletes objects.
restic forget --keep-daily 7 --keep-weekly 4 --prune
borg prune --keep-daily=7 --keep-weekly=4 borg@backup01:/srv/borgrepo
borg compact borg@backup01:/srv/borgrepo
kopia policy set --global --keep-daily 7 --keep-weekly 4
kopia maintenance run --full
cd /srv/data && duplicacy prune -keep 0:180 -keep 7:30 -keep 1:7
[0:00] 100.00%  4 / 4 files deleted
remaining size: 33.104 GiB
  1. Interrupt a run deliberately. Start a backup, kill it partway, and try to start the next one. restic and Kopia leave a partial set of chunks that the next run reuses. Borg leaves an exclusive lock that blocks the next operation until you clear it. Duplicacy leaves orphaned chunks that a later exhaustive prune reclaims. Record which of those behaviours your on-call rotation can live with at 4 a.m.

Validate it works

A backup that has never been read is a hypothesis. Verify at two levels: structure, which is cheap, and data, which is expensive and should be sampled.

restic check --read-data-subset=1/10
load indexes
check all packs
check snapshots, trees and blobs
read group #1 of 512 data packs (~10.0% of the data)
no errors were found
borg check --verify-data borg@backup01:/srv/borgrepo; echo "exit=$?"
exit=0

Borg’s success signal is silence plus exit status zero. Any output from borg check is a finding.

kopia snapshot verify --verify-files-percent=10
Processed 8412 objects.
Finished verifying 182451 files, found 0 errors.
cd /srv/data && duplicacy check -chunks
Storage set to s3://lab-backup-test/duplicacy
All chunks referenced by snapshot web01 at revision 1 exist

Then do the thing none of those four commands do: restore a specific file to a scratch path and diff it against the original. Checksums inside the repository prove the repository is internally consistent; they do not prove the file you need is the file you thought you were backing up.

Troubleshooting

A killed run leaves the repository locked. Borg is the loudest about this: the next command fails with Failed to create/acquire the lock, and borg break-lock clears it once you have confirmed on the client host that no backup process is still running. restic only locks exclusively during prune and some checks; when it does, the error message names the single subcommand that clears it. Kopia’s incomplete snapshots show up in kopia snapshot list and are cleaned by full maintenance. Never clear a lock on a schedule or from a cron job — you will eventually clear one that a live prune was holding, and that can corrupt the repository.

Prune costs more than you budgeted. Pruning object storage is not free: restic rewrites partially referenced pack files, which means downloading, repacking and re-uploading. On a large shared repository that runs for hours and generates real request and egress volume. Prune weekly rather than nightly, from one dedicated maintenance host, and split an enormous repository into per-environment repositories. Borg’s equivalent trap is that borg prune alone does not free space on the 1.2 and later series — you also have to run borg compact, and teams that skip it wonder why disk usage never drops.

The repository password or key is gone. There is no recovery path in any of the four. Export and store the material out of band on day one: borg key export --paper produces a printable copy, and restic supports multiple keys per repository via restic key add, so you can hold an operator key and a break-glass key separately. For Kopia and Duplicacy, put the repository password in the same secret store as your other infrastructure credentials and test retrieving it from a host that is not the backup host.

Dedup is not working across clients. The usual cause is structural rather than a bug. Separate repositories never dedup against each other, even in the same bucket under different prefixes. In Borg this is by design. In restic and Kopia, check that every client points at the same repository URL and was initialized with the same key rather than each host running its own init. In Duplicacy, clients must share one storage with distinct snapshot IDs, not one storage per host.

Kopia clients run their own maintenance. In a repository-server deployment, maintenance ownership belongs to one identity. When individual clients run maintenance, you get stuck maintenance state and contention across the fleet. Set the maintenance owner explicitly and confirm it with kopia maintenance info. See Kopia repository server multi-tenant deploy for the layout that avoids this.

When this is the wrong approach

All four are file-level backup tools. They walk a filesystem, read files, and store chunks. That is the wrong shape of tool in several common cases.

If the thing you are protecting is a database, take a database-native backup. A file-level copy of a running MySQL or PostgreSQL data directory is crash-consistent at best and quietly unrestorable at worst. Use the engine’s own mechanism and back up the resulting artifact.

If your recovery objective is “the whole machine back in twenty minutes”, none of these are the right primary tool. Restoring 41 GB of small files from object storage takes far longer than rolling back a hypervisor or block-storage snapshot. Use provider-native snapshots for whole-machine recovery and one of these four for the file-level history that snapshots cannot give you cheaply. The trade-offs are laid out in snapshot vs file-level backup.

If your workload lives in a managed service, the provider’s own backup and point-in-time recovery is usually faster to restore and cheaper to operate than pulling data out nightly into a self-hosted repository. Add an independent export only where you need protection from the provider account itself being lost.

Official references worth keeping open while you run the evaluation: the restic documentation and the Kopia documentation.

If this is the kind of work you’d rather never own again, it’s the daily job of Managed Cloud Ops — book an infrastructure review.