By XavierResoLv
Hi,
Is it possible to generate volume snapshot using the “doctl” command line utility ?
Thanks in advance !
/Xavier
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Right now, doctl only supports attach and detach actions against the volume API. That’s not to say that it won’t be supported in the future, though it’s not supported as of this response.
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 --snapshot-name flag:
- 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.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.