restic

restic is a free, open-source backup program: 1 binary, encrypted and deduplicated snapshots, many storage backends. It runs every backup on my Mac through a small CLI my agent built.

restic is a command-line backup program for macOS, Linux, BSD and Windows. It ships as a single Go binary with no server to run. Every backup is a snapshot: encrypted, deduplicated, and readable on its own.

It is free, under the BSD 2-Clause licence. The latest release is 0.20.0, from 19th November 2026.

What it does

  • Encrypts everything before it leaves the machine. The repository password never goes to the storage side, so a stolen disk or a nosy cloud provider sees only ciphertext.
  • Deduplicates with content-defined chunking. A file that moved, or a large file with 1 changed block, costs almost nothing in the next snapshot.
  • Compresses data (repository format v2, since 0.14).
  • Writes to many backends: a local folder or external drive, SFTP, its own REST server, S3 and S3-compatible stores, Backblaze B2, Azure, Google Cloud Storage, and anything rclone reaches.
  • Verifies: restic check reads the repository structure, and --read-data re-reads every byte.
  • Restores a whole snapshot, 1 folder or 1 file, or mounts snapshots as a folder you browse in Finder (macOS needs macFUSE).

The commands I use

brew install restic

restic -r /Volumes/Backups/repo init                       # create a repository
restic -r /Volumes/Backups/repo backup ~/ai --exclude-file excludes.txt
restic -r /Volumes/Backups/repo snapshots                  # list snapshots
restic -r /Volumes/Backups/repo find "*.db"                # which snapshots hold a file
restic -r /Volumes/Backups/repo restore latest --target /tmp/restore --include ~/ai/notes
restic -r /Volumes/Backups/repo forget --keep-hourly 48 --keep-daily 30 --keep-weekly 12 \
  --keep-monthly 24 --keep-yearly 10 --prune
restic -r /Volumes/Backups/repo check
restic -r /Volumes/Backups/repo copy --repo2 /Volumes/ColdDrive/repo   # copy snapshots to a 2nd repository

Put the password in a file or a command rather than on the command line: --password-command "security find-generic-password -s my-restic -w" reads it from the macOS Keychain.

Pricing

restic costs nothing. You pay only for the storage: your own NAS and drives, or a cloud bucket by the GB.

Limits

  • No GUI. Scheduling, alerts and retention are yours to script. Front ends exist (Backrest, resticprofile) if you want one.
  • Lose the password, lose the backup. There's no recovery. Keep a 2nd copy in a password manager.
  • Pre-1.0. The maintainers keep repositories readable across releases, but they reserve the right to break things before 1.0.
  • Live databases need care. Copying a SQLite file while it's written can give you a broken copy. Back up a consistent copy instead (SQLite's online backup API, or VACUUM INTO).
  • forget doesn't free space until prune runs, and prune is slow on a large repository on a NAS.

Alternatives

Tool Difference
BorgBackup Similar model, very efficient, but SSH-only remotes
Kopia Same idea with a built-in GUI and server
Time Machine Built into macOS, no encryption control, no versioned 2nd target
Arq Polished paid Mac app, cloud-first

I picked restic for the single binary, the plain CLI an agent can drive, and the --json output on most commands.

How I use it in NicAI

All my backups run through Backupee, a small Python CLI my agent wrote on top of restic in November 2026. It replaced a handful of older backup scripts. It has no window and sends no alert of its own.

  • 1 config file (TOML) lists the jobs, sources, excludes, schedules and retention.
  • 1 restic repository on my NAS, encrypted, with its password in the macOS Keychain and a copy in my password manager.
  • Tier 1, every hour: code, my SQLite databases, these notes, app data, settings and keys. About 120 GB.
  • Tier 2 and my music library, daily at night. The first run is the slow one; after that, deduplication keeps the daily runs short.
  • Retention: 48 hourly, 30 daily, 12 weekly, 24 monthly and 10 yearly snapshots.
  • A cold SSD. When I plug it in, a 2nd LaunchAgent copies the latest snapshots onto it with restic copy, checks them and ejects the drive. My scanned paper archive goes straight onto it, because the NAS is that archive's only other home (see Scanee: my own scan-to-archive pipeline).
  • Restore tests. A scheduled check plus a real restore of a sample from Tier 1, so I know the backup works, not only that it ran.
  • Databases: a live SQLite file is never copied while it's written. Backupee stages a consistent copy first. My music player's library database is backed up hourly with the music next to it, so both restore together (see Hifee: my own music player for the Mac).

Commands an agent runs on it:

backupee.py status --json                 # last run, age and size per job, checks, cold copy
backupee.py find "*.sqlite"               # every snapshot that holds a match
backupee.py restore ~/ai/notes --at 2026-11-20 --to /tmp/restore   # never overwrites

Alerts belong to Pulsee (see Pulsee: the watchdog for my Mac and my AI jobs). Backupee writes a status JSON file; Pulsee reads it and turns red when a job is late, the repository check fails or the cold copy is older than 45 days. 1 place for every alert keeps the noise down.

The lesson from the build: restic itself was the easy part. Most of the work went into deciding what not to back up, and into the guards around it: a hung network share that stalls a backup gets killed after 45 minutes, and every change is tested on a scratch repository first.

Further reading

NicAI
Written by NicAI, Nic's AI assistant, for his personal knowledge base. Researched and drafted by the model, not hand-written by Nic. Verify anything you plan to act on.