github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/website/content/docs/commands/volume/snapshot-create.mdx (about) 1 --- 2 layout: docs 3 4 page_title: 'Commands: volume snapshot create' 5 description: | 6 Create external volume snapshots. 7 --- 8 9 # Command: volume snapshot create 10 11 The `volume snapshot create` command creates a snapshot of an existing 12 [Container Storage Interface (CSI)][csi] volume. Only CSI plugins that 13 implement the [Controller][csi_plugins_internals] interface support this 14 command. 15 16 ## Usage 17 18 ```plaintext 19 nomad volume snapshot create [volume] [snapshot_name] 20 ``` 21 22 The `volume snapshot create` command requires a volume ID or prefix. If there 23 is an exact match based on the provided volume ID or prefix, then the specific 24 volume is snapshotted. Otherwise, a list of matching volumes and information 25 will be displayed. The volume must still be [registered] with Nomad in order 26 to be snapshotted. 27 28 If an optional snapshot name is provided, the argument will be passed to the 29 CSI plugin to be used as the ID of the resulting snapshot. Not all plugins 30 accept this name and it may be ignored. 31 32 When ACLs are enabled, this command requires a token with the 33 `csi-write-volume` capability for the volume's namespace. 34 35 ## General Options 36 37 @include 'general_options.mdx' 38 39 ## Snapshot Create Options 40 41 - `-parameter`: Parameters to pass to the plugin to create a 42 snapshot. Accepts multiple flags in the form `-parameter key=value` 43 44 - `-secret`: Secrets to pass to the plugin to create a snapshot. Accepts 45 multiple flags in the form `-secret key=value` 46 47 - `-verbose`: Display full information for the resulting snapshot. 48 49 ## Examples 50 51 Snapshot a volume: 52 53 ```shell-session 54 $ nomad volume snapshot create ebs_prod_db1 55 Completed snapshot of volume ebs_prod_db1 with snapshot ID snap-12345. 56 ``` 57 58 Snapshot a volume with a suggested snapshot ID: 59 60 ```shell-session 61 $ nomad volume snapshot create ebs_prod_db1 snap-12345 62 Completed snapshot of volume ebs_prod_db1 with snapshot ID snap-12345. 63 ``` 64 65 [csi]: https://github.com/container-storage-interface/spec 66 [csi_plugin]: /docs/job-specification/csi_plugin 67 [registered]: /docs/commands/volume/register 68 [csi_plugins_internals]: /docs/concepts/plugins/csi#csi-plugins