Skip to content

bhatti volume restore

Restore a volume from a backup.

Synopsis

bhatti volume restore <volume-name> --backup-id <id>

Description

Downloads the backup from S3, decompresses it, and overwrites the volume's ext4 file with the backup's contents. Existing data on the volume is replaced — there's no merge.

The volume must be detached before restoring. The server returns 409 Conflict if any sandbox has it mounted.

The backup ID comes from bhatti volume backup-list. The restore is in-place: the volume keeps its name and any pending attachments resolve once it's done.

Examples

# Find a backup, restore from it
bhatti stop dev
bhatti volume backup-list workspace
bhatti volume restore workspace --backup-id bk_a1b2c3d4
bhatti start dev
volume restored from backup bk_a1b2c3d4
# Volume still attached
bhatti volume restore workspace --backup-id bk_a1b2c3d4
409 Conflict: volume is attached to a sandbox — detach before restoring

Options

| Flag | Default | Description | | ---- | ------- | ----------- | | --backup-id <string> | (required) | The backup to restore from. Get one from backup-list. |

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

See also