Skip to content

[Feature] Backup retention policies (keep last N / TTL) #29

Description

@brendanPro

Summary: Automatically expire old successful backups according to keep-last-N and/or time-to-live rules, with UI visibility.

Objective / Problem

Operators can delete backups manually and GC unreferenced CAS objects, but there is no declarative retention (keep last N, expire after X days).

Proposed Solution

  1. Add retention fields (e.g. keepLast, ttl) on repository or backup policy.
  2. Controller prunes expired Succeeded backups and runs CAS GC safely (never delete objects still referenced).
  3. UI: show retention settings and next candidates for expiry.
  4. Start simple: keep-last-N or TTL; combine later if needed.

Context / Technical Constraints

  • Good first issue if scoped to one rule (keep-last-N) + tests; TTL can follow in the same issue or a PR series.
  • Must not prune Running/Failed without an explicit policy.

QA

  • With keepLast=2, a third success deletes the oldest Succeeded backup’s snapshot data (when unreferenced).
  • Objects still used by newer backups remain.
  • UI shows retention config.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions