Skip to main content

Restic Backups

Config-driven incremental Restic backups with built-in SOPS support.

🚀 Quick Start · 📚 Documentation

Why Restic Backups?

  • 💸 Reduce costs by sending deduplicated backups to lower-cost S3, S3-compatible, Glacier, or local storage. See the storage cost comparison.
  • 🐙 Back up GitHub at organization or individual repository level, including full Git history and optional LFS, metadata, wikis, and releases.
  • 🎙️ Back up iOS Voice Memos on macOS, with optional transcription, summarisation, and speaker diarization.
  • 🔐 Keep credentials and repository passwords encrypted in a SOPS-managed YAML configuration.

Install

make install-deps  # Homebrew tools, including restic, sops, git-lfs, gh, and uv
make install       # uv sync, including the dev group and Quarto

make init loads the selected configuration and initializes each enabled restic repository that does not already exist. It reports and skips disabled or initialized repositories, and does not back up files.

Run backups

Run without arguments for a friendly interactive TUI. Navigate with the arrow keys, select destinations with Space, and use the described menus to manage jobs, repositories, and snapshots:

uv run restic-backups

For cron, containers, and other batch jobs, use the same operations as explicit CLI commands:

uv run restic-backups job run documents --repository personal-b2
uv run restic-backups --help

See the CLI guide for commands, dry runs, audit logs, timestamped logging, and Prometheus metrics.

Configuration

Pass a plain YAML file explicitly:

uv run restic-backups --config config.yaml check-config

For SOPS, add --sops. The equivalent environment variables are RESTIC_BACKUPS_CONFIG and RESTIC_BACKUPS_SOPS=1; they also configure make config-check and make init.

The configuration separates:

  • storage: enabled or disabled S3-compatible services and mounted local filesystems, with S3 credentials kept on the relevant storage entry;
  • restic-repositories: encrypted repositories within storage, including the bucket/key prefix or local path, restic password, cache, and archive policy;
  • jobs: typed work linked to one or more restic repositories. files, github-repository, github-owner, and voice-memos jobs share the same destination and snapshot fields while defining their input under source. One github-repository job may incrementally maintain multiple repository URLs and snapshot their combined state together. One github-owner job discovers every repository visible to the active GitHub credentials before using that same multi-repository workflow. Local runs reuse gh auth login; unattended runs may read a token from an environment variable or mounted file. A dry run still performs read-only discovery so it can report the exact plan, but never runs Git or writes to restic.

Multiple restic repositories may use one storage backend, one job may write to several repositories, and several jobs may share one repository. The job TUI preselects a sole available destination; multiple destinations start unchecked. Disabling storage leaves its repositories and jobs visible but unselectable. Disabled storage and repositories may contain CHANGE_ME; all placeholders must be replaced before enabling them.

Data and source paths

Managed local artifacts use:

data/<storage-id>/<repository-path>/<job-id>/

This directory is created beside the selected configuration file. It is metadata/workspace organization, not a restriction on backup sources. Restic may back up absolute paths anywhere on the machine. List or run every job type through the same commands:

uv run restic-backups job list
uv run restic-backups job run documents

AWS Glacier

Use GLACIER_IR with restore: null for normal immediate restic access. Cold GLACIER and DEEP_ARCHIVE repositories require a configured retrieval tier, days, and timeout. Retrieval must also be acknowledged at runtime:

ALLOW_ARCHIVE_RETRIEVAL=1 uv run restic-backups generic restic run \
  --backup <job-id> restore latest --target <dir>

Storage-class changes apply only to new objects. Use a new key_prefix instead of mixing storage policies in one repository.

Documentation

make docs          # render docs/_site
make docs-preview  # local preview server

Start with the Quick Start. Never commit decrypted SOPS configuration or anything below data/.

For complete reachable Git history, multiple explicit repository URLs, owner discovery, and optional LFS objects, wikis, GitHub metadata, and release assets, see GitHub Backups.

Release files for restic-backups 0.1.13

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for restic-backups 0.1.13
File Size Uploaded
restic_backups-0.1.13.tar.gz 61.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for restic-backups 0.1.13
File Interpreter ABI Platform
restic_backups-0.1.13-py3-none-any.whl Python 3 none any Details

Total release size: 135.2 kB

Release files / restic_backups-0.1.13.tar.gz

Download URL restic_backups-0.1.13.tar.gz
Size 61.1 kB
Tags Source
SHA-256 checksum
How to use checksums
18cbe3b71625817e8d442c792135c4c1fad141b4f7f36878f208cda57a2e6c24
BLAKE2b-256 checksum
How to use checksums
ae4e1e938378d069dc2bed6bd660d2031bb39d93d7aa9d84f8bb45899bf5d5ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / restic_backups-0.1.13-py3-none-any.whl

Download URL restic_backups-0.1.13-py3-none-any.whl
Size 74.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f1a33c1f1ecff8b81f83d5a5d8604fe45fe7487f01ae6a02efb43513529408cb
BLAKE2b-256 checksum
How to use checksums
de2b2e43172846812dfd2d84414ff4a803e396305fc860fc55b3d8ee6eb922bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

0.1.13 This release

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page