Restic: Encrypted, Deduplicated Backups from the Command Line
Restic is a backup program driven from a command line. You initialize a repository — a local folder, an SFTP host, or object storage such as S3, Backblaze B2, or Google Cloud Storage — then run a backup command to capture files as a snapshot. Data is deduplicated, so repeat backups of a large folder only store what actually changed, and everything is encrypted before it leaves the machine. Snapshots are immutable and labeled with host, path, and optional tags, which makes it possible to compare two points in time, restore a single file from months ago, or mount the repository as a browsable filesystem. Retention policies and integrity checks keep the repository healthy over years.
Restic's design assumes storage you do not fully trust, so every chunk is encrypted and authenticated before upload. The same repository format works across backends, so a repository can move from USB drive to cloud storage without rewriting anything. Snapshot commands cover the details that matter: exclude patterns keep caches out, tags group backups by project, and the diff subcommand lists what changed between snapshots. Forgotten snapshots stay recoverable through keep-daily, keep-weekly, or keep-monthly retention rules, while prune reclaims the space once nothing references it. Checking a repository, optionally reading all data back, confirms the stored chunks are still intact. Mechanical comparisons of two directory trees are a different job, and Beyond Compare 5 handles that one.
Benefits of Using Restic
The case for Restic is that it makes reliable backups practical on storage you would not otherwise trust. Because deduplication is content based rather than filename based, moving or renaming a folder does not duplicate data, and a series of daily snapshots costs little more than the first one once the changes are small. Encryption happens on the client, so a cloud bucket can be rented from a provider you have no reason to trust with the contents. Snapshots are immutable and cheap, which means the correct response to an accidental deletion is usually restoring a file from yesterday rather than hunting through a recovery tool. The command-line interface is unfriendly to some newcomers, but it is also what makes automation straightforward: a scheduled script can back up, check integrity, apply retention, and report results in machine-readable form. Verification is built in rather than bolted on, and reading data back from the repository catches storage-level corruption before a restore attempt does.
Comments