By Discovery
I’ve been trying to spinup droplets from previous snapshots, but the cli command requires the image Slug. is there a way to add a slug to a snapshot ?
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!
Accepted Answer
As far as I can see, you can’t add a slug, though you don’t need to provide doctl with a slug to create a new Droplet using a previously generated snapshot, you just need to pass the ID of the snapshot in place of the slug.
So, for example, I pulled a list of images using:
doctl compute image list
The last image in the list was a snapshot I created before running that command. I then took the ID of that image and passed it to the create command and it created a new droplet using the snapshot.
doctl compute droplet create name --size 8gb --image ID_OF_IMAGE --region nyc1 --ssh-keys FP_SSHKEY
Just sub out ID_OF_IMAGE with the image ID of your snapshot and FP_SSHKEY with the fingerprint for your SSH Key.
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.