Skip to main content

warrantor-backup

File-level backup and disaster-recovery coordinator for AumOS. Coordinates backups of AumOS state: signed evidence stores (E1), attestation ledgers, AAE policy snapshots, RBAC role bindings, SLA target configs.

Each BackupTarget names:

  • name — human-readable identifier.
  • path — absolute source path (file or directory) to back up.
  • backup_path — directory where timestamped backup copies land.
  • retention_days — backups older than this are pruned.
  • frequency_hours — advisory cadence for external schedulers.

Properties

  • Content-addressed: each backup's filename embeds the first 8 hex chars of the SHA-256 of the backup content. run_backup is idempotent — the same source at the same timestamp produces the same backup path.
  • Verified restores: by default, restore recomputes the SHA-256 of the backup and matches it against the digest encoded in the filename, failing fast on tampering.
  • Atomic-ish writes: a copy lands in a .partial directory first and is renamed into place only after the digest is computed, so partial copies are never exposed under their final name.
  • Pluggable retention: prune_expired deletes backups older than each target's retention_days.

Usage

from warrantor_backup import BackupManager, BackupTarget

mgr = BackupManager()
mgr.add_target(
    BackupTarget(
        name="evidence",
        path="/var/aumos/evidence",
        backup_path="/backups/evidence",
        retention_days=30,
        frequency_hours=6,
    )
)
result = mgr.run_backup("evidence")
assert result.success

# Later, restore a specific backup:
mgr.restore("evidence", result.backup_path)

# Discover and prune:
mgr.list_backups("evidence")
mgr.prune_expired()

Development

pip install -e ".[dev]"
pytest
ruff check .

Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

warrantor_backup-1.0.0-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file warrantor_backup-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for warrantor_backup-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f4690b4a55eb0c60d2b5a2f3830c0bf8cd785950310dda2b8a4e4ed9da6db52e
MD5 56b6517f6268b05e3cbb62b2f1ec7b4a
BLAKE2b-256 ae20469189c180b51c1fde90651f4f7f0a3547bb76b2ea41f23234d05c3d9390

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.0 This release

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page