tool: disinto backup import — idempotent restore on fresh Nomad cluster #1058
Labels
No labels
action
backlog
blocked
bug-report
cannot-reproduce
in-progress
in-triage
needs-triage
prediction/actioned
prediction/dismissed
prediction/unreviewed
priority
rejected
reproduced
tech-debt
underspecified
vision
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: disinto-admin/disinto#1058
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal:
disinto backup import <infile.tar.gz>restores factory state on a freshly-initialized Nomad cluster (afterdisinto init --backend=nomad).Must be idempotent — running twice should produce the same end state, not errors or duplicate issues.
Input: tarball from sibling
disinto backup createissue. See that issue for schema.Behavior (in order):
ssh://git@codeberg.org/johba/disinto.git(or leave to manual mirror config — see open question below)git push --mirrorfromrepos/disinto-ops.bundleto new Forgejoissues/*.json: check if issue with that number exists on new Forgejo; if not, POST create; if exists, skip (idempotency)Open question for implementer: should step 2 programmatically configure the Codeberg → Forgejo pull mirror, or leave it as a manual runbook step after import? Recommend manual — avoids needing SSH deploy-key handling in a script.
File locations:
lib/disinto/backup.shbin/disinto backup import <file>dispatches hereFORGE_URL,FORGE_TOKEN(admin token) of target ForgejoAcceptance:
disinto-nomad-boxwith Nomad stack up and empty Forgejo:./bin/disinto backup import /tmp/out.tar.gzexits 0disinto-admin/disinto-opsrepo with all refs from bundlecurl .../api/v1/repos/disinto-admin/disinto/issues | jq 'length'≈ source countNote on Forgejo issue-number preservation: Forgejo's issue-create API auto-assigns the next integer; to preserve specific numbers you may need to create padding issues and close them, OR accept renumbering. Recommend: accept renumbering and log a mapping file
issue-number-mapping.jsonas part of the import output. Document this in the runbook.Blocks: #1037.
toolto tool: disinto backup import — idempotent restore on fresh Nomad cluster