box export: a box's state that survives the box (and the host) #70
Labels
No labels
blocked
blocker:ci-red
blocker:conflict
blocker:drill-pending
blocker:unrequested
bug
claimed
documentation
enhancement
epic
merge-next
needs-triage
ready
release
scope:cli
scope:drill
scope:host
scope:installer
scope:templates
scope:tiers
stale
state:addressing
state:bots-reviewing
state:building
state:needs-human
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: heavy-duty/box#70
Loading…
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?
Asked for by @danmt on #66, and a prerequisite for the "stop, export, remove every box before you upgrade" flow he wants the installer to enforce:
The gap
Right now nothing a box holds survives the box:
box snapshotmakes an in-box checkpoint.box rmdeletes the box and every snapshot it has (box rm --help: "Delete a box and every snapshot it has. This cannot be undone"), so a snapshot cannot outlive its box.box new --from <box>/<snap>clones to a new box — independent (it isincus copy), so it survivesrmof the source, but it still lives on the same host and gets the same stack rebuilt under it. It is not an artifact you can carry off the machine or keep across a teardown.So the honest instruction today is "copy what you need out by hand (
box shell/box exec) before yourm." For the upgrade flow to be safe — down, export, rm, upgrade, re-import — there has to be an export that produces a portable, host-independent artifact.Shape (starting point, for discussion)
box export <box> [<file>]→ a single file (Incus already has the primitive:incus exportwrites a backup tarball of an instance and its snapshots). Default name<box>-<snapshot-or-live>.tar.gz.box import <file> [--name <box>]→ mint a box from that artifact, re-stamped onto the current stack (re-applyuser.box.*, re-runreset_identityso auth state does not silently ride along unless intended).incus exportcan do either.)box downfirst for a consistent artifact? Probably require down, or snapshot-then-export.reset_identityguards on clone.Why it blocks the installer flow
#66 makes
install.shrefuse to proceed while boxes exist (per your "make sure there are no active boxes that can be potentially lost"). That refusal is only humane if there is a real way to preserve a box first. Untilbox exportexists, the refusal has to tell people to copy data out of the box by hand — which is the honest-but-lossy state we are in. This issue is what upgrades that instruction to "export, keep the file, re-import after."Related: #67 (version-aware upgrade — the "magical" path that would migrate instead of refusing).
🤖 Generated with Claude Code