Restic vs Borg is closer than it looks, and one default setting decides which tool comes out ahead. We backed up 1.21 GB of server files with Restic and BorgBackup, then restored, checked and pruned both. Out of the box, Borg’s repository came out 41% larger than Restic’s. Add one compression flag to Borg and its repository came out 3% smaller instead.
This Restic vs Borg guide gives you the numbers, the tests behind them and a clear pick for each situation. Every test ran on one virtual machine with 2 CPU cores and 8 GB of RAM. We used Restic 0.20.0 and Borg 1.4.5. The results describe that machine and that data. Treat them as a method you can repeat, not a universal ranking.
📖 Setting up Restic first?
Read our Restic backup guide for a dedicated server to set up the repository, the script and the timer.
Restic vs Borg: Which One Fits Your Server?
Pick Restic if you back up to cloud storage or if several servers write to one repository. Pick Borg if one backup server reaches your machines over SSH. Borg also gives the smallest repository and the lowest memory use. Both are free, and both restored our data without a single difference.
Restic vs Borg: which one fits your situation
| Situation | Pick | Reason |
|---|---|---|
| Backups go to S3-compatible or cloud storage | Restic | It writes to many backends directly |
| Several servers share one repository | Restic | Parallel writers are supported |
| One backup server over SSH | Borg | Smallest repository with zstd |
| Little RAM or CPU to spare | Borg | 66 MB and less CPU time in our test |
| Fastest full restore | Restic | 3.3 s against 4.6 s or more |
| Damage caught by the default check | Borg | 20 of 20 flipped bytes, against 0 for Restic |
| No strong need either way | Either | Pick the one your team can restore under stress |
Based on the tests and documentation cited below, as of 1 December 2026.
Decision table for Restic vs Borg: pick Restic for cloud storage, many servers sharing one repository and the fastest full restore, Borg for one SSH backup server, low memory use and damage caught by the default check, either when no strong need applies.
BorgBackup vs Restic: How Does Each Tool Store Your Data?
Both tools cut files into pieces, keep each unique piece once and encrypt it. Restic compresses with zstd by default, while Borg uses lz4. The cutting method is called content-defined chunking. It is why both tools deduplicate well after a file changes in the middle.
Restic 0.20.0 and Borg 1.4.5 compared by design
| Feature | Restic | Borg |
|---|---|---|
| Written in | Go | Python and C |
| Chunking | Rabin fingerprint, about 1 MiB | Buzhash, 512 KiB to 8 MiB |
| Encryption | AES-256 with Poly1305-AES | AES-256-CTR plus authentication |
| Default compression | Auto, based on zstd | lz4 |
| Remote targets | Local, SFTP, REST server, S3 and more | Local, or SSH to a host running Borg |
| Many clients, one repository | Supported | Possible, not advised in 1.4.5 |
Sources: Restic design, Restic repository guide, Borg notes, Borg security notes and Borg FAQ.
Table comparing Restic 0.20.0 and Borg 1.4.5 on language, chunking method, encryption, default compression, remote targets and support for many clients in one repository.
Both tools also make every snapshot restorable on its own. You never replay a chain of changes, as a classic incremental backup requires. Each snapshot points at the stored pieces it needs.
Cryptographer Filippo Valsorda reviewed Restic in 2017 and found the design sound. He called it an informal look, not an audit. Borg documents its own cryptography in its security notes. Borg 2.0 is still in beta, so we tested the stable 1.4.5 release.
Restic vs Borg: How Big Is the Repository After a Backup?
Borg’s default repository was 41% larger than Restic’s, at 599 MB against 426 MB for 1.21 GB of data. The gap comes from compression defaults, not from deduplication. With compression off, Restic stored 1,198 MB and Borg 1,201 MB.
Repository size after the first backup of 1.21 GB
Lower is better. Megabytes (MB), same files, same machine. Bars are scaled to the original data.
Source data
Compression off
Default settings
Tuned settings
Source: Swify test, Restic 0.20.0 and Borg 1.4.5, 6,120 files, 1,209,657,112 bytes. Blue is Restic, amber is Borg, grey is the original data.
Bar chart of repository sizes after one backup of 1.21 GB. Source data 1,210 MB. Compression off: Restic 1,198 MB, Borg 1,201 MB. Defaults: Restic 426 MB, Borg 599 MB. Tuned: Restic max 393 MB, Borg zstd level 3 413 MB, Borg zstd level 10 383 MB.
Why Does Borg Start Larger by Default?
Borg starts larger because it defaults to lz4, a fast method that compresses only modestly. The Borg FAQ says so and lists zstd as an alternative. Restic’s tuning documentation lists five modes, from off to max, and auto is the default.
Restic vs Borg compression settings: size, time and CPU on the first backup
| Setting | Repository (MB) | First backup (s) | CPU time (s) |
|---|---|---|---|
| Restic off | 1,198 | 7.2 | 10.3 |
| Restic auto (default) | 426 | 11.2 | 19.6 |
| Restic max | 393 | 42.5 | 81.2 |
| Borg none | 1,201 | 8.5 | 6.2 |
| Borg lz4 (default) | 599 | 9.3 | 7.5 |
| Borg zstd,3 | 413 | 12.8 | 11.1 |
| Borg zstd,10 | 383 | 33.4 | 31.7 |
Source: Swify test. CPU time is user plus system time. Restic works in parallel, so its wall time is shorter than its CPU time.
Table of compression settings, with repository size in MB, first backup time and CPU time in seconds. Restic off: 1,198 MB, 7.2 s, 10.3 s; Restic auto (default): 426 MB, 11.2 s, 19.6 s; Restic max: 393 MB, 42.5 s, 81.2 s; Borg none: 1,201 MB, 8.5 s, 6.2 s; Borg lz4 (default): 599 MB, 9.3 s, 7.5 s; Borg zstd,3: 413 MB, 12.8 s, 11.1 s; Borg zstd,10: 383 MB, 33.4 s, 31.7 s.
Match them and the order flips. Borg with --compression zstd,3 wrote 413 MB, which is 3% smaller than Restic’s 426 MB. The price is time: the first backup took 12.8 s against 9.3 s with lz4. At the top end, Borg with zstd,10 wrote 383 MB in 33.4 s. Restic’s max mode wrote 393 MB in 42.5 s.
What Does the Kiss and Nehéz Study Say About Restic vs Borg?
It found Borg the fastest and Restic the best at compression, and it ranked Restic ahead on storage. The 2023 University of Miskolc study ran four open-source tools on three datasets with default settings. Borg was the fastest, while Restic’s compression ratio was significantly higher. The authors call Restic “the most solid choice”.
The authors name two limits. Only first full backups were tested, and every tool ran untuned. They also note that Borg has room for tuning, such as zstd compression. Our nightly runs and tuned results fill that gap.
Restic vs Borg: Which Backs Up Faster?
Borg with lz4 was faster on the first backup, at 9.3 s against 11.2 s for Restic. Nightly runs tied at about one second. Each night we rewrote 16 KiB in 13 to 22 files and appended a log. We also added 40 new files of random data, which do not compress.
Restic vs Borg backup times on 1.21 GB, in seconds
| Run | Restic auto | Borg lz4 | Borg zstd,3 |
|---|---|---|---|
| First backup | 11.2 | 9.3 | 12.8 |
| Nightly average, 7 nights | 1.09 | 1.20 | 1.28 |
| Run with no changes | 0.96 | 1.13 | 1.08 |
Source: Swify test. Caches were dropped before every run.
Table of backup times in seconds. First backup: Restic 11.2, Borg lz4 9.3, Borg zstd,3 12.8. Nightly average over seven nights: 1.09, 1.20 and 1.28. Run with no changes: 0.96, 1.13 and 1.08.
Our Restic backup guide measured 12.7 s for the first run on the same sample, because it used Restic 0.16.4. First-run times shift a little between releases. Compare tools on fixed versions, as we did here.
Restic vs Borg: How Much Does a Repository Grow Each Night?
Restic grew the least, by 36.0 MB over seven nights. Borg grew 40.5 MB with zstd,3 and 44.7 MB with lz4.
Restic vs Borg repository size over seven nightly backups, in MB
| Point in time | Restic auto | Borg lz4 | Borg zstd,3 |
|---|---|---|---|
| First backup | 426 | 599 | 413 |
| After night 1 | 430 | 605 | 418 |
| After night 3 | 439 | 617 | 428 |
| After night 5 | 449 | 630 | 440 |
| After night 7 | 462 | 644 | 454 |
| Growth over 7 nights | +36.0 | +44.7 | +40.5 |
Source: Swify test. Each night changed about 1% of the files and added 40 random files, so real data that compresses may grow more slowly.
Table of repository size over seven nightly backups in MB. Restic auto grew from 426 to 462, Borg lz4 from 599 to 644 and Borg zstd,3 from 413 to 454, which is growth of 36.0, 44.7 and 40.5 MB.
The gaps are small next to the first backup. The compression setting matters more than the tool.
Restic vs Borg: Which Uses Less Memory?
Borg used less memory. It held a steady 66 MB with lz4 and zstd,3. Restic ranged from 67 MB to 126 MB in normal backup runs and peaked at 224 MB in max mode.
Peak memory during the first backup
Lower is better. Megabytes (MB), maximum resident memory.
Source: Swify test. Memory is the peak resident set size reported by the operating system.
Bar chart of peak memory during the first backup of 1.21 GB: Restic auto 126 MB, Restic max 224 MB, Borg lz4 66 MB and Borg zstd level 3 66 MB.
Borg vs Restic: Which Uses Less CPU?
Borg used less CPU. At matching compression, it used 11.1 s of CPU time against 19.6 s for Restic.
Restic finishes quickly because it works in parallel across both cores. That helps on an idle backup server. On a production server that also serves traffic, the extra CPU time competes with your application. Restic’s max mode used 81 s of CPU time.
CPU time during the first backup
Lower is better. Seconds of user plus system CPU time.
Source: Swify test. Blue is Restic, amber is Borg.
Bar chart of CPU time during the first backup of 1.21 GB: Restic auto 19.6 s, Restic max 81.2 s, Borg lz4 7.5 s and Borg zstd level 3 11.1 s.
See what is included in a Swify server
A backup job competes with your application for CPU and disk. Every plan includes root access, a 1 Gbps unmetered port and fixed prices with no egress fees. Give your backups a server of their own.
View the plansBorg vs Restic: How Do Restore and Prune Compare?
Restic restored a full snapshot faster. Borg restored a single file faster, and both pruned in about a second. Both returned identical data. We compared the newest restored snapshot of each repository with the source using diff -rq --no-dereference. Without that flag, diff followed broken symbolic links and reported false errors at first.
Restic vs Borg restore and retention times on the same repositories
| Task | Restic auto | Borg lz4 | Borg zstd,3 |
|---|---|---|---|
| Restore the newest snapshot (s) | 3.3 | 4.6 | 5.2 |
| Restore one file (s) | 0.70 | 0.32 | 0.41 |
| Keep last 3 and prune (s) | 0.89 | 0.95 | 1.04 |
| Peak memory, full restore (MB) | 135 | 92 | 73 |
Source: Swify test. Borg times add borg prune and borg compact.
Table of restore and retention results. Full restore: Restic 3.3 s, Borg lz4 4.6 s, Borg zstd,3 5.2 s. One file: 0.70, 0.32 and 0.41 s. Keep last 3 and prune: 0.89, 0.95 and 1.04 s. Peak memory in a full restore: 135, 92 and 73 MB.
A retention policy works differently in each tool. Restic removes old snapshots and frees space in one command, forget --prune . Borg runs borg prune first, then borg compact frees the space, as the Borg notes describe.
Borg vs Restic: Which One Catches Corruption by Default?
Borg’s default check caught all 20 flipped bytes. Restic’s default check caught none, and only check --read-data caught all 20. Restic’s default check also returned exit code 0 every time, so a heartbeat monitor would have reported a healthy backup. We copied each repository, flipped one byte at a random place in a random data file and ran the checks. We then undid the flip and repeated the test 20 times per tool.
Restic vs Borg: how many of 20 flipped bytes did each check catch?
| Check | Time on a clean repository | Flipped bytes caught |
|---|---|---|
Restic check | 1.0 s | 0 of 20 |
Restic check --read-data-subset=10% | 1.0 s | 0 of 20 |
Restic check --read-data | 2.8 s | 20 of 20 |
Borg check | 1.6 s | 20 of 20 |
Borg check --verify-data | 4.1 s | 20 of 20 |
Source: Swify test, 20 random single-byte flips per tool on the Restic auto and Borg lz4 repositories. Twenty flips is a small sample, so treat it as a warning, not proof.
Table of how many of 20 flipped bytes each check caught. Restic check caught 0 and Restic check with 10% subset caught 0. Restic check with read-data caught 20, Borg check caught 20 and Borg check with verify-data caught 20.
Why Does Restic’s Default Check Miss Damage?
Restic’s default check verifies the repository structure but does not read the data inside the pack files, so it cannot see a flipped byte there. The Restic documentation says the default check does not confirm that pack files are unmodified. Borg’s default check reads every stored object and compares its CRC checksum, as the borg check documentation explains. Silent damage of this kind is called bit rot.
How Often Should You Run a Deep Check?
Run a deep check monthly, and rotate Restic’s subsets so that none is skipped. Schedule restic check --read-data-subset=1/4 in week one and 2/4 in week two, and so on. Every pack file is then read once a month.
The Restic documentation warns that a random percentage gives no coverage guarantee. Our random 10% caught none of 20. For Borg, run borg check --verify-data monthly, because it is the slower cryptographic check. A passing check never replaces the 3-2-1 rule below.
📖 A clean check is not a second copy
Read our 3-2-1 backup guide to place a second and third copy off the server.
Restic vs Borg for Ransomware and Many Servers
Both tools offer an append-only mode that protects backups from a hacked server. Each needs a setup step, and only Restic is built for many servers writing at once. This matters because ransomware targets backups. In the Sophos State of Ransomware 2024, 94% of hit organisations said attackers tried to compromise their backups. Of those attempts, 57% worked.
Ransomware and multi-server handling
| Question | Restic | Borg |
|---|---|---|
| Stop a hacked server deleting backups | rest-server with --append-only | borg serve --append-only as an SSH forced command |
| What append-only does | Blocks deleting and changing backups | Skips compaction, so pruned data stays on disk |
| Several servers, one repository | Supported, with parallel writers | Not recommended in 1.4.5, allowed in the 2.0 beta |
Sources: rest-server, Borg notes, Borg FAQ, Borg 2.0 FAQ and Restic design.
Table of ransomware and multi-server handling. Restic uses rest-server in append-only mode and supports parallel writers. Borg uses borg serve append-only, which skips compaction, and advises against many clients in version 1.4.5.
Restic’s design document allows many non-exclusive locks in parallel but only one exclusive lock. That is what lets several servers write at once. Neither tool replaces an immutable or offline copy. The CISA #StopRansomware Guide advises offline, encrypted backups that you test regularly.
How Do You Run Restic and Borg on a Dedicated Server?
Run either one from a systemd timer, write to a second machine and test a restore every month. The commands follow what we ran, except for the repository address and the retention rule. We used local paths and kept the last three snapshots. The SFTP and SSH forms change only the address.
# Restic over SFTP
restic -r sftp:backup@backup-host:/srv/restic init
restic -r sftp:backup@backup-host:/srv/restic backup /etc /srv
restic -r sftp:backup@backup-host:/srv/restic forget --keep-daily 7 --keep-weekly 4 --prune
# Borg over SSH
borg init --encryption=repokey ssh://backup@backup-host/./borg
borg create --compression zstd,3 ssh://backup@backup-host/./borg::{hostname}-{now} /etc /srv
borg prune --keep-daily 7 --keep-weekly 4 ssh://backup@backup-host/./borg
borg compact ssh://backup@backup-host/./borgBorg needs to be installed on the backup host as well, according to the Borg FAQ. Swify servers are unmanaged and give you root access, so you can install it. Restic over SFTP needs only SSH on the remote side. For unattended runs, give each server its own login with SSH key authentication, never a password.
Restic vs Borg: What Schedule Should You Automate?
Automate five tasks: a daily backup, retention, a weekly quick check, a monthly deep check and a monthly restore test.
Restic vs Borg: a schedule you can automate
| Task | Restic | Borg | How often |
|---|---|---|---|
| Back up | backup | create | Daily |
| Apply retention | forget --prune | prune, then compact | Daily or weekly |
| Quick check | check | check | Weekly |
| Deep check | check --read-data-subset=n/4 | check --verify-data | Monthly |
| Restore test | restore latest --target | extract | Monthly |
Based on the commands and tests in this guide. Restic’s n/4 means one quarter of the pack files per week.
Table of a schedule for Restic and Borg: daily backup, daily or weekly retention, weekly quick check, monthly deep check and monthly restore test, with the command for each tool.
Time every restore test, because that time is your recovery time objective. A Swify plan includes a 1 Gbps unmetered port, which moves about 450 GB an hour at best. Your compression ratio will differ from ours. Photos and videos barely shrink, while logs and system files shrink a lot.
📖 Where should the backups live?
Read HDD vs SSD for Servers to choose the disks for a backup target.
Restic vs Borg: The Short Version
In the Restic vs Borg choice, pick Restic for cloud targets, many servers and the fastest full restore. Choose Borg for one SSH backup server, the lowest memory use and the stronger default check. With --compression zstd,3 it also gives the smallest repository. On defaults, Restic wins on size. With one flag, Borg wins.
Whichever you pick, run a deep data check on a schedule and restore a file once a month. Our test used one machine and synthetic changes, so repeat it on your own data before you commit.
Build a backup server with the disks you need
Pick hard disks, set RAID 1 and choose the port speed in the custom builder. You get root access, 1 Gbps unmetered bandwidth and a fixed monthly price.
Open the server builderFrequently Asked Questions
Restic vs Borg: which is faster?
On the first backup, Borg with lz4 took 9.3 s and Restic 11.2 s on 1.21 GB. Nightly runs tied at about one second. Restic used more CPU time, so the faster finish costs more processing on a busy server.
Read What Is Disk I/O and Why It Becomes a Bottleneck to see how backups compete with your application.
Borg vs Restic: which uses less memory?
Borg used less. It held about 66 MB in every lz4 and zstd,3 run. Restic used 67 to 126 MB and reached 224 MB in max mode. Both are small next to the RAM on a dedicated server.
Read Best Tools to Monitor Dedicated Server Performance to watch memory and CPU during your own backup runs.
Restic vs Borg: which is safer against ransomware?
Neither is safe by default. Restic needs rest-server in append-only mode, and Borg needs borg serve --append-only. Keep one offline copy that no online credential can reach, as CISA advises.
Read Dedicated Server Security Checklist: How to Harden Your Server After Setup for the access steps that protect your backup keys.
Can Restic or Borg back up a Nextcloud server?
Yes. Put Nextcloud in maintenance mode, then copy the config folder, the data folder and a database dump with either tool. Mirrored disks do not count, because they copy deletions too.
Read Nextcloud Server: What It Needs and What to Run It On to see what a Nextcloud backup must contain.
Does RAID replace Restic or Borg?
No. RAID keeps a server running when one disk fails, but it copies a deleted file to every disk. A backup tool keeps old versions, so you can go back to yesterday.
Read What Is RAID? How It Protects Dedicated Servers to see what RAID does and does not protect.
How often should you run and check Restic or Borg?
Run a backup at least daily, and more often if losing a day of data would hurt. Add a quick check weekly and a deep data check monthly, because Restic’s default check caught none of 20 flipped bytes in our test. Your recovery point objective decides the schedule.
Read What Happens When a Server Crashes? to see how backup frequency sets your maximum data loss.

