I’m trying to create a 2nd Droplet.
When wanting just the OS software installed, through Digital Ocean’s control panel I can Select Image > Linux Distributions tab > and select a Linux OS image, to which another Droplet will be spun. Similarly, when using a cURL statement such as …
… a message is given …
{“status”:“OK”,“droplet”:{“id”:AAAAAA,“name”:“server2”,“image_id”:XXXXXX,“size_id”:66,“event_id”:BBBBBB}}
… and a 2nd Droplet is spun with, again, just the OS software installed.
Furtherer, if wanting to spin a 2nd Droplet as a clone of my 1st server, which already has LAMP and my web pages installed on it; through Digital Ocean’s control panel I can Select Image > My Images tab > and select a snapshot name, to which a new Droplet is spun with all the software included.
At this point I’m not sure how to use a cURL statement, to clone via a Snapshot.
Any answer or direction is appreciated.
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!
To launch a new droplet based on a snapshot, you’d use the same API call:
curl -s "https://api.digitalocean.com/droplets/new/?name=server2&sizeid=66&imageid=XXXXXX®ionid=4&clientid=YYYYYY&api_key=ZZZZZZ"
You just need to replace the imageid with the ID for your snapshot. To find your image ID, run:
curl -s "https://api.digitalocean.com/v1/images/?clientid=YYYYYY&api_key=ZZZZZZ"
I’d also suggest installing the jq command. You can pipe the results to it so that they are printed out nicely:
curl -s "https://api.digitalocean.com/v1/images/?clientid=YYYYYY&api_key=ZZZZZZ" | jq .[]
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.