PandaStack

Snapshots and forks

Capture VM state in seconds. Fork running VMs in milliseconds.

Snapshots capture a sandbox's memory + disk so you can restore from them later. Forks create a new sandbox from an existing live sandbox. You can list, get, and delete your snapshots, and create a new sandbox from one with from_snapshot.

CLI

# Create a snapshot from a sandbox
pandastack sandbox snapshot <id>

# List / inspect / delete your snapshots
pandastack snapshot list
pandastack snapshot list --sandbox <sandbox-id>   # only snapshots from this sandbox
pandastack snapshot get <snapshot-id>
pandastack snapshot delete <snapshot-id>

# Create a sandbox from a snapshot
pandastack sandbox create --from-snapshot <snapshot-id>

pandastack sandbox fork <id>
pandastack sandbox pause <id>
pandastack sandbox resume <id>
pandastack sandbox hibernate <id>
pandastack sandbox wake <id>
pandastack sandbox set-ttl <id> 1h

Python

snapshot = sandbox.snapshot()                 # create from a live sandbox

# List / inspect / delete your snapshots
for s in client.snapshots.list():
    print(s["id"], s.get("template"), s["created_at"])
client.snapshots.get(snapshot_id)
client.snapshots.delete(snapshot_id)

# Create a new sandbox from a snapshot
restored = client.sandboxes.create(from_snapshot=snapshot_id)

fork = sandbox.fork(metadata={"branch": "experiment"})
forks = sandbox.fork_tree(3, metadata={"batch": "fanout"})

sandbox.promote()
sandbox.hibernate()
sandbox.wake()
sandbox.set_ttl(3600)
sandbox.set_persistent(True)
print(sandbox.lifecycle())

TypeScript

const snapshot = await sandbox.snapshot();            // create from a live sandbox

// List / inspect / delete your snapshots
const snaps = await client.snapshots.list();
for (const s of snaps) console.log(s.id, s.template, s.created_at);
await client.snapshots.get(snapshotId);
await client.snapshots.delete(snapshotId);

// Create a new sandbox from a snapshot
const restored = await Sandbox.create({ from_snapshot: snapshotId });

const fork = await sandbox.fork({ branch: "experiment" });
const forks = await sandbox.forkTree(3, { batch: "fanout" });

await sandbox.promote();
await sandbox.hibernate();
await sandbox.wake();
await sandbox.setTtl(3600);
await sandbox.setPersistent(true);
console.log(await sandbox.lifecycle());

API

POST   /v1/sandboxes/{id}/snapshots     # create a snapshot from a sandbox
GET    /v1/snapshots                     # list your snapshots (?sandbox_id= to filter)
GET    /v1/snapshots/{id}                # get one
DELETE /v1/snapshots/{id}                # delete (removes the record + stored copy)
POST /v1/sandboxes/{id}/fork
POST /v1/sandboxes/{id}/fork-tree
POST /v1/sandboxes/{id}/promote
POST /v1/sandboxes/{id}/hibernate
POST /v1/sandboxes/{id}/wake
GET /v1/sandboxes/{id}/lifecycle
PATCH /v1/sandboxes/{id}/lifecycle

On this page