Skip to content

Checkpoints and Forks

Checkpoints capture the state of an existing runtime so that you can restore it into a new runtime later. The CLI command group is named snapshot; SDKs and the REST API use checkpoint terminology.

Create a runtime and write state into it:

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

Create a checkpoint:

Terminal window
runta snapshot create <source_runtime_display_name> <checkpoint_name>

List available checkpoints:

Terminal window
runta snapshot ls

Restore the checkpoint into a new runtime:

Terminal window
runta snapshot restore <checkpoint_name> <restored_runtime_display_name>

Verify that the restored runtime contains the captured state:

Terminal window
runta exec <restored_runtime_display_name> -- cat /tmp/hello.txt

Fork the same checkpoint into another runtime:

Terminal window
runta snapshot restore <checkpoint_name> <fork_runtime_display_name>