Skip to main content
Checkpoints capture the full state of a sandbox — memory, disk, and running processes — so you can restore it later or spin up multiple clones from the same point in time.

Create a Checkpoint

oc checkpoint create sb-abc123 --name my-checkpoint

oc checkpoint create <sandbox-id>

Snapshots the current state of a running sandbox and uploads it to S3.
FlagTypeDefaultDescription
--namestringCheckpoint name (required)
Output:
Checkpoint created: cp-7f3a1b2c (status: ready)
Name: my-checkpoint

List Checkpoints

oc checkpoint list sb-abc123

oc checkpoint list <sandbox-id>

Lists all checkpoints associated with a sandbox. Output:
ID            NAME            STATUS  SIZE     CREATED
cp-7f3a1b2c   my-checkpoint   ready   843.2 MB 2024-01-15T10:30:00Z
cp-2d9e4a1f   before-deploy   ready   801.5 MB 2024-01-14T09:00:00Z

Restore a Sandbox

oc checkpoint restore sb-abc123 cp-7f3a1b2c

oc checkpoint restore <sandbox-id> <checkpoint-id>

Reverts an existing sandbox in-place to the state captured in the checkpoint. All changes made after the checkpoint was created are discarded.

Spawn a New Sandbox from a Checkpoint

oc checkpoint spawn cp-7f3a1b2c
Or with a custom timeout:
oc checkpoint spawn cp-7f3a1b2c --timeout 600

oc checkpoint spawn <checkpoint-id>

Creates a brand-new sandbox from an existing checkpoint, leaving the original sandbox untouched. Useful for forking — run the same starting state in parallel.
FlagTypeDefaultDescription
--timeoutint300TTL for the new sandbox in seconds

Delete a Checkpoint

oc checkpoint delete sb-abc123 cp-7f3a1b2c

oc checkpoint delete <sandbox-id> <checkpoint-id>

Permanently removes a checkpoint and its stored data from S3.

Alias

oc checkpoint can also be invoked as oc cp:
oc cp create sb-abc123 --name quick-save
oc cp list sb-abc123

Examples

Save State Before a Risky Operation

oc checkpoint create sb-abc123 --name before-migration
oc exec sb-abc123 -- ./run-migration.sh

# Something went wrong — roll back
oc checkpoint restore sb-abc123 cp-7f3a1b2c

Fork a Sandbox for Parallel Testing

# Create a checkpoint with a known-good state
oc checkpoint create sb-abc123 --name test-base

# Spawn two independent sandboxes from it
ID1=$(oc checkpoint spawn cp-7f3a1b2c --json | jq -r '.id')
ID2=$(oc checkpoint spawn cp-7f3a1b2c --json | jq -r '.id')

# Run different experiments in each
oc exec $ID1 -- ./experiment-a.sh
oc exec $ID2 -- ./experiment-b.sh

Checkpoint vs Hibernate

CheckpointHibernate
Original sandboxKeeps runningStopped
Can fork / cloneYesNo
Restore targetAny sandboxSame sandbox only
Use caseBranching, testingPause and resume