# Checkpoint and Restore

> Learn how to checkpoint and restore SlateDB databases

## Creating a Checkpoint

To create a checkpoint, use the `create_checkpoint` function provided by SlateDB.
This operation captures a consistent and durable view of the database state, anchored to a specific manifest version.

<!-- could not inline /home/runner/work/slatedb/examples/src/create_checkpoint.rs -->

## Refreshing a Checkpoint

To extend the lifetime of an existing checkpoint, use `Admin::refresh_checkpoint`.
This updates the checkpoint’s expiration time, ensuring that the referenced SSTs remain protected from garbage collection for the specified duration.

<!-- could not inline /home/runner/work/slatedb/examples/src/refresh_checkpoint.rs -->

## Deleting a Checkpoint

To remove a checkpoint, use `Admin::delete_checkpoint`.
This deletes the checkpoint metadata from the manifest, allowing the garbage collector to eventually reclaim any unreferenced SST files associated with that checkpoint.

<!-- could not inline /home/runner/work/slatedb/examples/src/delete_checkpoint.rs -->
