restic: A Fast, Secure Backup Tool That Just Works with 12 Backends
If you're a developer, you probably have a love-hate relationship with backups. You know you should do them, but the tools are often slow, complicated, or require you to store data in a specific format. Enter restic — a backup program that’s been quietly solving this for years, and it does it without the usual headaches.
Restic is written in Go, works cross-platform, and supports 12 different backends out of the box. That means you can back up to local drives, SFTP servers, S3-compatible storage, Google Cloud Storage, Azure, Backblaze B2, and even REST servers. But the real magic? It’s fast, it encrypts everything locally, and it uses deduplication so you don’t waste space.
What It Does
Restic takes snapshots of your files and stores them in a repository. A snapshot is a point-in-time backup — think of it like a git commit for your data. You can choose which files or directories to include, and restic handles the rest.
The key workflow is simple:
- Init a repository (local or remote).
- Backup your files with
restic backup /path/to/data. - Restore them later with
restic restore <snapshot-id> --target /restore/path.
No daemons, no complex config files. Just a binary and a few commands.
Why It’s Cool
Let’s be real — most backup tools either lock you into a proprietary format or require you to run a full server. Restic avoids both.
End-to-end encryption. All data is encrypted and authenticated on your machine before it leaves. Even if your cloud provider gets compromised, your backups are safe.
Deduplication. Restic splits files into small chunks and only uploads chunks it hasn’t seen before. If you backup a 10GB project twice with only a few changed files, the second backup is almost instant and uses minimal storage.
12 backends. SFTP, S3, Google Cloud, Azure, Backblaze B2, Restic REST server, local filesystem — pick whatever fits your stack. Need to switch providers later? No problem. Restic can copy repositories between backends.
Prune policies. You can define retention policies (e.g., keep last 7 daily snapshots, last 4 weekly, etc.) and restic will automatically clean up old data. This is great for keeping storage costs predictable.
Snapshots are immutable. Once a snapshot is created, you can’t modify it. That protects against ransomware or accidental deletions — you can always roll back.