Restic is a free, open-source backup program that is fast, efficient, and secure. It runs on Linux, macOS, Windows, and FreeBSD.
What Is Restic?
Restic is a modern backup tool designed to be easy to use while providing strong security guarantees. Unlike traditional backup tools, restic encrypts ALL data by default and supports deduplication.
Why developers love it:
- Fast incremental backups (only changed data)
- Client-side encryption (AES-256)
- Deduplication across all backups
- Supports 20+ storage backends
- Cross-platform (Linux, macOS, Windows)
- Single binary — no dependencies
- Verifiable backups (data integrity checks)
Supported Storage Backends
Restic can backup to:
- Local: Any local directory or external drive
- Cloud: AWS S3, Google Cloud Storage, Azure Blob
- S3-compatible: MinIO, Backblaze B2, Wasabi, DigitalOcean Spaces
- SFTP: Any SSH server
- REST: Restic REST server
- Rclone: 40+ cloud providers via rclone
Quick Start
Install
# macOS
brew install restic
# Ubuntu/Debian
sudo apt install restic
# Or download binary
https://github.com/restic/restic/releases
Initialize a Repository
# Local backup
restic init --repo /backup/my-project
# S3 backup
export AWS_ACCESS_KEY_ID=your-key
export AWS_SECRET_ACCESS_KEY=your-secret
restic init --repo s3:s3.amazonaws.com/my-backup-bucket
# SFTP backup
restic init --repo sftp:user@server:/backups/my-project
Create a Backup
restic backup /home/user/projects --repo /backup/my-project
First backup saves everything. Subsequent backups only save changes (incremental).
Restore
# Restore latest snapshot
restic restore latest --target /restore --repo /backup/my-project
# Restore specific files
restic restore latest --target /restore --include "/projects/myapp" --repo /backup/my-project
Automate with Cron
# Daily backup at 2 AM
0 2 * * * restic backup /home/user/projects --repo s3:s3.amazonaws.com/my-bucket --password-file /etc/restic-password
Smart Retention Policies
# Keep: 7 daily, 4 weekly, 12 monthly, 3 yearly snapshots
restic forget --keep-daily 7 --keep-weekly 4 --keep-monthly 12 --keep-yearly 3 --prune
Automatically removes old backups while keeping important ones.
Backup Speed
Restic uses content-defined chunking and deduplication:
- First backup of 50GB project: ~10 minutes (depends on storage)
- Subsequent backups: ~30 seconds (only changes)
- Moving/renaming files: instant (content-addressed)
Encryption
Every backup is encrypted with AES-256 before leaving your machine:
- Storage provider CANNOT read your data
- No additional encryption tools needed
- Password or key file authentication
Verify Backup Integrity
# Check all data integrity
restic check --repo /backup/my-project
# Read all data and verify
restic check --read-data --repo /backup/my-project
Real-World Use Cases
- Developer: Backup code, databases, configs to S3 for $1/month
- Homelab: Backup everything to a NAS via SFTP
- Business: Encrypted backups to Backblaze B2 ($5/TB/month)
- Server: Automated nightly backups with retention policies
Cost Comparison
| Solution | 100GB/month | Encryption | Dedup |
|---|---|---|---|
| Backblaze Backup | $7/mo | Yes | No |
| CrashPlan | $10/mo | Yes | No |
| Restic + B2 | $0.50/mo | Yes | Yes |
| Restic + Wasabi | $0.59/mo | Yes | Yes |
Who Uses Restic?
With 27K+ GitHub stars:
- DevOps teams for server backups
- Developers for project backups
- Homelab enthusiasts
- Businesses needing encrypted offsite backups
Get Started
- Install restic (one binary)
- Initialize a repository
- Run your first backup
- Set up a cron job
Your data is now encrypted, deduplicated, and safe.
Need to collect web data before backing it up? Check out my web scraping tools on Apify — extract structured data from any website. Custom scrapers available: spinov001@gmail.com
Top comments (0)