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 and initializes each enabled store that does not already exist. It reports and skips disabled or initialized stores, and does not back up files.

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: CLI selections linked to a store, local source paths, and an optional restic snapshot tag (defaulting to the backup 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 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 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 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.2.tar.gz (32.1 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.2-py3-none-any.whl (39.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: restic_backups-0.1.2.tar.gz
  • Upload date:
  • Size: 32.1 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.2.tar.gz
Algorithm Hash digest
SHA256 87a0703b08d5e412ae07de262d332bcef9766509cf44258dbb6212089311870e
MD5 d5d9fad48597e52ceb8fef430c940a79
BLAKE2b-256 2efa220ab2d9250e59ea6128da24cbde43503441d7bf63fd0d19b94e14cdceea

See more details on using hashes here.

File details

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

File metadata

  • Download URL: restic_backups-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 39.8 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 16f2e8ab0a27b17728ecf58f24fd81cb59acc1e9af8b77a3e4af79c468955675
MD5 e34066e57abeb912fd1eb032e0c5c58f
BLAKE2b-256 45deff6782b0d5a0e63b034e7ada07e45cad3ea7d75c86c43a1dc06d0d62d133

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