Skip to main content

Time Machine-style personal backup orchestrated by Python & uv

Project description

TimeVault

CI PyPI Python License

Snapshot what matters, remember how to rebuild the rest.

Time Machine-style personal backup orchestrated by Python & uv.

Overview

TimeVault is a modern backup solution for macOS and Linux, providing:

  • Hourly, daily, weekly deduplicated snapshots of user data
  • Re-install manifest generation for applications and system packages
  • Restic-backed with client-side encryption (AES-256) and Keychain/keyring support
  • Persistent configuration via ~/.config/timevault/config.yaml

Quick Start

# Run directly (no install needed)
uvx timevault init --repo /path/to/repo --password <pw>
uvx timevault backup

# Or install globally
uv tool install timevault
timevault backup

Usage

# Initialize repository and store credentials in keyring
timevault init --repo /path/to/repo --password <pw>

# Run a backup (uses config file or platform defaults)
timevault backup

# Back up specific paths
timevault backup ~/Documents ~/Projects

# Back up with a retention policy file
timevault backup --policy policy.yaml

# Mount latest snapshot as a FUSE volume
timevault mount

# Restore a file or directory
timevault restore <snapshot> <path> --target /tmp/restore

# List available snapshots
timevault snapshots

# Verify repository integrity
timevault check

# Reinstall software from manifests (macOS)
timevault brew-replay

Configuration

Create ~/.config/timevault/config.yaml to persist settings:

repo: "sftp:user@host:/backups/timevault"
mount_path: "/Volumes/TimeVault"

backup_paths:
  - path: "~"
    tag: "home"
    exclude:
      - "~/Library"
  - path: "~/Library"
    tag: "library"
    exclude:
      - "~/Library/CloudStorage"
      - "~/Library/Caches"

exclude_patterns:
  - ".DS_Store"
  - "*.tmp"

retention:
  hourly: 24
  daily: 7
  weekly: 4
  monthly: 12
  yearly: 3

See examples/ for macOS and Linux example configs.

Precedence: CLI flags > environment variables > config file > keyring/defaults.

Features

  • Snapshot Management: Create, browse, and restore backups
  • Retention Policies: Flexible YAML-based retention (hourly/daily/weekly/monthly/yearly)
  • Manifest Generation: Auto-generate reinstall manifests (Homebrew/MAS on macOS; dpkg/rpm/snap/flatpak on Linux)
  • Exclude Patterns: Global excludes in config, per-path excludes, and policy-file excludes are merged
  • FUSE Integration: Mount snapshots as regular volumes for browsing
  • Keyring Integration: Repository credentials stored securely in the system keyring

Development

Requires Python 3.11+.

git clone https://github.com/rappdw/timeless.git
cd timeless
uv venv && uv pip install -e ".[dev]"

# Run tests
uv run pytest

# Lint and format
uv run ruff check .
uv run ruff format --check .

# Type check
uv run mypy --strict .

License

Apache-2.0. See LICENSE for details.

Project details


Download files

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

Source Distribution

timevault-0.2.2.tar.gz (40.3 kB view details)

Uploaded Source

Built Distribution

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

timevault-0.2.2-py3-none-any.whl (29.1 kB view details)

Uploaded Python 3

File details

Details for the file timevault-0.2.2.tar.gz.

File metadata

  • Download URL: timevault-0.2.2.tar.gz
  • Upload date:
  • Size: 40.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for timevault-0.2.2.tar.gz
Algorithm Hash digest
SHA256 43f9188ecac086af9db1c6c249f5aa6e2ca8494eca978268713ac5b43565d652
MD5 e31405fcce4ac65848d7fefed47674a0
BLAKE2b-256 5bce0f543f37ff40fd478958d9a21ce8cd8087ddb867068ccb35fc66d706e3b4

See more details on using hashes here.

Provenance

The following attestation bundles were made for timevault-0.2.2.tar.gz:

Publisher: publish.yml on rappdw/timeless

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file timevault-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: timevault-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 29.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for timevault-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c92019cbc29d1853728ceacf9429a9b5823213bab8e823e5ce5f815ee79d4197
MD5 b792598247d13da691e1abe754ad7921
BLAKE2b-256 6f9c1424bd59366b351e925f037e023d8f89fd6d7e7928e0829ebc2b89bf5331

See more details on using hashes here.

Provenance

The following attestation bundles were made for timevault-0.2.2-py3-none-any.whl:

Publisher: publish.yml on rappdw/timeless

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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