Kopia vs Borgmatic: Backup Tools Compared
Why This Comparison Matters
If you need automated, encrypted backups of your self-hosted services, Kopia and Borgmatic are two of the strongest options — but they approach the problem differently. Kopia is a standalone tool with its own deduplication engine, web UI, and repository format. Borgmatic is an automation wrapper around BorgBackup, adding scheduled execution and YAML configuration on top of Borg’s proven deduplication and encryption.
Updated February 2026: Verified with latest Docker images and configurations.
Choosing between them affects your backup infrastructure for years. Switching later means migrating all your backup data to a new repository format — not trivial when you have terabytes of history.
Feature Comparison
| Feature | Kopia | Borgmatic |
|---|---|---|
| Deduplication engine | Built-in (content-defined chunking) | BorgBackup (fixed + variable chunking) |
| Encryption | AES-256-GCM, ChaCha20-Poly1305 | AES-256-CTR + HMAC-SHA256 (via Borg) |
| Compression | zstd, gzip, s2, pgzip, deflate | lz4, zstd, zlib, lzma, none (via Borg) |
| Web UI | Yes (built-in) | No |
| CLI | Yes | Yes (wraps Borg CLI) |
| Repository backends | Local, S3, GCS, Azure, SFTP, Rclone, WebDAV | Local, SSH/SFTP (Borg native) |
| Scheduling | Built-in (server mode) | cron or systemd timer |
| Configuration | JSON policy files or web UI | YAML config file |
| Pre/post backup hooks | Yes | Yes (extensive hook support) |
| Database dumps | Via hooks (pg_dump, mysqldump) | Built-in PostgreSQL, MySQL, MariaDB, MongoDB, SQLite hooks |
| Healthchecks.io integration | Via hooks | Built-in |
| Retention policies | Per-directory policies (hourly/daily/weekly/monthly/annual) | Per-repository (keep_hourly/daily/weekly/monthly/yearly) |
| Append-only mode | Yes (server-side) | Yes (via Borg append-only) |
| Mount backups as filesystem | Yes (FUSE) | Yes (via Borg, FUSE) |
| Language | Go | Python (wrapping C/Python Borg) |
| License | Apache 2.0 | GPL v3 |
Docker Deployment
Kopia
Kopia runs as a server with a built-in web UI and scheduler. One container handles everything:
services:
kopia:
image: kopia/kopia:0.22.3
command:
- server
- start
- --insecure
- --address=0.0.0.0:51515
- --server-control-username=admin
- --server-control-password=changeme_strong_password
ports:
- "51515:51515"
environment:
KOPIA_PASSWORD: changeme_repository_password
TZ: UTC
volumes:
- kopia_config:/app/config
- kopia_cache:/app/cache
- kopia_repo:/app/repository
- /path/to/data:/data:ro
restart: unless-stopped
volumes:
kopia_config:
kopia_cache:
kopia_repo:
After starting, open http://your-server:51515, create a repository, define snapshot policies through the web UI, and Kopia handles scheduling automatically.
For remote storage (S3, SFTP), initialize the repository first:
docker exec kopia kopia repository create s3 \
--bucket=your-backup-bucket \
--access-key=YOUR_KEY \
--secret-access-key=YOUR_SECRET \
--password=changeme_repository_password
Borgmatic
Borgmatic runs as a scheduled job. The container executes backups on a cron schedule and exits:
services:
borgmatic:
image: ghcr.io/borgmatic-collective/borgmatic:2.1.2
environment:
TZ: UTC
BORG_PASSPHRASE: changeme_encryption_passphrase
volumes:
- ./borgmatic/config.yaml:/etc/borgmatic/config.yaml:ro
- borg_repo:/mnt/borg-repository
- borg_cache:/root/.cache/borg
- /path/to/data:/mnt/source:ro
restart: unless-stopped
volumes:
borg_repo:
borg_cache:
Borgmatic requires a YAML configuration file:
# borgmatic/config.yaml
source_directories:
- /mnt/source
repositories:
- path: /mnt/borg-repository
label: local
encryption_passphrase: "${BORG_PASSPHRASE}"
compression: auto,zstd
retention:
keep_hourly: 24
keep_daily: 7
keep_weekly: 4
keep_monthly: 6
hooks:
healthchecks:
ping_url: https://hc-ping.com/your-uuid-here
schedule:
- "0 3 * * *"
Initialize the repository before the first run:
docker exec borgmatic borgmatic init --encryption repokey-blake2
Cloud Storage Support
Kopia has a significant advantage here. It natively supports S3-compatible storage (AWS, MinIO, Backblaze B2, Wasabi), Google Cloud Storage, Azure Blob Storage, and any backend supported by Rclone. You configure the storage backend when creating the repository — no additional tools needed.
Borgmatic, through BorgBackup, only supports local filesystems and SSH/SFTP natively. To back up to S3 or cloud storage, you need to add Rclone as a separate mount or use borgbase.com (a hosted Borg repository service). This adds a layer of complexity Kopia avoids.
| Storage Backend | Kopia | Borgmatic (via Borg) |
|---|---|---|
| Local disk | Native | Native |
| SSH/SFTP | Native | Native |
| S3 / S3-compatible | Native | Requires Rclone mount |
| Google Cloud Storage | Native | Requires Rclone mount |
| Azure Blob | Native | Requires Rclone mount |
| Backblaze B2 | Native (S3-compatible) | Requires Rclone mount |
| WebDAV | Native | Requires Rclone mount |
| BorgBase | N/A | Native (SSH) |
Performance
Both tools use deduplication and compression, so backup size and speed depend heavily on data characteristics. General benchmarks on mixed workloads (documents, databases, media):
| Metric | Kopia | Borgmatic (Borg) |
|---|---|---|
| Initial backup speed | Fast (parallel processing) | Moderate (single-threaded by default) |
| Incremental backup speed | Fast | Fast (Borg cache accelerates) |
| Deduplication ratio | Excellent (content-defined chunking) | Excellent (comparable) |
| RAM usage during backup | 200-500 MB | 100-300 MB |
| CPU usage during backup | High (parallel, Go goroutines) | Moderate (single core, C) |
Kopia parallelizes snapshot operations across CPU cores, which makes it faster on multi-core hardware. Borg processes files sequentially by default, though newer versions support limited parallelism.
Restore Experience
Both tools support browsing and restoring individual files from any snapshot point. Kopia’s web UI lets you browse snapshots visually and restore files through the browser. Borgmatic requires CLI commands:
# Kopia - restore via CLI
kopia snapshot restore <snapshot-id> /restore/path
# Borgmatic - list archives, then extract
borgmatic list
borgmatic extract --archive latest --path /mnt/source/important-file
Both support FUSE mounting — mounting a backup archive as a read-only filesystem for browsing and selective restore.
Use Cases
Choose Kopia If…
- You want a web UI for managing backups and browsing snapshots
- You back up directly to S3, B2, GCS, or other cloud object storage
- You prefer a single self-contained tool over a wrapper + engine combo
- You want built-in scheduling without cron or systemd timers
- Parallel backup performance matters (large datasets, multi-core hardware)
- You’re starting fresh with no existing Borg repositories
Choose Borgmatic If…
- You already use BorgBackup and want to add automation
- You need built-in database dump hooks (PostgreSQL, MySQL, MongoDB, SQLite)
- You prefer YAML configuration over GUI-based management
- You back up to SSH/SFTP targets (Borg’s native transport is battle-tested)
- You use or plan to use BorgBase for managed offsite repositories
- You want the maturity and proven track record of BorgBackup’s deduplication engine
Final Verdict
For self-hosters starting fresh, Kopia is the better choice for most setups. The built-in web UI, native cloud storage support, and integrated scheduling make it a complete backup solution in a single tool. You don’t need to learn two tools (Borg + Borgmatic) or configure Rclone mounts for cloud targets.
For operators already invested in BorgBackup — or those who need Borgmatic’s database dump hooks — staying with Borgmatic makes sense. Borg’s deduplication engine is battle-proven, and Borgmatic adds the automation layer that makes it practical for daily use. The database hooks alone justify it if you run PostgreSQL or MySQL alongside your Docker stacks.
FAQ
Can I migrate from Borg/Borgmatic to Kopia?
Not directly — they use incompatible repository formats. You’d need to restore files from Borg and create new Kopia snapshots. For large repositories, this means temporarily having two copies of your backup data.
Which uses less disk space?
Both achieve comparable deduplication ratios. The difference is typically under 5% for the same dataset. Compression algorithm choice (zstd for both) matters more than the tool itself.
Can Kopia replace Borgmatic’s database hooks?
Kopia supports pre-snapshot hooks where you can run pg_dump or mysqldump scripts. It’s not as seamless as Borgmatic’s built-in database support (which handles dump file cleanup and error handling), but it works.
Is Borg more mature than Kopia?
BorgBackup has been in production use since 2015 (and its predecessor Attic since 2010). Kopia reached 1.0 stability more recently. Borg has a larger user base and more community documentation. Both are actively developed.
Related
Get self-hosting tips in your inbox
Get the Docker Compose configs, hardware picks, and setup shortcuts we don't put in articles. Weekly. No spam.
Comments