On this page
Overview
Restic and BorgBackup are incremental backup tools featuring client-side deduplication. Restic is written in Go and focuses on direct cloud provider integration. BorgBackup (Borg) is written in Python and C, optimized for SSH-based and local storage operations.
| Parameter | Restic | BorgBackup |
|---|---|---|
| Language | Go | Python / C |
| Compression | ZSTD (since v0.14) | LZ4, ZSTD, Zlib |
| Cloud (S3, B2, Azure) | Native support | Via rclone or SSH |
| Deduplication | Content-defined | Content-defined |
| Distribution | Static binary | Python dependencies |
Performance
BorgBackup shows higher data processing speeds due to mature compression algorithms and efficient local index caching. In datasets exceeding 1 TB, Borg consumes less RAM (approx. 10-20 MB per 1 GB of data), while Restic may require up to 1 GB of RAM per 1 TB of indexed data depending on chunk size. Restic is generally slower with remote repositories due to HTTP/S3 protocol overhead compared to Borg's binary protocol over SSH.
Configuration & complexity
Restic is distributed as a single executable with no dependencies. Initializing an S3 repo: restic -r s3:s3.amazonaws.com/bucket init. Borg requires a Python environment. For remote operations, Borg must be installed on both the client and server sides; this complicates deployment but enhances security and speed by allowing server-side data processing.
When to choose what
- Restic: Backing up directly to AWS S3, Google Cloud Storage, or Backblaze B2 without intermediate servers. Best for ephemeral containers and Kubernetes.
- BorgBackup: Storing backups on dedicated servers or NAS via SSH. Essential when storage space efficiency (via ZSTD) and recovery speed are critical.
Cost / licensing
Both projects are open-source: Restic uses BSD 2-clause, BorgBackup uses BSD 3-clause. Usage is free; costs are limited to storage fees and network egress when using cloud providers.
Ecosystem & integrations
Restic users often rely on autorestic or resticprofile for YAML-based configuration management. borgmatic is the industry standard for Borg, automating database backups and monitoring. The Vorta GUI is primarily available for Borg.
Verdict
Choose Restic if your infrastructure relies on cloud object storage and you need the simplest deployment possible. Choose BorgBackup for traditional server environments where data storage density and SSH performance are the priorities.
Performance and resources
Resource consumption differs noticeably once repositories grow beyond a few hundred gigabytes or millions of small files. BorgBackup keeps a tightly packed local chunk index written in C, which keeps RAM usage predictable on memory-constrained VPS instances and NAS boxes. Restic relies on Go's garbage collector and loads index metadata into memory during backup, check, and prune runs; on large file trees, setting GOGC=20 reduces peak memory spikes at the cost of slightly higher CPU usage.
Network and disk I/O patterns also diverge:
- BorgBackup: Streams data over a persistent SSH connection to a remote
borg serveprocess. Because the server handles repository locking and pack management locally, round-trip latency stays low even when scanning millions of unchanged files. - Restic: Reads and writes immutable pack files directly over HTTP/S3 or SFTP. High-latency links or object stores with strict API rate limits slow down metadata-heavy operations like
restic prune, though parallel downloads keep restore throughput competitive.
If you want to see how these behaviors translate into real-world transfer times and cloud storage bills, review Restic vs Borg: Our Hard Data on Backup Performance & Costs.
When to choose Restic
Restic fits environments where operational simplicity and direct object-storage integration matter more than squeezing out every megabyte of RAM.
- Cloud-native and S3-compatible targets: Ideal for backing up directly to AWS S3, Backblaze B2, Cloudflare R2, or MinIO without maintaining an intermediate backup VM.
- Multi-host shared repositories: Multiple servers can write concurrently to the same repository using lock-free or non-exclusive locks, enabling cross-machine deduplication across identical container images or OS base files.
- Cross-platform fleets: Ships as a standalone binary for Linux, macOS, Windows, and BSD, avoiding Python runtime mismatches across mixed hosts.
- Ransomware-resilient retention: Pairs cleanly with S3 Object Lock so compromised clients can append new snapshots without deleting or overwriting older ones.
When to choose BorgBackup
BorgBackup excels when you control both ends of the connection and want maximum storage efficiency on dedicated hardware.
- Dedicated backup servers and home labs: Works best over SSH to a Linux storage server, ZFS pool, or NAS where you can install the matching Borg binary.
- Low-RAM systems with huge file counts: Handles millions of small files (such as maildirs or source code trees) without triggering out-of-memory kills on small virtual machines.
- Append-only SSH setups: Restricting the remote SSH key via
borg serve --append-onlyprevents a compromised client from purging existing archives, leaving pruning to a scheduled server-side cron job.
Migrating between them
Restic and BorgBackup use incompatible repository formats and encryption schemes, so direct in-place conversion is not supported. Migrating requires re-reading the source data or staging snapshots through a temporary filesystem.
- Initialize the new repository: Set up the target repo with your chosen compression setting (for example,
restic initorborg init --encryption=repokey-blake2) and run a fresh baseline backup from your live production data. - Verify integrity before cutover: Run
restic check --read-data-subset=5%orborg checkand perform a test restore into a scratch directory. - Migrate historical snapshots (optional): If you must preserve older point-in-time states, mount the legacy repository with
borg mountorrestic mountand ingest each snapshot sequentially into the new tool, passing explicit timestamps (--timein Restic,--timestampin Borg) to keep retention policies accurate. - Retire the old repo gradually: Keep the legacy repository read-only until its oldest required retention window expires rather than deleting it immediately.
To weigh the storage overhead of keeping dual repositories during a transition, check Restic vs Borg: Our Hard Data on Backup Performance & Costs.
FAQ
Can I run BorgBackup directly against an S3 bucket using rclone mount?
While technically possible, mounting S3 via FUSE for Borg is risky. Network hiccups during a write can leave behind corrupted locks or incomplete segments, and Borg's repository structure generates heavy random-read overhead over object storage. Use Restic if S3 is your primary target.
Why does my Borg repository stay the same size after running borg prune?
borg prune only removes archive references from the repository index. You must run borg compact afterward to reclaim unused space from segment files, whereas restic forget --prune reclaims space in a single workflow.
Do both tools support mounting backups to browse individual files?
Yes. Both restic mount and borg mount expose snapshots as a browsable FUSE filesystem on Linux and macOS, letting you copy out single files with standard utilities. On Windows, Restic users rely on restic restore --include or restic dump instead.