Volumes
Persistent volumes are ext4 filesystems that survive sandbox destruction. Create one, attach it at sandbox creation with --volume name:/mount, destroy the sandbox — the data stays.
| Command | Description |
|---|---|
bhatti volume create | Create a persistent volume. |
bhatti volume list | List your volumes and current attachments. |
bhatti volume delete | Delete a volume. Requires it to be detached. |
bhatti volume resize | Grow a volume. Cannot shrink. |
bhatti volume clone | Point-in-time copy. Source must be detached. |
bhatti volume backup | Back up to S3-compatible storage. Requires server S3 config. |
bhatti volume backup-list | List backups for a volume. |
bhatti volume restore | Restore from a backup. Volume must be detached. |
bhatti volume backup-delete | Delete a backup. |
Detached state
Section titled “Detached state”Four operations require the volume to have no sandbox attachments: delete, resize, clone, and restore return 409 Conflict while it belongs to a sandbox, even a stopped one.
Stop does not detach. It powers off the guest but preserves its volume attachment for the next boot. Destroying the sandbox releases the volume (its root disk is deleted); if you need a copy of the entire sandbox instead, use a named memory snapshot or fork. A filesystem snapshot captures only the root disk, not attached volumes.
backup works on attached volumes. The server quiesces each running guest, clones the volume locally, then thaws it before compression/upload. New agents freeze/thaw the filesystem (frozen); older agents sync only (sync_only). A backup of a volume without running guests (including one whose attached sandbox is stopped) has mode detached; older backups without recorded consistency can say unverified. Inspect the API’s consistency_mode metadata if you need to distinguish them; CLI backup-list currently omits this field. See Data & durability.
Quick patterns
Section titled “Quick patterns”# Prepare an unattached volume before attaching itbhatti volume create --name workspace --size 5120# Grow/clone a volume before attaching it; stop alone does not detachbhatti volume resize workspace --size 10240bhatti volume clone workspace --name workspace-pre-upgradebhatti create --name dev --volume workspace:/workspace
# Off-site backup (requires `backup` config block on server)bhatti volume backup workspacebhatti volume backup-list workspaceBackup configuration
Section titled “Backup configuration”backup, restore, backup-list, and backup-delete require an S3-compatible storage backend configured on the server. Without it, they return 501 Not Implemented with the message backup not configured — add backup section to config.yaml. See Configuration: backup.