Restic vs BorgBackup: Which Encrypted Backup Tool Fits a Small VPS?

A small VPS holds more than most owners admit: a WordPress site, a database, config files, a few Docker volumes, and a mail setup that took an afternoon to get right. Lose that disk and you lose hours of work. That is why the restic vs borgbackup choice matters. Both tools encrypt your backups, both run well on a cheap server, and both cost nothing to install. They differ in how they store data, where they send it, and how much work a restore takes when you are already stressed.

If you need an encrypted backup tool for VPS use, start with your storage. Restic talks to S3-compatible storage, SFTP, and local disks with the same commands. BorgBackup was built around repositories you control, usually on another server, and it shines over SSH. Pick the tool that matches where your backups will live.

Restic vs BorgBackup: How Each Tool Encrypts and Stores Data

Both tools encrypt everything before it leaves your server, using a passphrase you set when you create the repository. Lose that passphrase and the backup is gone, so store it in a password manager and keep a copy somewhere safe, away from the VPS itself.

Restic stores each backup as a snapshot in a repository of small, content-addressed chunks. It works the same way whether the repository sits on a local disk, an SFTP server, or object storage. That flexibility is why many VPS owners pick it first. A Restic S3 backup setup can send snapshots straight to cheap object storage without an intermediate server, which keeps the moving parts down to one tool and one bucket.

BorgBackup stores backups as archives inside a repository and deduplicates across them. When a file changes slightly, Borg stores only the changed chunks, so repeated daily backups of a WordPress site stay small. Borgbackup deduplication works at the chunk level: a 2 GB site with a few edited posts does not produce another 2 GB backup. You need somewhere to put that repository, such as a second VPS or a storage box with SSH access.

Setup on a Small VPS: What the First Backup Really Takes

On a 1 to 2 GB VPS, both tools install in minutes from the distribution packages, and the first backup is the slow one. It reads every file, chunks it, encrypts it, and uploads it. After that, daily backups move only what changed, so plan the first run for a quiet hour.

Restic setup is short: install the binary, run restic init against your repository, then run your first restic backup with the paths you want. The commands stay the same when you change the backend, which makes it easy to move from a local test repository to object storage later. Our guide to backing up a VPS to S3-compatible storage with Restic walks through the repository setup and the first backup in order.

Borg setup takes a little more planning. You create the repository on the target machine, set up SSH key access, then run borg init and your first borg create. The extra step pays off if you back up several machines to one repository. If you have never used it, the BorgBackup setup guide for a budget VPS covers repository creation, SSH keys, and a first backup.

Both tools need a cron job or a systemd timer to run on their own. Put the command in a script, log its output, and add a check that tells you when it fails.

Deduplication, Compression, and Storage Costs

Storage cost is where the two tools pull apart. Borg deduplicates by default and compresses with zstd or lz4, so a month of daily backups of a mostly static site often costs far less disk than the live data would suggest. On a fixed-size disk, that efficiency matters: you can keep 30 daily archives and a few weekly ones without buying a bigger disk every few months.

Restic also deduplicates and compresses, but its model is built for object storage, where you pay per gigabyte per month plus a small charge for requests. Its prune step reclaims space from snapshots you delete, so run it on a schedule, or old data lingers and your bill creeps up.

Feature Restic BorgBackup
Encryption Always on, passphrase-protected Always on, passphrase-protected
Best storage S3-compatible storage, SFTP, local disk SSH server, local disk, storage box
Deduplication Yes, chunk-based Yes, usually tighter on disk
Compression Yes Yes, zstd or lz4
Restore Mount a snapshot or restore a path Mount an archive or extract a path
Learning curve Short, same commands per backend Short, more SSH setup
Weak spot Prune needs regular runs Needs a server you control

Do not pick based on the table alone. The cheapest option is the one whose storage you already have. If you already pay for object storage, Restic fits without new infrastructure. If you already rent a second VPS or a storage box with SSH, Borg uses what you have. That is the whole restic vs borgbackup cost question in practice: match the tool to the storage, not the other way round.

Restores, Retention, and Day-to-Day Reliability

A backup tool earns its keep on restore day, not on backup day. Both tools let you list snapshots, mount one as a filesystem, and pull out a single file or a whole directory.

Retention is where small VPS owners most often go wrong. Keeping every daily backup forever fills the disk, and keeping only the last backup leaves you with nothing when you discover a problem a week late. A workable pattern is seven daily snapshots, four weekly ones, and three monthly ones. VPS backup retention should match how long it takes you to notice a problem.

Test your restores before you need them. Pick a file, restore it to a temporary directory, and check that it opens. Do it once a month, and after every change to the backup job. Our walkthrough on testing a VPS backup by restoring it before you need it shows a safe way to run that check without touching your live site.

Both tools need care around databases. Backing up a live MySQL or MariaDB data directory while the server writes to it can produce a corrupt dump. Dump the database first, then back up the dump file.

Which Tool Fits Your VPS? A Practical Decision Guide

Choose Restic if your backups go to object storage, if you back up several machines to different places, or if you want one set of commands that works the same everywhere.

Choose BorgBackup if you have a second server, a storage box, or a home server with SSH access, and if disk efficiency matters more than backend flexibility. It fits best when you back up the same machines every day and want many archives kept cheaply on a fixed disk. The offsite backup strategy for a single VPS explains how either tool fits into a 3-2-1 plan, so your one VPS is never the only copy of anything important.

If your storage provider only offers S3-compatible buckets, use Restic. If your storage is a storage box or a second VPS with SSH, use Borg. If you run WordPress, back up the uploads folder, the database dump, and wp-config.php at minimum.

Common Mistakes That Leave Backups Useless

First, storing the passphrase only on the VPS. If the server dies, the passphrase dies with it, and the encrypted backup becomes unreadable. Second, backing up the wrong paths: owners back up the web root and forget the database dump, or back up the database and forget the uploads folder.

Third, never running prune or forgetting retention. Repositories grow, disks fill, and the next backup fails because there is no space left. Fourth, trusting a backup you have never restored. A job can report success while backing up an empty directory or a path that moved after a migration. A monthly test restore is the only proof that counts.

Both Restic and BorgBackup are solid, free, and proven on small servers. The right one is the one whose storage you already have, whose restore steps you have actually practised, and whose job runs every night without you thinking about it. Set it up this week and test a restore. The backup that runs is the one that saves you.

Ditulis oleh

Firdaus Safari Putra

Founder, PT FirKaizen Digital Solutions

Firdaus Safari Putra adalah founder PT FirKaizen Digital Solutions. Ia membangun dan mengoperasikan infrastruktur server di balik panduan ini, dan menulis berdasarkan apa yang benar-benar ia jalankan, uji, dan ukur — bukan teori.