> For the complete documentation index, see [llms.txt](https://docs.human-connection.org/human-connection/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.human-connection.org/human-connection/docs-354-kubernetes_cron_job_for_backups/deployment/volumes/volume-snapshots.md).

# Volume Snapshots

It is possible to backup persistent volumes through volume snapshots. This is especially handy if you don't want to stop the database to create an [offline backup](/human-connection/docs-354-kubernetes_cron_job_for_backups/deployment/volumes/neo4j-offline-backup.md) thus having a downtime.

Kubernetes announced this feature in a [blog post](https://kubernetes.io/blog/2018/10/09/introducing-volume-snapshot-alpha-for-kubernetes/). Please make yourself familiar with it before you continue.

## Create a Volume Snapshot

There is an example in this folder how you can e.g. create a volume snapshot for the persistent volume claim `neo4j-data-claim`:

```bash
# in folder deployment/volumes/volume-snapshots/
kubectl apply -f snapshot.yaml
```

If you are on Digital Ocean the volume snapshot should show up in the Web UI:

![Digital Ocean Web UI showing a volume snapshot](/files/-LevnKHTuCl531y26wdz)

## Provision a Volume based on a Snapshot

Edit your persistent volume claim configuration and add a `dataSource` pointing to your volume snapshot. [The blog post](https://kubernetes.io/blog/2018/10/09/introducing-volume-snapshot-alpha-for-kubernetes/) has an example in section "Provision a new volume from a snapshot with Kubernetes".

There is also an example in this folder how the configuration could look like. If you apply the configuration new persistent volume claim will be provisioned with the data from the volume snapshot:

```
# in folder deployment/volumes/volume-snapshots/
kubectl apply -f neo4j-data.yaml
```

## Data Consistency Warning

Note that volume snapshots do not guarantee data consistency. Quote from the [blog post](https://kubernetes.io/blog/2018/10/09/introducing-volume-snapshot-alpha-for-kubernetes/):

> Please note that the alpha release of Kubernetes Snapshot does not provide any consistency guarantees. You have to prepare your application (pause application, freeze filesystem etc.) before taking the snapshot for data consistency.

In case of Neo4J this probably means that enterprise edition is required which supports [online backups](https://neo4j.com/docs/operations-manual/current/backup/).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.human-connection.org/human-connection/docs-354-kubernetes_cron_job_for_backups/deployment/volumes/volume-snapshots.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
