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.

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, deduplicates enabled stores referenced by a backup, and runs restic init once per repository. It does not back up files and is unnecessary for an existing repository.

CLI

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

uv run restic-backups --help
uv run restic-backups generic --help
uv run restic-backups voice-memos --help

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:

  • credentials: reusable S3-compatible authentication;
  • restic-stores: endpoint, region, bucket, key prefix/password, and optional archive policy;
  • backups: jobs linked to a store by restic-store-id.

One credential may serve many stores, and multiple backups may share a store. Disabled stores may contain CHANGE_ME; all placeholders must be replaced before enabling one.

Data and source paths

Managed local artifacts use:

data/<store-id>/<bucket>/<key-prefix>/<backup-id>/

This 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 data-dir voice-memos

AWS Glacier

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

ALLOW_ARCHIVE_RETRIEVAL=1 uv run restic-backups generic run \
  --backup <backup-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 Quarto guide. 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.1.tar.gz (28.4 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.1-py3-none-any.whl (35.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: restic_backups-0.1.1.tar.gz
  • Upload date:
  • Size: 28.4 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.1.tar.gz
Algorithm Hash digest
SHA256 bdebd4ac708477a03077a408d94a32fb44bc8a3ae9820c4eb2dcce61ebb31af1
MD5 2e70f4c4d8db1555f8b24a9808717156
BLAKE2b-256 1535ef2ce71440bbc40b96b8b289bb1503b0df875700be547d00a4397d126cc0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: restic_backups-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 35.3 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4466838b7ac94f2234192593df6260684d12444a44d7f8b7cdebe10f6aabb8f7
MD5 df22c59ec0be20fcc0dc8bf8624f8243
BLAKE2b-256 5b3e1e884886e77c83eb61c0e351656d992ebd76794856de0aa66cfcb7f29c14

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