restic vs Borg vs Kopia: which backup tool for a Linux server
restic and Kopia write straight to S3-compatible storage; Borg 1.4 needs a second server running Borg over SSH, and the Borg 2 beta that adds S3 is not for production. All three deduplicate and encrypt on the server, and all three can compress. Choose restic for one server to a bucket with every step in your own script, Kopia when several servers share a repository or you want Object Lock handled for you, and Borg when you already run an SSH backup server or want it to pull.
Versions and status in October 2026
The current releases are restic 0.19.1 (July 2026), Borg 1.4.5 (July 2026) and Kopia 0.23.1 (June 2026). Borg 2.0 is in beta, at 2.0.0b25 (September 2026), and its README says: "DO NOT USE BORG2 FOR YOUR PRODUCTION BACKUPS!" Everything below about Borg means 1.4 unless it says otherwise. All three are open source and free; you pay only for storage.
Full guides: restic and BorgBackup; for a web UI with point-and-click restores, Duplicati.
Side by side
| Feature | restic | Borg | Kopia |
|---|---|---|---|
| Licence, language | BSD 2-Clause; Go, one binary | BSD 3-Clause; Python, with C/Cython for the speed-critical parts | Apache 2.0; Go, one binary |
| Where it stores backups | Local disk, SFTP, its REST server, Amazon S3 and S3-compatible, Backblaze B2, Azure Blob, Google Cloud Storage, OpenStack Swift, anything rclone reaches | A local or mounted directory, or a server running borg serve over SSH. The 2.0 beta adds SFTP, rclone, S3 and B2 | Local disk, S3 and S3-compatible, Azure Blob, Backblaze B2, Google Cloud Storage, SFTP, WebDAV, its Repository Server. Google Drive and rclone are marked experimental |
| Encryption | Always on: AES-256 in counter mode, authenticated with Poly1305-AES | repokey and keyfile modes: AES-256 in counter mode with HMAC-SHA256 or BLAKE2b. Unencrypted authenticated and none modes exist. The 2.0 beta moves to AES-256-OCB or ChaCha20-Poly1305 | Always on: AES256-GCM-HMAC-SHA256 by default, or CHACHA20-POLY1305-HMAC-SHA256 |
| Keys and passwords | Key files in the repository, each unlocked by a password through scrypt. Add more with restic key add | Key in the repository (repokey) or on the client (keyfile), protected by a passphrase. Back it up with borg key export | One password per repository, turned into a key with scrypt. The Repository Server adds per-user logins that never see the storage keys |
| Deduplication | Content-defined chunks of 512 KiB to 8 MiB (about 1 MiB on average), across the repository | Content-defined chunks (buzhash), within one repository | Content-defined chunks (DYNAMIC-4M-BUZHASH splitter by default), across the repository |
| Compression | zstd since 0.14.0 (repository format 2): auto by default, also off, fastest, better, max | lz4 by default; zstd, zlib, lzma or auto | Off for file data until a policy sets it (zstd, s2, pgzip, gzip, deflate); metadata uses zstd-fastest |
| Deletion protection | Append-only through rest-server --append-only or rclone serve restic --append-only. Can write to S3 buckets with Object Lock enabled (since 0.13.0) but sets no retention itself | borg serve --append-only per SSH key. The 2.0 beta replaces it with borg serve --permissions no-delete | Sets and renews Object Lock retention itself on S3, Azure and Google Cloud Storage. Repository Server rules can give clients APPEND access (read and write, no delete) |
| Several servers, one repository | Yes: designed for parallel access and writes. prune locks the repository, and backups cannot finish meanwhile | One writer at a time (repository-wide lock). The FAQ advises against sharing for security reasons and suggests one repository per client | Yes: any number of machines, even at the same time. One user@host is the maintenance owner |
| Memory (as documented) | No general figure. Temporary space, and on some backends memory, grows with pack size (16 MiB by default) times backend connections plus one (5 connections on most backends) | The FAQ: very large datasets need enough RAM for the repository index, chunks cache and files cache | The FAQ: compression and parallelism drive it; fewer parallel file reads use less |
| Restore and browse | restore with include and exclude filters, dump for one file, mount (FUSE) | extract into the current directory, export-tar, mount (FUSE) | snapshot restore to a folder or a .zip or .tar.gz archive, mount (FUSE on Linux), KopiaUI |
| Cleanup and checks | You schedule forget --prune and check | You schedule prune, then compact (since 1.2), and check | Retention runs after each snapshot; quick and full maintenance run by themselves on the owner; snapshot verify reads data back |
| Interface | Command line | Command line | Command line, KopiaUI desktop app, web UI in server mode |
This page quotes no speed numbers, because speed depends on your files, CPU and storage. If it matters, back up a copy of your own data with each tool and time it.
Retention: the same flag gives different results
restic and Borg count periods that contain a backup. Kopia counts periods back from the newest snapshot. The difference shows when backups pause. A server backs up nightly at 02:30, is switched off from 3 to 9 October, and backs up again on 10 and 11 October. After the 11 October run, a keep-daily 7 rule on its own keeps:
| Rule | Daily snapshots kept | Why |
|---|---|---|
restic forget --keep-daily 7 | 11, 10, 2 and 1 October; 30, 29 and 28 September | The 7 most recent days that have a snapshot |
Borg prune --keep-daily 7 | The same 7 | Days without backups do not count |
Kopia --keep-daily=7 | 11 and 10 October | Only snapshots from the 7 days before the newest one (after 4 October, 02:30) qualify |
In Kopia, the others survive only if another rule keeps them. Its default --keep-latest of 10 would keep all of them here, so set keep-latest to the number of recent snapshots you never want to lose. Preview any policy change first with restic forget --dry-run, borg prune --dry-run --list or kopia snapshot expire --all. More on choosing numbers in backup retention policies.
The same job in each tool
| Task | restic | Borg 1.4 | Kopia |
|---|---|---|---|
| Create a repository | restic init | borg init --encryption=repokey | kopia repository create s3 --bucket=my-backups |
| Back up | restic backup /etc /var/www | borg create ::'{hostname}-{now}' /etc /var/www | kopia snapshot create /etc /var/www |
| List backups | restic snapshots | borg list | kopia snapshot list --all |
| Restore a folder | restic restore latest --target /srv/restore --include /var/www | borg extract ::<archive> var/www (into the current directory) | kopia snapshot restore /var/www /srv/restore/www |
| Apply retention | restic forget --keep-daily 7 --prune | borg prune --keep-daily 7, then borg compact | kopia policy set --global --keep-daily=7 (applied after each snapshot) |
| Read data back | restic check --read-data-subset=5% | borg check --verify-data | kopia snapshot verify --verify-files-percent=5 |
| Browse | restic mount /mnt/restic | borg mount ::<archive> /mnt/borg | kopia mount all /mnt/kopia |
Each tool reads its repository location and credentials from environment variables or a connection file; the linked guides set those up. A nightly run with seven daily backups kept, in each tool:
# restic
restic backup /etc /var/www
restic forget --keep-daily 7 --prune
# Borg 1.4
borg create ::'{hostname}-{now}' /etc /var/www
borg prune --keep-daily 7
borg compact
# Kopia (the policy is set once and applied after each snapshot)
kopia policy set --global --keep-daily=7
kopia snapshot create /etc /var/wwwWhich one for your setup
One VPS backing up to S3-compatible storage. restic or Kopia; both write to the bucket directly with nothing else running. restic keeps every step in your own script (backup, then forget --prune, then check) and compresses by default. Kopia keeps the policy in the repository, applies it after each snapshot and runs maintenance itself, but leaves file compression off until you set it. Borg 1.4 would need a second server.
Many servers into one repository. Kopia. Its docs describe any number of machines writing at once with one maintenance owner, and its Repository Server lets clients log in with a username and password without holding the storage keys. restic also handles parallel backups, but every server then holds the repository password and a key that can delete, and prune holds up every backup while it runs. Borg's FAQ advises one repository per client.
A backup server that starts the backups over SSH. Borg first. Its docs include a pull-mode guide with three methods: mount the client with SSHFS, tunnel borg serve through socat, or forward an SSH agent. restic's docs show a close equivalent: the backup host runs rest-server and opens an SSH session to the server with a reverse tunnel (ssh -R), and restic on the server backs up through it, so the repository server is never exposed. Kopia's docs have no pull-mode guide. If push is fine, all three can keep the repository on a backup server: Borg with borg serve, restic with rest-server, Kopia with SFTP or its Repository Server.
Ransomware-resistant. The server being backed up must not be able to delete its own backups. Kopia does it inside the bucket: create the repository with --retention-mode COMPLIANCE --retention-period 30d in a bucket with Object Lock enabled, then run kopia maintenance set --extend-object-locks true. With restic, run rest-server with --append-only on another machine and run forget with --keep-within from a trusted one, as restic's docs advise. With Borg 1.4, give the server an --append-only key and prune and compact only from an admin key. See protecting backups from ransomware.
What none of them do
- Copy a live database consistently. They read files as they find them, and a database's files mid-write may not restore. Dump first with pg_dump, mysqldump, mongodump or SQLite's backup command, then back up the dump.
- Report a run that never happened. restic and Borg report through exit codes, and Kopia can send notifications after snapshots (
kopia notification profile), but none can tell you about a run that never started because the server was down or the timer was off. Watch from outside: backup failure alerts. - Prove a restore works.
restic check,borg check --verify-dataandkopia snapshot verifyshow the data is intact, not that your application comes back. Schedule test restores. - Recover a lost password or key. Each repository is unreadable without it. Store it away from the server.
- Keep a second copy on their own. One repository is one copy. For 3-2-1,
restic copyandkopia repository sync-towrite a second repository; the Borg FAQ allows copying a repository with a tool like rsync or rclone while no backup runs, but warns never to use the copy and the original as two live repositories.
Frequently asked questions
- Is restic better than Borg?
- Neither wins everywhere. restic writes straight to S3-compatible storage and lets several servers back up to one repository at once. Borg 1.4 needs a server running Borg over SSH and allows one writer at a time, but has documented append-only and pull-mode setups.
- Can Borg back up to S3?
- Not Borg 1.4, the stable series. The Borg 2 beta adds s3: and b2: repository URLs, but its README says not to use Borg 2 for production backups. For a bucket today, use restic or Kopia.
- Which of restic, Borg and Kopia compresses by default?
- restic (zstd,
auto) and Borg (lz4). Kopia compresses only metadata until a policy turns compression on, for example--compression=zstd. - Is Kopia stable enough for servers?
- Its releases are numbered 0.x (0.23.1 in June 2026), as are restic's (0.19.1). Kopia's docs mark native Google Drive and rclone storage experimental; S3, SFTP and filesystem repositories carry no such label. Scheduled test restores tell you more than version numbers.
- Can these tools back up a running database?
- Not safely by copying its files. Dump the database first (pg_dump, mysqldump, mongodump) and back up the dump file.
How this was checked
Commands, limits and prices were checked against these official pages, on October 4, 2026:
- restic documentation: Preparing a new repository (backends)
- restic documentation: Tuning parameters (compression, pack size)
- restic documentation: Restoring from backup
- restic documentation: Removing snapshots (append-only security)
- restic documentation: References (design: chunking, crypto, locks)
- restic 0.19.1 release and changelog
- restic rest-server (append-only mode)
- Borg documentation: FAQ
- Borg documentation: borg init (encryption modes)
- Borg documentation: borg serve
- Borg documentation: borg prune
- Borg documentation: Backing up in pull mode
- Borg documentation: Security internals
- Borg 1.4.5 release (GitHub)
- Borg 2.0.0b25 README (beta status)
- Borg 2 documentation: repository URLs
- Borg 2 documentation: borg serve --permissions
- Borg 2 change log
- Kopia documentation: Repositories
- Kopia documentation: Getting Started Guide
- Kopia documentation: FAQs
- Kopia documentation: Ransomware protection
- Kopia documentation: Repository Server
- Kopia documentation: Maintenance
- Kopia v0.23.1 release (GitHub)
- Kopia source at v0.23.1: retention policy and defaults