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.
How to Try It
Restic is a single binary with no dependencies. Installation is dead simple:
# macOS (Homebrew)
brew install restic
# Linux (apt)
sudo apt install restic
# Or grab the latest release from GitHub
curl -L -o restic.bz2 https://github.com/restic/restic/releases/latest/download/restic_linux_amd64.bz2
To test it locally:
# Create a local repository
restic init --repo /tmp/my-backup
# Backup a directory
restic --repo /tmp/my-backup backup ~/Documents
# List snapshots
restic --repo /tmp/my-backup snapshots
# Restore the latest snapshot
restic --repo /tmp/my-backup restore latest --target /tmp/restore
That’s it. You’re now running a secure, deduplicated backup system. No registration, no cloud account required — just a folder.
Final Thoughts
Restic isn’t trying to be the next Dropbox or a fancy GUI tool. It’s a developer-friendly backup engine that does exactly what it promises: fast, encrypted, deduplicated snapshots with minimal configuration. If you’re tired of tools that require a PhD to set up or that lock you into a specific cloud provider, give restic a spin. It’s reliable, well-documented, and the 12 backends mean it probably fits your existing storage setup.
For me, it’s replaced everything from rsync-based scripts to cloud-specific backup tools. And honestly, I sleep better knowing my data is encrypted locally and I can restore it from any backend in under five minutes.
Found this useful? Follow @githubprojects for more dev tools like this.
Repository: https://github.com/restic/restic