Backup pattern: tangled-knot now, sturdy size-based rotation later #3

Open
opened 2026-05-23 20:54:25 +00:00 by coilysiren · 0 comments
Owner

Originally filed by @coilysiren on 2026-05-23T01:42:23Z - https://github.com/coilysiren/infrastructure/issues/291

Tangled knot backup (immediate need)

The Tangled knot at tangled.coilysiren.me (deployed via #280, fronted via Traefik in #288) has no backup. Its data is /var/lib/tangled-knot - git repos plus the SQLite knotserver.db. Cheap to back up: a tar or snapshot of one directory.

For now, a knot-specific backup script or timer that tars /var/lib/tangled-knot. Naturally pairs with the autodeploy timer's backup-before-deploy sandwich (so deploys are safe) and a periodic backup independent of deploys.

Future: sturdy file-size-based backup pattern

The eventual goal is a really sturdy backup pattern across the homelab, but not today.

Direction: file-size-based rotation, not last-in-based. Instead of "keep last N backups," keep backups until the total backup directory size hits a threshold, then rotate the oldest out. Bounds disk use predictably across services with very different backup sizes.

When the general pattern lands, the tangled-knot backup and Forgejo's (see #269) both align to it. Until then, each service can ship a working-but-simple per-service backup script.

_Originally filed by @coilysiren on 2026-05-23T01:42:23Z - [https://github.com/coilysiren/infrastructure/issues/291](https://github.com/coilysiren/infrastructure/issues/291)_ ## Tangled knot backup (immediate need) The Tangled knot at tangled.coilysiren.me (deployed via #280, fronted via Traefik in #288) has no backup. Its data is `/var/lib/tangled-knot` - git repos plus the SQLite `knotserver.db`. Cheap to back up: a tar or snapshot of one directory. For now, a knot-specific backup script or timer that tars `/var/lib/tangled-knot`. Naturally pairs with the autodeploy timer's backup-before-deploy sandwich (so deploys are safe) and a periodic backup independent of deploys. ## Future: sturdy file-size-based backup pattern The eventual goal is a really sturdy backup pattern across the homelab, but not today. **Direction: file-size-based rotation, not last-in-based.** Instead of "keep last N backups," keep backups until the total backup directory size hits a threshold, then rotate the oldest out. Bounds disk use predictably across services with very different backup sizes. When the general pattern lands, the tangled-knot backup and Forgejo's (see #269) both align to it. Until then, each service can ship a working-but-simple per-service backup script.
coilysiren added
P2
and removed
P1
labels 2026-05-31 07:00:57 +00:00
Sign in to join this conversation.
No labels
P0
P1
P2
P3
P4
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
coilyco-flight-deck/infrastructure#3
No description provided.