bhatti volume clone
Make a point-in-time copy of a persistent volume.
Synopsis
bhatti volume clone <source-name> --name <new-name>
Description
Server-side copy of the volume's ext4 file. The clone is independent — writes to the source after the clone do not affect the copy, and vice versa.
The source volume must be detached when you clone it. If any sandbox has it mounted, the server returns 409 Conflict. Detach by stopping or destroying the sandbox using it.
Useful for:
- Snapshotting before a risky upgrade or migration.
- Forking a workspace for an experiment.
- Pre-warming a base volume before stamping out workers.
Examples
# Snapshot before upgrade
bhatti stop dev # detaches workspace
bhatti volume clone workspace --name workspace-pre-upgrade
bhatti start dev
Cloned workspace → workspace-pre-upgrade
# Fork for an experiment
bhatti volume clone workspace --name workspace-experiment
bhatti create --name experiment --volume workspace-experiment:/workspace
# Source still attached — fails
bhatti volume clone workspace --name copy
409 Conflict: source volume is attached — detach before snapshotting
Options
| Flag | Default | Description |
| ---- | ------- | ----------- |
| --name <string> | (required) | Name for the cloned volume. Must match the standard volume-name pattern. |
See Global flags for --url, --token, --json, --timing, --data-dir.
See also
bhatti volume backup— off-site copy via S3 (works while attached, but may be inconsistent)bhatti stop— detach by stopping the sandbox using it- API:
POST /volumes/:name/snapshot