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.3.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.3-py3-none-any.whl (29.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: timevault-0.2.3.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.3.tar.gz
Algorithm Hash digest
SHA256 f31e3234234303bffe99b7b8a495bf285f4e28ace12331219e559e279aef428d
MD5 3dc05e39521d1a23b7a3025fd3cbe165
BLAKE2b-256 073561c9edaf633c8ca2021b6e8fae40ab4fa6fc8c49b37b97916dd212d1a22d

See more details on using hashes here.

Provenance

The following attestation bundles were made for timevault-0.2.3.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.3-py3-none-any.whl.

File metadata

  • Download URL: timevault-0.2.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 39b20d34fe35d13d5587f288150956c3f957a87ec709edb9cea0ee927a885b42
MD5 fe63de3f30fa121679ff736dc1b17027
BLAKE2b-256 8bb0684c6e2608c6e077bffcdd4ff3ccbb2dcc27f55abe5dce852647377f1641

See more details on using hashes here.

Provenance

The following attestation bundles were made for timevault-0.2.3-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