ADR 0004: Own content-addressed repository format¶
Status: Proposed
Date: 2026-12-02
Context¶
Backups need dedup, compression, encryption, S3 and filesystem targets, and immutability. Existing tools (restic, kopia, borg) do this well but are built around file trees and their own CLI, not millions of individually versioned M365 items indexed in a database.
Decision¶
Implement a small repository format inside the project: BLAKE3 content addressing, fixed-size chunking (FastCDC possible later), packed blobs, zstd, AES-256-GCM, with filesystem and S3 backends. Details in Backup storage.
Consequences¶
Full control over item-level versioning, retention and Object Lock.
More code to own and test; the format is versioned and documented from day one, with a format spec page in the docs.
Alternative kept open: wrapping kopia’s repository as a backend if the in-house format proves too costly to maintain.