A snap is a storage branch point for boxes. It lets you save one file system state and reuse or fork it later.
Commands
sys9 run snap import <image-ref>
sys9 run snap fork <snap-id>
sys9 run snap fork --from-box <box-id>
sys9 run snap ls
sys9 run snap inspect <snap-id>
sys9 run snap file ls|stat|cat|get <snap-id> ...
sys9 run snap rm <snap-id>
Output
Default output is readable text:
snap importandsnap forkprintOK:plus the created snap id.snap lsprints a compact table.snap inspectprints a summary.snap rmprints a short confirmation.
Use JSON for automation:
sys9 run --json snap inspect <snap-id>
sys9 run --output json snap ls
Import an image
Bring in a new base from an external image:
sys9 run snap import public.ecr.aws/docker/library/alpine:3.20
Fork from a snap
Start another branch from an existing saved baseline:
sys9 run snap fork <snap-id>
Fork from a box
Stop the box first so the file system is quiet:
sys9 run box stop my-box
sys9 run snap fork --from-box my-box
Use --from-box when the state you want to save still lives in a box rather than in a previous snap.
List and inspect
sys9 run snap ls
sys9 run snap ls --attached false
sys9 run snap inspect <snap-id>
Browse files
sys9 run snap file ls <snap-id> /work/site
sys9 run snap file stat <snap-id> /work/site/index.html
sys9 run snap file cat <snap-id> /work/site/index.html
sys9 run snap file get <snap-id> /work/site/index.html ./index.html
A detached snap reads its immutable settled filesystem. An attached snap uses the same current file view as its owning box, so the command stays the same whether that box is running or stopped.