Data Protection and Snapshots
This section provides instructions for taking volume snapshots using the Portworx CSI driver on Nomad.
CSI Snapshot Lifecycle
The following steps will allow you to snapshot a Portworx CSI volume:
-
Create a file
volume.hcl
with the following content:id = "volume-1"
name = "database"
type = "csi"
plugin_id = "portworx"
capacity_min = "1G"
capacity_max = "1G"
capability {
access_mode = "single-node-reader-only"
attachment_mode = "file-system"
}
capability {
access_mode = "single-node-writer"
attachment_mode = "file-system"
} -
Create a volume using the above file:
nomad volume create volume.hcl
-
Create a snapshot of the above volume:
nomad volume snapshot create volume-1 snap-1
-
List all snapshots to see the one you've created:
nomad volume snapshot list
-
Delete the above snapshot:
nomad volume snapshot delete snap-1
note
Snapshots with authorization and authentication enabled
Due to a few limitions with Nomad, Portworx authorization and authentication will not work with snapshotting. You can track the following issues for information on this support: