Skip to content

bhatti image save

Snapshot a running sandbox’s filesystem and save it as a reusable image.

bhatti image save <sandbox> —name <image-name>

Captures the current state of the sandbox’s rootfs (every file written since boot) and writes it to a new ext4 image owned by the user. The sandbox keeps running; the save is read-only from its perspective.

Only the rootfs is captured — attached persistent volumes are not included. If your sandbox stores work in a volume, save the volume separately with bhatti volume clone and recreate the attachment when stamping out new sandboxes from the saved image.

The saved image is private to the user. To make it available to other users, use bhatti image share (server-only).

Terminal window
# Build a custom environment, then save it
bhatti create --name build --image minimal
bhatti exec build -- apt-get update && apt-get install -y nodejs
bhatti exec build -- npm install -g pnpm
bhatti image save build --name node-app
# saved "node-app" (512MB)
Terminal window
# Stamp out workers from the saved image
bhatti create --name worker-1 --image node-app
bhatti create --name worker-2 --image node-app
FlagDefaultDescription
--name <string>(required)Name for the saved image.

See Global flags for --url, --token, --json, --timing, --data-dir.