On managed WordPress hosting, backups are a checkbox in someone else’s control panel. On a VPS, they are a job you either do or don’t have. Nobody makes them for you, nobody watches them for you, and nobody restores anything if you skip the part where you test that restoring actually works. This is a complete, measured backup strategy for a self-hosted server in 2026: restic as the backup engine, an offsite copy on Hetzner Storage Box or Backblaze B2, automation with cron or a systemd timer, and the restore test almost everyone skips. Every performance number below comes from a run we did on our own VPS on 2026-11-23, per our sourcing methodology.
Why backing up a VPS is its own job
A managed host bundles backups with your monthly fee: the provider snapshots your data on its own schedule, keeps it on its own infrastructure, and restores it for you. A VPS flips all of that. The machine is yours, the data is yours, and so is the failure. A disk-level snapshot from your provider is still not a backup you control: it sits in the same provider’s infrastructure, often in the same datacenter, and it disappears if your account does.
Hosting providers do have bad weeks. In November 2026, Beget, one of the largest Russian hosting providers, was hit by a cyberattack: data on its management servers was destroyed, and restoring customer sites from backups took the company weeks.[12] If your only copy of a site lives on the same platform as the server itself, you are betting that the platform never has a bad month. That bet already lost once this year - the same argument that makes a single VPS a single point of failure no matter the SLA.
For a single self-hosted server, a sane 2026 baseline is short: one restic repository, one offsite copy of it, and a restore test you can point to. Everything below is that, with commands and numbers.
restic vs borg: what actually differs
The two serious open-source options for self-hosted backups are restic and BorgBackup. Both are deduplicating backup programs with client-side encryption, and both are documented well enough that the comparison can stay factual.
The model differs first. Restic works in snapshots: “the contents of a directory at a specific point in time is called a snapshot,” and every restic backup run creates one you list with restic snapshots and restore by ID or by the word latest.[1] Borg works in named archives: borg create /path/to/repo::Saturday1 ~/Documents makes an archive called Saturday1 inside a repository, and archives are mountable as user-space file systems so you can browse a backup like a folder.[9] Same job, different vocabulary: restic’s snapshot, borg’s archive.
Both deduplicate by content-defined chunking. Borg splits each file into variable-length chunks and stores only chunks it has never seen, regardless of file names, timestamps, or position inside the file.[9] Restic’s design doc describes the same idea: data is split into chunks, and a chunk that already exists is not stored again.[8] That is what makes daily backups cheap after the first one.
Both encrypt before anything leaves your machine. Borg uses 256-bit AES encryption with HMAC-SHA256 for integrity and authenticity, encrypted client-side.[9] Restic encrypts all repository data with AES-256 in counter mode and authenticates it with Poly1305-AES.[8] In both cases the storage target never sees plaintext, which is what makes an untrusted target like an object store acceptable.
Storage format and backends differ the most. A restic repository is versioned: repository format version 2, the current default, adds compression.[3] Borg compresses with lz4, zstd, zlib, or lzma, all optional.[9] And restic’s repository can live locally, on an SFTP server, on a REST server, in Amazon S3, in any S3-compatible store, in Backblaze B2, in Azure Blob or Google Cloud Storage, and anywhere rclone reaches.[3] Borg’s natural home is SSH: it stores data on any remote host accessible over SSH, and installing borg on the remote host brings performance gains over a network file system.[9]
We are not going to tell you one is “better” - we have not benchmarked them head to head, and this site does not publish numbers it did not measure. For the rest of this article the choice is concrete: restic’s native SFTP and S3 backends line up directly with the two offsite providers below, and a single static binary is trivial to install and update. That is a fit argument, not a performance one.
Our setup: restic 0.20.0 on Debian 13
The host we measured on is our own VPS: Debian 13, hostname vps-debian13.local, with restic 0.20.0 installed as a static binary. The binary reports restic 0.20.0 compiled with go1.27.4 on linux/amd64, and it came from the official GitHub release, whose assets are signed with Alexander Neumann’s PGP key.[2][4] Release v0.20.0 shipped on 2026-11-19 and added support for Backblaze B2 Multi-Bucket Application Keys, among other things.[4] We ran the whole test on 2026-11-23.
Install the static binary. The official binaries are built reproducibly and verifiably; the docs recommend them when the distro package is outdated.[2] One file, restic_0.20.0_linux_amd64.bz2, is the whole installation:
$ bzip2 -d restic_0.20.0_linux_amd64.bz2
$ chmod +x restic
$ sudo mv restic /usr/local/bin/
$ restic version
restic 0.20.0 compiled with go1.27.4 on linux/amd64
Verify the download against SHA256SUMS and the PGP signature in SHA256SUMS.asc before the first run.[2] From then on, restic self-update replaces the binary in place.
Point restic at a repository and init it. For automation, restic reads the repository location from RESTIC_REPOSITORY and the password from RESTIC_PASSWORD (or --password-file / RESTIC_PASSWORD_FILE, or a --password-command).[3] Init happens once:
$ export RESTIC_REPOSITORY=/srv/backups/restic-repo
$ export RESTIC_PASSWORD=$(cat /root/.restic-password)
$ restic init
created restic repository 085b3c76b9 at /srv/backups/restic-repo
The docs warn that losing the password makes the data irrecoverable, so keep it in a password manager, not only in the backup script.[3]
The test data. To get honest numbers we built a synthetic site tree: 130.9 MiB across 1506 files - 1500 small files of 2-40 KB, five files of 1-5 MB, and one 80 MB file - a shape that mimics a real site. Every command below ran with --no-cache so the numbers reflect a cold run against the repository, not a warm local cache. The measurements:
| Test (2026-11-23, Debian 13, restic 0.20.0, 130.9 MiB / 1506 files) | Command | Result |
|---|---|---|
| Full backup | restic backup data --no-cache |
1.45 s; 137,489,194 bytes packed (~137.5 MB); the repository on disk is 135 MB - essentially the size of the source tree, since compression offsets the chunking metadata |
| Incremental (3 files changed) | restic backup data --no-cache |
0.68 s; 2,346,736 bytes added |
| Deduplication (no changes) | restic backup data --no-cache |
0 bytes added (files_new=0, data_added_packed=0) |
| Restore | restic restore latest --target restore --no-cache |
1.10 s; diff -r data restore/data reports no differences |
| Integrity | restic check --no-cache |
“no errors were found”; 2 snapshots verified |
Incremental is the default, and deduplication is why. Restic stores only chunks it has not seen; a daily backup of a site that changed little costs seconds and a few megabytes, not another full copy. In our run, changing three files out of 1506 added 2,346,736 bytes in 0.68 s, and a rerun with zero changes added literally nothing - both counters the tool prints (files_new, data_added_packed) were zero. For a site tree that changes slowly, a month of daily snapshots costs close to one full backup plus the changes.
The restore test you have to run
A backup you have never restored is a guess that the restore works. Restic’s own docs treat repository damage as a real scenario: a modified index file makes restore fail with a fatal error, and the fix path starts with restic check.[6] So the loop is: back up, check, restore, diff. On our test tree, restoring the whole 130.9 MiB took 1.10 s:
$ restic restore latest --target restore --no-cache
$ diff -r data restore/data
diff -r printing nothing is the verification: byte-for-byte identical trees. We then ran restic check --no-cache - structural consistency of snapshots, trees, and pack files - which printed “no errors were found” for the two snapshots in the repository.[6] Note that check alone does not read every data byte; restic check --read-data adds a full read of all pack files, at the cost of reading the whole repository.[6]
Why make this a habit instead of a one-time demo? Three failure classes only a real restore catches: the repository is silently damaged (check finds it, but only if you run it), the restore target path or permissions are wrong (only visible in the restored tree), and the offsite copy is stale or unreachable (only visible when you restore from it). The discipline is cheap: after every backup-config change - new password, new backend, new retention policy - run the restore test against a scratch directory. And run it from the offsite repository at least once, because “I can restore” and “I can restore from the copy that survived the server dying” are different sentences.
Offsite: Hetzner Storage Box and Backblaze B2
The local repository on the VPS covers disk failure and bad deploys. It does not cover the server dying as a whole - account compromise, a provider incident, a provider that stops existing. That is what the second copy is for, and it must live somewhere independent of the server. Restic supports both options below natively.
Hetzner Storage Box is Hetzner’s managed backup storage, available in Germany or Finland, with unlimited traffic and access over FTP, FTPS, SFTP, SCP, Samba/CIFS, WebDAV, rsync via SSH, and - explicitly - BorgBackup, Restic, and Rclone. Monthly prices: BX11 1 TB at EUR 3.20, BX21 5 TB at EUR 10.90, BX31 10 TB at EUR 20.80, BX41 20 TB at EUR 40.60, with 10 concurrent connections, up to 100 sub-accounts, and 10/20/30/40 box-level snapshots on the respective plans; you can resize up or down without migrating data.[10] Restic’s SFTP backend is the fit: restic -r sftp:user@host:/srv/restic-repo init, and since automated backups cannot answer prompts, the docs stress passwordless SSH for the backup user.[3] One SFTP quirk: restic does not expand ~ in the remote path, so pass a relative or absolute path.[3]
Backblaze B2 is S3-compatible object storage. List price starts at $6.95/TB/month with no minimum file size or storage duration fees, free API transactions, and free egress up to 3x your average monthly stored data, after which egress is $0.01/GB.[11] At that rate a site-sized restic repository is pocket change: at list price, a 50 GB repository costs about $0.35/month before egress, and ours (135 MB) is a rounding error. Restic’s docs recommend using B2 through its S3-compatible API rather than the native B2 backend, and the lifecycle rule “Keep only the last version of the file” so B2 does not accumulate hidden versions that eat space.[3]
Which one? Both are first-class restic targets and both are cheap at this scale. Storage Box is a flat monthly fee with a hard capacity ceiling; B2 is pay-per-gigabyte with no ceiling. If you want the offsite copy to never think about capacity, Storage Box is the simple answer; if you want an S3 API and to pay for exactly what you store, B2 is. Pick either, but pick one - “the VPS is also where the backup lives” is not an offsite strategy.
Automation: cron or systemd, and proof it ran
Restic explicitly does not schedule itself - “it’s a tool that runs when executed rather than a daemon” - and the docs point at systemd and cron on Linux.[5] Our setup is a cron entry and a wrapper script whose job is threefold: run the backup, run a check, and fail loudly on a bad exit code. Restic documents the exit codes: 0 when the backup succeeded with a snapshot, 1 on a fatal error with no snapshot, 3 when some source files could not be read (an incomplete snapshot was still created).[5]
#!/bin/sh
# /usr/local/sbin/backup-site.sh
set -u
export RESTIC_REPOSITORY="sftp:backup@storagebox:/restic/backups/site"
export RESTIC_PASSWORD_FILE="/root/.restic-password"
exec 9>/run/lock/restic-site.lock
flock -n 9 || { echo "backup already running"; exit 1; }
restic backup /srv/www/site --no-cache
status=$?
if [ $status -eq 0 ]; then
restic check --no-cache --quiet
else
echo "restic backup failed with exit code $status" >&2
exit $status
fi
Two details matter here. First, the lock: the docs explicitly warn to detect already-running instances before a scheduled backup, and flock is the cheap way.[5] Second, the check inside the same script - a backup that ran but produced a corrupt repository is only discovered by check, and running it nightly means corruption is at most one day old. Add restic forget --keep-daily 7 --keep-weekly 5 --keep-monthly 12 --prune to the same script if you want retention: forget removes snapshots by policy, prune reclaims the data, --prune chains them, and --dry-run previews it.[7]
Cron gets the script plus a mail target, which is the simplest alert channel on earth:
# every day at 02:30
30 2 * * * root /usr/local/sbin/backup-site.sh
A systemd timer is the tidier alternative and gets you Persistent=true, which runs the missed job after a downtime:
# /etc/systemd/system/restic-backup.service
[Unit]
Description=Restic backup of the site
[Service]
Type=oneshot
ExecStart=/usr/local/sbin/backup-site.sh
# /etc/systemd/system/restic-backup.timer
[Unit]
Description=Daily restic backup
[Timer]
OnCalendar=*-*-* 02:30:00
Persistent=true
[Install]
WantedBy=timers.target
How do you know the backup actually happened? restic snapshots lists every snapshot with its timestamp and host - if the newest one is not from today, the pipeline is broken somewhere.[1] The check step covers integrity; the snapshot listing covers “did it run at all.” And once a month, restore from the offsite repository into a scratch directory and diff -r. That is the whole monitoring story: exit code, nightly check, snapshot listing, monthly restore.
Wrap-up
The strategy fits on one page: one static restic binary, init once, a nightly backup with a check inside the script, an offsite repository on Hetzner Storage Box or Backblaze B2, and a monthly restore test you actually run. On our numbers, a 130.9 MiB site tree backs up in 1.45 s cold, increments with changed files in 0.68 s, deduplicates unchanged data to zero bytes, and restores in 1.10 s with a byte-identical result - with the repository about the same size as the source tree. None of those numbers transfer exactly to your server, which is exactly why you should run the same four commands on yours before trusting the automation. A backup strategy that has never been restored is a wish; this one is a test you can run in one afternoon.
Sources
- restic - Introduction (quickstart: init/backup/snapshots/restore/check; snapshot definition). https://restic.readthedocs.io/en/stable/010_introduction.html - checked 2026-11-23
- restic - Installation (official binaries, SHA-256SUMS + PGP verification, self-update). https://restic.readthedocs.io/en/stable/020_installation.html - checked 2026-11-23
- restic - Preparing a new repository (RESTIC_REPOSITORY/RESTIC_PASSWORD, repo v2 = compression default; SFTP backend with passwordless SSH; S3 and S3-compatible; Backblaze B2 via S3-compatible API). https://restic.readthedocs.io/en/stable/030_preparing_a_new_repo.html - checked 2026-11-23
- GitHub - restic/restic release v0.20.0 (2026-11-19; signed by Alexander Neumann; Go 1.26.10+; B2 Multi-Bucket keys). https://github.com/restic/restic/releases/tag/v0.20.0 - checked 2026-11-23
- restic - Backing up (exit codes 0/1/3; no built-in scheduler; lock against concurrent runs). https://restic.readthedocs.io/en/stable/040_backup.html - checked 2026-11-23
- restic - Working with repositories (check: “no errors were found”; –read-data; –no-cache). https://restic.readthedocs.io/en/stable/045_working_with_repos.html - checked 2026-11-23
- restic - Removing backup snapshots (forget –keep-* policies, prune, –dry-run). https://restic.readthedocs.io/en/stable/060_forget.html - checked 2026-11-23
- restic - Design document (AES-256 CTR + Poly1305-AES; chunk deduplication; snapshots). https://github.com/restic/restic/blob/master/doc/design.rst - checked 2026-11-23
- BorgBackup - official documentation (content-defined chunking dedup; AES-256 + HMAC-SHA256 client-side; lz4/zstd/zlib/lzma; mountable archives; SSH offsite). https://borgbackup.readthedocs.io/en/stable/ - checked 2026-11-23
- Hetzner - Storage Box (BX11 1 TB EUR 3.20, BX21 5 TB EUR 10.90, BX31 10 TB EUR 20.80, BX41 20 TB EUR 40.60/mo; unlimited traffic; SFTP/rsync/BorgBackup/Restic; 10 connections; 10-40 snapshots; Germany or Finland). https://www.hetzner.com/storage/storage-box/ - checked 2026-11-23
- Backblaze - B2 Cloud Storage pricing ($6.95/TB/mo from; free egress to 3x storage then $0.01/GB; free transactions; no minimums). https://www.backblaze.com/cloud-storage/pricing - checked 2026-11-23
- Beget - status of the November 2026 incident (attack on the night of 1-2 November 2026, malware deleting data from management servers, recovery timeline). https://beget.com/ru/hosting/virtual - checked 2026-11-23