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:

  1. 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"
    }
  2. Create a volume using the above file:

    nomad volume create volume.hcl
    
  3. Create a snapshot of the above volume:

    nomad volume snapshot create volume-1 snap-1
  4. List all snapshots to see the one you’ve created:

    nomad volume snapshot list
  5. 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:



Last edited: Tuesday, Jul 27, 2021