Skip to main content
Guide

Capture and restore snapshots

Freeze a running sandbox into a snapshot. Restore that state into new sandboxes when you need a primed environment without repeating setup.

A snapshot is a group-scoped copy of a sandbox at one point in time. Use it after you install dependencies, clone a repo, or warm a model.

Create a snapshot and restore it

Capture a sandbox after you prime it, then create another sandbox from the snapshot.

  1. In the ACA Sandboxes portal, open your sandbox group.
  2. Select Sandbox in the left menu.
  3. Select a running Sandbox.
  4. From the sandbox's toolbar, select Snapshot and click Create.
  5. A snapshot ID will appear.
  6. Go to the Snapshots page and select a Snapshot.
  7. Select Create sandbox from the toolbar.
SNAP_NAME="getting-started-snap-$RANDOM"
LOCAL_FILE=/tmp/aca-sample-payload.txt

aca sandbox create --disk ubuntu --label name=snap-source

printf 'data-before-snapshot' > "$LOCAL_FILE"
aca sandbox fs write -l name=snap-source --path /tmp/payload.txt --file "$LOCAL_FILE"

aca sandbox snapshot -l name=snap-source --name "$SNAP_NAME"

aca sandbox create --snapshot "$SNAP_NAME" --label name=snap-restored

aca sandbox fs cat -l name=snap-restored --path /tmp/payload.txt

List and inspect snapshots

Snapshots belong to the sandbox group, not to the source sandbox page.

  1. In the ACA Sandboxes portal, open the sandbox group.
  2. Select Snapshots.
  3. Select a snapshot row to open its details, including source sandbox, size, and creation time.
aca sandboxgroup snapshot list

aca sandboxgroup snapshot get --selector "name=$SNAP_NAME"

Delete a snapshot

Delete snapshots you no longer need. Deleting a snapshot does not delete sandboxes that were already restored from it.

  1. In the ACA Sandboxes portal, open the sandbox group.
  2. Select Snapshots.
  3. Select the snapshot, then select Delete.
  4. Confirm the deletion.
aca sandboxgroup snapshot delete --selector "name=$SNAP_NAME"

Notes

  • Restore needs a short warm-up.
  • Snapshots depend on the disk image they were created from.
  • Fan out from one snapshot when many sandboxes need the same primed state.