Skip to main content

Restic Backups

YAML configuration and a Python CLI for running multiple restic repositories, with optional SOPS decryption. The package currently includes a complete macOS Voice Memos workflow for backup, transcription, summarisation, and speaker diarization.

Why

Create encrypted, deduplicated incremental backups that upload only new or changed data. This makes reliable off-site backups practical with cheaper storage options, without maintaining a separate backup script for every repository.

Backup payloads, generated metadata, model caches, and restores are excluded from Git by a default-deny .gitignore.

Install

make install-deps  # Homebrew: restic, sops, uv, ffmpeg, jq, coreutils
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.

CLI

Use the built-in help for available commands and options:

uv run restic-backups  # interactive arrow-key menu
uv run restic-backups --help
uv run restic-backups generic --help
uv run restic-backups voice-memos --help

The interactive menus include Help and Back at every level. Press Escape to go back or Ctrl+C to exit. Help stays at the current level and does not load configuration or access a repository. Generic write actions also offer a Space-toggleable Dry run checkbox so the operation can be inspected without changing repository data.

Command auditing is enabled by default and appends JSON records to audit-log.json in the current directory. Set RESTIC_BACKUPS_AUDIT=0 to disable it. Passwords and other secret-like argument values are redacted.

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: 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;
  • backups: jobs linked to a restic repository, local source paths, and an optional snapshot tag (defaulting to the job ID).

Multiple restic repositories may use one storage backend, and multiple backup jobs may share one restic repository. Disabled repositories may contain CHANGE_ME; all placeholders must be replaced before enabling one.

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. Resolve a managed directory without exposing credentials with:

uv run restic-backups generic backup data-dir voice-memos

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/.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

restic_backups-0.1.5.tar.gz (40.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

restic_backups-0.1.5-py3-none-any.whl (50.0 kB view details)

Uploaded Python 3

File details

Details for the file restic_backups-0.1.5.tar.gz.

File metadata

  • Download URL: restic_backups-0.1.5.tar.gz
  • Upload date:
  • Size: 40.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","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}

File hashes

Hashes for restic_backups-0.1.5.tar.gz
Algorithm Hash digest
SHA256 0eee5b3bb284871334a674fde9013ce8bbc1214a121c69f8ee1ec069ea3ad8a2
MD5 7d871f45850b68fbfb86632acb4fa02a
BLAKE2b-256 7691e63b4f28ab5e80478fdd59eec96fa6fe6868dab64433cc9c966d7512f805

See more details on using hashes here.

File details

Details for the file restic_backups-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: restic_backups-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 50.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","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}

File hashes

Hashes for restic_backups-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 8b67a337a808ec022a198f8d322db9f76aba8dda93e529048f43a34932ef9c86
MD5 62c707afe9e79751f1dcc1bba6bc1e92
BLAKE2b-256 ebceb922111d2f2cead4eeb5a22626e80ff4adeec4893cbee3d0cd7de7b659e8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page