Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Restic Backups: Why File Copies Aren't Real Backups

· 6 min read · Home Tech

In this article
  1. What Counts as a Backup?
  2. How Restic Works
  3. Why File Copies Fail
  4. Real-World Scenarios Where Restic Wins
  5. How to Choose a Backup Strategy
  6. Common Problems and Misconceptions
  7. Costs and Storage Efficiency
  8. Safety and Verification
  9. Frequently Asked Questions

File copies are not backups, and restic proves it by giving you deduplicated, encrypted, versioned snapshots that survive ransomware, accidental deletion, and drive failure in a way that simple copies never can. This article explains why copying files to an external drive or cloud folder is a false sense of security, and how restic's design addresses the real failure modes you'll actually encounter.

What Counts as a Backup?

A backup is a recoverable copy of your data that is stored separately from the original, is versioned so you can go back in time, and is verified to be restorable. File copies fail on versioning: if your files get encrypted by ransomware or you accidentally overwrite a document, the copy is overwritten too, because it's synced in real time or on a schedule. Restic creates snapshots that are immutable in practice—each snapshot is a point-in-time record that can be restored independently, even if the original files are gone or corrupted.

How Restic Works

Restic is a command-line backup program that stores encrypted snapshots in a repository, which can be a local directory, an external drive, or a cloud storage service like S3, Backblaze B2, or Azure. It uses content-defined chunking to split files into variable-sized blocks, hashes each block, and only stores blocks it hasn't seen before. This deduplication means that if you back up the same files repeatedly, only the changed blocks are uploaded, saving bandwidth and storage space. Every snapshot is encrypted with AES-256, and the repository is locked against concurrent writes, so you can run backups from multiple machines without corruption.

Why File Copies Fail

  • No versioning: A copy overwrites the previous version, so you can't recover from accidental edits or ransomware that encrypts both the original and the copy.
  • No integrity checking: Copies don't verify that the data was written correctly; a silent bit rot or a bad sector can corrupt the copy without you knowing.
  • No encryption at rest: If your external drive is stolen, the data is readable. Restic encrypts everything by default.
  • No cross-platform consistency: Copying files while they're in use can result in partial writes; restic uses a consistent snapshot mechanism that avoids this.

Real-World Scenarios Where Restic Wins

Consider a ransomware attack: your files are encrypted, and your external drive is connected and gets encrypted too because the ransomware follows the drive letter. With restic, the repository is a set of encrypted blobs that the ransomware can't read or modify without the password, and even if it deletes the repository, you can restore from a previous snapshot. Or consider accidental deletion: you realize you deleted an important folder two weeks ago. With file copies, it's gone; with restic, you restore the snapshot from that date. Restic also handles large datasets efficiently: a 1 TB photo library with only 10 GB of new photos takes only 10 GB of new storage, not 1 TB.

How to Choose a Backup Strategy

Start with the 3-2-1 rule: three copies of your data, on two different media, with one offsite. Restic can fulfill the offsite copy by backing up to a cloud provider. For the local copy, you might still use a simple file copy for quick access, but for the offsite and versioned copies, restic is a better choice. If you're a developer, restic integrates with cron or systemd timers; if you're a home user, you can use a wrapper like Backrest or Rustic to get a GUI. The key is to test your restores regularly—a backup you've never restored is not a backup.

Common Problems and Misconceptions

One misconception is that restic is hard to use. The basic commands are restic init, restic backup /path, restic snapshots, and restic restore latest. Another is that deduplication slows down backups; in practice, the speed is comparable to rsync for most workloads. A common problem is forgetting the repository password—without it, your data is unrecoverable, so store it in a password manager. Another is running out of space on the repository; restic doesn't automatically prune old snapshots, so you need to set up a retention policy using restic forget and restic prune.

Costs and Storage Efficiency

Restic itself is free and open-source. The cost is the storage where you keep the repository. Cloud storage costs vary by provider and region, but deduplication means you pay for the unique data, not the total size of all snapshots. For example, if you have 100 GB of files and change 5% each week, a restic repository might grow by only a few GB per week, whereas a file-copy backup would require 100 GB per copy. You can also use restic with a local disk, which has no ongoing cost but doesn't protect against fire or theft.

Safety and Verification

Restic includes a restic check command that verifies the integrity of the repository by reading all data and comparing hashes. You should run this regularly, especially after a restore. Also, test restores in a sandbox directory to ensure your data is readable. Restic uses a lock file to prevent concurrent writes, so you can safely run backups from multiple machines to the same repository, but you should avoid running two backups at the same time to the same repository from the same machine.

Frequently Asked Questions

Can I use restic with my existing external drive?

Yes, you can initialize a restic repository on any local directory, including an external drive. The drive will contain a data folder and a snapshots folder, and you'll need to use restic commands to back up and restore. You won't see your files as normal folders, but that's the point—they're encrypted and deduplicated.

How do I restore a single file from a snapshot?

Use restic restore latest --include /path/to/file --target /restore/location. You can list files in a snapshot with restic ls latest to find the exact path. This is more efficient than restoring the entire snapshot.

Is restic safe for cloud storage?

Yes, restic encrypts all data before uploading, so the cloud provider only sees encrypted blobs. You control the password, so even if the provider suffers a breach, your data is unreadable. Just make sure you keep your password safe.

What happens if I lose my restic password?

Your data is unrecoverable. There is no backdoor. That's why it's critical to store the password in a password manager and maybe write it down in a safe place. You can also use a keyfile, but the same rules apply.

How often should I run backups?

It depends on how much data you can afford to lose. For daily work, a nightly backup is common. For critical files, you might run it every hour. Restic is efficient enough to run frequently because it only uploads changes.

Does restic work on Windows and macOS?

Yes, restic is cross-platform and provides binaries for Windows, macOS, and Linux. The commands are the same across platforms, though you'll need to adjust paths. On Windows, you might use a scheduled task instead of cron.