> For the complete documentation index, see [llms.txt](https://docs.cedana.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cedana.ai/cedana-kubernetes/storage/what-we-checkpoint.md).

# What We Checkpoint

While we can move the state of your process (including both CPU and GPU state), there should be some careful consideration with open files.

Given this, we have three ways with which we currently deal with files that are being written to (as a restored or migrated process *expects* the file to have the exact same size so it can pick up where it left off). There are 2 scenarios we recommend for 2 different filesystem-writing regimes:

* files <\~ 1GB: *Default Behavior*
* files >> 1GB: *Volume snapshotting*

Each scenario is described below.

## Default Behavior

If you're writing files into the rootfs of the container, we just take them with us on the snapshot! We perform a diff of the filesystem and add it to our process/system-level checkpoint. This includes JIT compiled files, intermediate files created during install and more.

However, when files become very large >> 1GB, and persistence is necessary (if the files themselves are outputs of the run, like in physical simulations for example), we recommend using volumes.

## Volume Snapshotting

{% hint style="info" %}
This is still a very early work in progress! Please reach out to us if you're planning on using this.
{% endhint %}

The alternate method requires coordination with your CSI driver. We take advantage of the snapshotting primitives already present (<https://kubernetes.io/docs/concepts/storage/volume-snapshots/>), and take a reference to these with us; so when we restore, we restore from a Kubernetes Volume Snapshot.

## Persistent Volume Claims

If your workload uses `PersistentVolumeClaim`-backed volumes, Cedana also checkpoints the PVC objects that are attached to the pod.

During checkpointing:

* Cedana collects each PVC referenced by the pod.
* If the PVC is bound to a PV, Cedana patches that PV to use the `Retain` reclaim policy when needed.

During restore:

* Cedana recreates missing PVCs for the restored pod.
* If the original PVC was bound to a specific PV and that PV is still available, Cedana tries to reclaim it.
* If the PV cannot be reclaimed or is no longer present, Cedana falls back to dynamic provisioning by clearing the explicit `volumeName`.

This keeps volume-backed workloads restorable without requiring you to manually rewire storage objects after a checkpoint.
