doctl supports volume snapshot creation, but it’s not documented in the tutorial. Updated tutorial is work in progress and I guess it should be published in the near future.
First, make sure you have
doctl version 1.6.0 or newer. Check your
doctl version by running
doctl version. If you need to update, you can take a look at Installation part of tutorial.
To initiate volume snapshot, you need to use
snapshot command which requires volume-id as an argument and
- label Example command
- doctl compute volume snapshot volume-id --snapshot-name "Volume-1 Backup 20170620"
If you need to obtain volume-id, you can use
doctl compute volume list command.
DigitalOcean's web based control panel provides a convenient, point-and-click interface for managing Droplets. There are many times, however, when a command-line tool may be a preferable alternative. doctl, the official DigitalOcean command-line client, leverages the DigitalOcean API to provide access to most account and Droplet features.