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.1.tar.gz (40.2 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.1-py3-none-any.whl (29.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: timevault-0.2.1.tar.gz
  • Upload date:
  • Size: 40.2 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.1.tar.gz
Algorithm Hash digest
SHA256 d599ae0aaed591d0f4a3fe1f22f9e38d6d28db8104f9a60d889e0a617b1a205c
MD5 806c0684d88296360b1327f9f8fa89f7
BLAKE2b-256 4b7519f4f4c32f31872d8cada248a6a143418d2ba23e9223f9f6612b3b2ed439

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: timevault-0.2.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c39f294ad59a179ceafe6f9e5c4683dd9f8baec79c9b80f79cdd072817ea1e93
MD5 3e222f979859826218d9a72421a9c13a
BLAKE2b-256 47ea708fdfe0fc63ade7e7659c758fc09e2da33e76979c2ce5a226278ac5269d

See more details on using hashes here.

Provenance

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