Documentation
    Preparing search index...

    Module models/backup-retention

    Tiered (GFS) backup retention classifier.

    Given a list of backup entries and a keep-policy, returns the entries that should be DELETED. Mirrors the semantics of restic forget: for each tier (daily / weekly / monthly / yearly), the newest backup in each of the most recent N buckets is kept. An entry survives if any tier keeps it. keep_min is a safety net that guarantees a minimum number of retained backups regardless of age.

    Pure and I/O-free: no Saltcorn imports, so it is unit-testable without a database or a backup destination.

    Type Aliases

    BackupEntry
    RetentionPolicy

    Functions

    groupByTenant
    selectBackupsToDelete
    selectBackupsToDeleteGrouped