--- title: "Restore a Volume from a Snapshot" slug: "restore-a-volume-from-a-snapshot-2-5" updated: 2026-11-03T22:08:05Z published: 2026-11-03T22:08:05Z canonical: "docs.vastdata.com/restore-a-volume-from-a-snapshot-2-5" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.vastdata.com/llms.txt > Use this file to discover all available pages before exploring further. # Restore a Volume from a Snapshot To restore a PVC from an existing snapshot, attach the snapshot to another PVC. You can choose to provide read-only or read/write access to the restored volume using `accessModes` options in the YAML configuration file: - If attached in read-only mode (`ReadOnlyMany`), the restored volume is mounted to the snapshot's source folder (`<snapshot path>/.snapshot/<snapshot name>`). It does not have a view or a quota on the VAST cluster, not can it be expanded through Kubernetes volume expansion. - If attached in read/write mode (`ReadWriteMany`), a view and a quota is created automatically for it on the VAST cluster, and the restored volume is mounted to the view's directory. The restored volume can be expanded like any other regular volume. To restore a volume: 1. Create a YAML configuration file to attach the snapshot to a PVC. In the file (see the example below for correct indentation and line breaks when specifying the keywords): - In `metadata`: - `name` is the Persistent Volume Claim (PVC) name for the volume that will contain the restored data. - In `spec`: - `storageClassName` is the name of the storage class used for the PVC. - In `dataSource`: - `name` is the PVC name of the volume that stores the snapshot. - In `accessModes`, specify the access mode for the restored volume: - `ReadWriteMany` for read/write - `ReadOnlyMany` for read-only For example: ```plaintext apiVersion: v1 kind: PersistentVolumeClaim metadata:  name: pvc-restore spec:  storageClassName: vastdata-filesystem  dataSource:    name: snapshot-pvc-1    kind: VolumeSnapshot    apiGroup: snapshot.storage.k8s.io  accessModes:    - ReadWriteMany  resources:    requests:      storage: 1Gi ``` 2. Deploy the YAML configuration file: ```plaintext kubectl apply -f vast-csi-deployment.yaml ``` The output is similar to the following: ```plaintext persistentvolumeclaim/pvc-restore created ``` 3. Verify that the restored PVC can be displayed: ```plaintext kubectl get pvc ``` The output is similar to the following: ```plaintext NAME        STATUS VOLUME                                   CAPACITY ACCESS MODES STORAGECLASS        AGE pvc-restore Bound  pvc-c212dc9e-1b72-49da-8a58-8c1ceb97b9e3 1Gi      RO           vastdata-filesystem 7s ```