Skip to content

Checkpoints and Forks

A checkpoint is a point-in-time capture of a runtime’s state, writable filesystem changes, and restore metadata such as vCPU, memory, CPU architecture, and pinned image hashes.

Create a runtime and write state into it:

Terminal window
runta run --name source-demo --cpus 2 --memory 1024
runta exec source-demo -- sh -lc 'echo hello-from-runtime > /tmp/hello.txt'

Create a checkpoint:

Terminal window
runta checkpoint create source-demo source-demo-checkpoint

List available checkpoints:

Terminal window
runta checkpoint ls

Restore the checkpoint into a new runtime:

Terminal window
runta checkpoint restore source-demo-checkpoint restored-demo

Verify that the restored runtime contains the captured state:

Terminal window
runta exec restored-demo -- cat /tmp/hello.txt

Fork the same checkpoint into another runtime:

Terminal window
runta checkpoint restore source-demo-checkpoint fork-demo