bhatti volume backup
Back up a persistent volume to S3-compatible storage.
Synopsis
Section titled “Synopsis”bhatti volume backup <volume-name>
Description
Section titled “Description”Compresses (zstd) the volume’s ext4 file and uploads it to the S3-compatible bucket configured on the server. Returns a backup record with an ID, size, and S3 key.
The volume does not need to be detached for this to run. However, if writes are in flight at backup time, the snapshot may be inconsistent. For a guaranteed-consistent backup, stop the sandbox first:
bhatti stop dev # detaches volume, flushes guest writesbhatti volume backup workspacebhatti start dev # resumeRequires a backup block in the server’s config.yaml. Without it, the API returns 501 with backup not configured — add backup section to config.yaml. See Configuration: backup.
Backups are stored under the per-user S3 prefix configured by the server. Restore with bhatti volume restore.
Examples
Section titled “Examples”bhatti volume backup workspacebackup bk_a1b2c3d4 created (workspace, 5234567890 bytes)# JSON for scripting (capture the ID for later restore)backup_id=$(bhatti volume backup workspace --json | jq -r .id)echo "backed up: $backup_id"Options
Section titled “Options”This command takes only global flags. See Global flags for --url, --token, --json, --timing, --data-dir.
See also
Section titled “See also”bhatti volume backup-list— see existing backupsbhatti volume restore— recover from a backupbhatti volume clone— local point-in-time copy (no S3, no compression)- API:
POST /volumes/:name/backups