Skip to main content

Module backup

Module backup 

Source

Enums§

BundleSelection
Which refs the S3 bundle should contain, derived from the effective backup_refs.

Functions§

disk_line
A host-level disk line for the push summary. ✓ when healthy, ⚠ … low when the caller judged it low. Informational — never affects the backup.
history_key
latest_key
parse_receive_refs
Parse post-receive stdin (<old-sha> <new-sha> <refname> per line) into the list of updated ref names.
ref_matches
Does a ref name (e.g. refs/heads/main) match a backup_refs pattern? **/* match everything; a full ref matches exactly; a bare branch name (main) matches refs/heads/<name>.
repo_name
resolve_bundle_refs
Resolve the effective backup_refs into a concrete bundle selection so the S3 bundle contains ONLY the selected branches (a non-selected branch is then genuinely absent from S3).
run_backup
should_back_up
Should a push that updated updated_refs trigger the S3 backup, given the configured backup_refs?
summarize_refs
Build the per-ref summary block printed to the hook’s stdout after a push — one line per pushed ref (in receive order) showing which durable tiers it reached.