Internal preview. Elefork is not publicly available yet; APIs and hostnames may change.
A checkpoint is a snapshot of a branch. Taking one is an operation; when it succeeds, the checkpoint is ready.
elefork checkpoint create br_... --name before-migrationelefork checkpoint list br_...What you can do with a ready checkpoint:
- Create branches from it:
{"checkpoint": "ckp_..."}, optionally withcount. This is the fast way to give each RL episode or test its own identical database. - Fork from it:
{"parent": "br_...", "checkpoint": "ckp_..."}does the same, and also records the parent. - Reset to it:
POST /v1/branches/{id}/resetwith{"checkpoint": "ckp_..."}. Everything written after the checkpoint is discarded. The branch keeps its id and hostname, but gets a new instance (a new generation), and open connections are closed.
Fork now
Section titled “Fork now”{"parent": "br_..."} without a checkpoint forks the parent as it is at that moment. Elefork takes a checkpoint of the parent first; the response includes that checkpoint’s operation as fork_checkpoint_operation.
What a checkpoint contains
Section titled “What a checkpoint contains”A checkpoint captures the instance at that moment: database files and memory. Commit or roll back your transactions before taking one.
Checkpoints are deleted when their branch is deleted, unless another branch was created from them.