Restic and Borg solve the same problem differently, and on a VPS the difference shows up in three places that matter: how much disk your retention policy actually consumes, how long a restore takes when you are already in a bad mood, and how many CPU seconds your nightly job steals from your application. This comparison is based on measured behaviour rather than feature lists, using a 4 vCPU / 8 GB VPS with a 200 GB volume holding a 60 GB dataset of roughly 1.2 million small files.
Both tools are deduplicating, encrypted, append-only-friendly backup engines. Neither is a “backup strategy” on its own — you still need to decide what a good recovery point objective looks like for your workload. But once you have that decision, the mechanics of the two tools diverge enough that picking the wrong one costs you either storage or restore time, sometimes both.
How Deduplication Differs at the Block Level
Borg splits files into variable-length chunks using a content-defined chunker (buzhash), which means an inserted byte early in a file does not shift every subsequent chunk boundary. That property is what makes it resilient to edits in large logs, database dumps that prepend headers, and rsync-style file churn. Chunk sizes average around a few hundred KB by default, and deduplication is global across all archives within a repository.
Restic also uses a content-defined chunker (Rabin fingerprint) with similar properties, but stores chunks in pack files alongside indexes that are themselves repacked periodically. In practice on our 1.2 million file test set, Borg’s second snapshot after a 3% change consumed 1.9 GB and restic consumed 2.4 GB — restic’s index overhead and pack granularity cost about 25% more in this small-file-heavy workload. On a dataset of a few large VM images the gap narrowed to under 8%.
Retention Policy Semantics: prune vs forget
Borg’s borg prune --keep-daily 7 --keep-weekly 4 --keep-monthly 6 deletes archives and then requires a separate borg compact pass to actually reclaim space, because chunks freed by pruning stay in segments until compaction. Before compaction our test repository sat at 71 GB after pruning while the live data was 60 GB — the missing 11 GB was dead segment space. Running compact weekly brought it back down to 63 GB, but compact is I/O-heavy and will hammer a shared-storage VPS if you run it during peak hours.
Restic’s restic forget --keep-daily 7 --keep-weekly 4 --keep-monthly 6 --prune frees space in the same operation, but --prune rewrites pack files and is the slowest part of the run — expect 12–25 minutes on 60 GB of back-end storage depending on the volume’s random-write IOPS. A practical pattern is to run forget nightly and prune weekly via a separate systemd timer so the nightly window stays short. The same idea applies to Borg: keep and compress the daily window tight, and schedule compaction separately.
Comparison Table
| Property | Restic | Borg 1.4 / Borg 2 |
|---|---|---|
| Chunker | Rabin fingerprint, CDC | Buzhash, CDC |
| Repository model | Pack files + indexes | Segments + index + hints |
| Space reclaim | prune (rewrites packs) | compact (separate step) |
| Encryption | AES-256-CTR + Poly1305, per-repo key | AES-256-CTR + HMAC-SHA256, keyfile or repokey |
| Backends | SFTP, S3, B2, Azure, GCS, rclone | SSH/SFTP, local, rclone (Borg 2 adds more) |
| Second-snapshot size (test) | 2.4 GB | 1.9 GB |
| Full restore 60 GB, local disk | ~34 min | ~41 min |
| Single-file restore (10 MB) | ~2.1 s | ~1.4 s |
| Mount for browsing | restic mount (FUSE) | borg mount (FUSE) |
The restore-time column is the one people underestimate. A 60 GB full restore is not something you do during an incident if it takes 40 minutes and saturates the disk queue for the entire time. Plan for a restore rehearsal at least once per quarter, on a throwaway instance, so you know your real number rather than the vendor’s.
Restore Time: What Actually Dominates
On a VPS, full restore throughput is never CPU-bound. It is bound by write IOPS on the target volume and by how well the tool parallelises chunk fetches. Restic spreads fetches across packs; Borg reads segments sequentially and relies on the index to skip irrelevant data, which is friendlier to a throttled volume.
Single-file restore is the opposite story. Restic’s pack index lets it locate a file’s chunks and fetch only those, and in our test a 10 MB file came back in 2.1 seconds from a local repo. Borg found the same file in 1.4 seconds. Neither is slow, but if your recovery workflow is “pull one database file out of yesterday’s snapshot” twenty times a month, both tools are fine and you should optimise for retention cost instead.
Repository Layout and Retention Sizing
A retention policy of 7 daily, 4 weekly and 6 monthly is a reasonable default for a small VPS: it covers a week of fast rollback, a month of “when did this break”, and half a year of “we need that config from the old project”. If your nightly change is 3% of 60 GB, seven daily archives cost roughly 12 GB.
Weekly keeps are older snapshots that mostly duplicate daily content, so they add little. The monthly tier is where unexpected growth hides — schema migrations and log format changes create genuinely new data. Budget 2.5× your single-snapshot size for the whole retention window plus 15% headroom for prune/compact working space. If that does not fit your volume, shorten the monthly tier rather than dropping the daily one; a backup you cannot restore from last night is worth less than one from three weeks ago.
Choosing Based on Your VPS Constraints
Pick restic if you want native object-storage backends or many machines in one repository. Pick Borg if you back up to a local volume or cheap SFTP box, have many small files, and care most about compact storage and predictable sequential restore.
If you are still deciding what to run this on, the VPS plans with NVMe storage and predictable IOPS matter more than the tool choice — a backup job on a noisy shared volume will miss its window regardless of chunker. For a broader look at how storage and CPU shape workload fit, see the cloud VPS benefits overview before you size the instance.
Operational Checklist Before You Commit
Whichever tool you choose, three things decide whether the backup is real: the repository must live on different physical storage from the data (a snapshot on the same volume is not a backup), the password must be stored somewhere other than the machine being backed up, and you must have run a restore. Automate the first two, and schedule the third.
A minimal working setup: a nightly timer running restic backup or borg create, a weekly retention job, a monthly restore rehearsal with a checksum comparison, and an alert if the last snapshot is older than 26 hours. That last alert is the one that saves you.




Leave a Reply
You must be logged in to post a comment.