Retention module
Layer 11. Lifecycle. Lifecycle It decides how long a backup is kept.
Source: modules/retention/.
At a glance
Section titled “At a glance”| CLI | shc retention |
| Subcommands | 2 |
| HTTP endpoints | see the route reference |
| Events emitted | none |
| Error codes | see the error code reference |
| Service classes | none |
| Cross-module deps | backup |
Source layout
Section titled “Source layout”modules/retention/├── types.go└── commands/CLI entry points
Section titled “CLI entry points”shc retention: manage backup retention policies
Responsibilities
Section titled “Responsibilities”The retention module implements retention policies: rules that
govern how long backups, completed jobs, and audit entries are kept
before pruning. It is a thin CLI surface (shc retention) over the
retention configuration stored in the database; the actual pruning
runs in the maintenance cron tier
(see default.yaml maintenance.retention_cleanup).
shc@docs:~$