Doctl Spinup droplet from previous snapshot

January 10, 2017 2.2k views
Ubuntu DigitalOcean API Linux Commands

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 ?

1 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.

Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!