feat: periodic Forgejo backup to protect issue tracker data #9

Closed
opened 2026-03-28 10:37:28 +00:00 by dev-bot · 1 comment
Collaborator

Problem

The Forgejo instance runs inside a Docker volume (disinto_forgejo-data). If the containers or volumes are destroyed, all issues, PRs, review comments, and project history are lost. Git repo data survives on mirrors (Codeberg, GitHub), but the issue tracker does not.

Design

Add a periodic forgejo dump to export the Forgejo database (issues, users, PRs, comments, labels) to a compressed archive. Store the backup in the ops repo or a dedicated backup location.

Considerations

  • forgejo dump produces a zip with the database, repos, and config
  • Only the database portion is critical (repos are mirrored elsewhere)
  • Could run as a cron job inside the agents container, or as a supervisor health check
  • Backup destination options: ops repo, host filesystem, or object storage
  • Retention policy: keep N most recent dumps

Why not mirror issues to external forges?

The factory uses a single internal Forgejo API regardless of where mirrors go (Codeberg, GitHub, or both). Keeping one API surface is simpler than adapting to multiple external forge APIs.

Acceptance criteria

  • A cron job or supervisor health check runs forgejo dump periodically (daily or configurable)
  • Backup archive is stored in a persistent location outside the Docker volume (ops repo or host filesystem)
  • A retention policy keeps at most N recent backups and removes older ones
  • The backup mechanism is documented in AGENTS.md or README.md
  • Failure to backup is logged and does not crash the supervisor

Affected files

  • supervisor/supervisor-run.sh or supervisor/preflight.sh — add backup health check or cron trigger
  • disinto-factory/SKILL.md or README.md — document backup configuration
## Problem The Forgejo instance runs inside a Docker volume (`disinto_forgejo-data`). If the containers or volumes are destroyed, all issues, PRs, review comments, and project history are lost. Git repo data survives on mirrors (Codeberg, GitHub), but the issue tracker does not. ## Design Add a periodic `forgejo dump` to export the Forgejo database (issues, users, PRs, comments, labels) to a compressed archive. Store the backup in the ops repo or a dedicated backup location. ### Considerations - `forgejo dump` produces a zip with the database, repos, and config - Only the database portion is critical (repos are mirrored elsewhere) - Could run as a cron job inside the agents container, or as a supervisor health check - Backup destination options: ops repo, host filesystem, or object storage - Retention policy: keep N most recent dumps ## Why not mirror issues to external forges? The factory uses a single internal Forgejo API regardless of where mirrors go (Codeberg, GitHub, or both). Keeping one API surface is simpler than adapting to multiple external forge APIs. ## Acceptance criteria - [ ] A cron job or supervisor health check runs `forgejo dump` periodically (daily or configurable) - [ ] Backup archive is stored in a persistent location outside the Docker volume (ops repo or host filesystem) - [ ] A retention policy keeps at most N recent backups and removes older ones - [ ] The backup mechanism is documented in AGENTS.md or README.md - [ ] Failure to backup is logged and does not crash the supervisor ## Affected files - `supervisor/supervisor-run.sh` or `supervisor/preflight.sh` — add backup health check or cron trigger - `disinto-factory/SKILL.md` or `README.md` — document backup configuration
gardener-bot added the
backlog
label 2026-04-05 13:46:51 +00:00
disinto-admin removed the
backlog
label 2026-04-05 13:48:10 +00:00

not relevant now

not relevant now
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
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: disinto-admin/disinto#9
No description provided.