For AI agents: The documentation index is at https://docs.digitalocean.com/llms.txt. Markdown versions of pages use the same URL with index.html.md in place of the HTML page (for example, append index.html.md to the directory path instead of opening the HTML document).
How to Create Snapshots of Droplets
Last verified 4 Dec 2026
Snapshots are on-demand disk images of DigitalOcean Droplets and volumes saved to your account. Use them to create new Droplets and volumes with the same contents.
You can create snapshots from an existing Droplet to save all of the current contents from the Droplet’s disk.
Depending on the services running on the Droplet, you may want to power off the Droplet before taking a snapshot to ensure all applications have written out their data to disk. For example, many databases don’t guarantee data consistency on disk unless the database service is stopped or the entire Droplet is powered off first.
Snapshots of GPU Droplets include the boot disk but not the scratch disk. If the boot disk has a large quantity of data, the size of the resulting backup or snapshot images are larger, and the creation time is proportionally longer.
Creating a snapshot while a Droplet is on may result in performance degradation and compromise data consistency.
Power Off Droplet and Take a Snapshot (Recommended)
You can power off a Droplet through the control panel or with the command line using poweroff or shutdown. We recommend using the command line because it makes sure all services are stopped before the Droplet is powered off:
sudo shutdown -h now
However, if you want to power off a Droplet through the Control Panel, go to the Droplets page, click the Droplet, then click Actions and select Turn off.
Once the Droplet is powered off, go to the Droplet’s Backups & Snapshots tab and click Take a Snapshot.
In the Take Snapshot window, the Give your Snapshot a name field prefills the Droplet’s name followed by the current Unix timestamp to help you identify the snapshot later, but you can customize the name now or after you take it. Click Take Snapshot to create the snapshot.
A progress bar shows the progress of snapshot creation. Once complete, the snapshot is listed along with any other previous snapshots. To power the Droplet back on, click the Turn On Droplet button at the top of the page.
Take a Live Snapshot
To take a live snapshot without powering off your Droplet, go to the Droplet’s Backups & Snapshots tab and click Take a Snapshot. In the Take Snapshot window, click Take Live Snapshot.
Snapshot a Droplet Using Automation
Once the Droplet is powered off, you can snapshot a Droplet using the following doctl command, or by sending a request to the Droplet actions endpoint and setting the type field to snapshot.
How to Snapshot a Droplet Using the DigitalOcean CLI
# Enable Backupscurl -X POST \
-H "Content-Type: application/json"\
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN"\
-d '{"type":"enable_backups"}'\
"https://api.digitalocean.com/v2/droplets/3164450/actions"# Disable Backupscurl -X POST \
-H "Content-Type: application/json"\
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN"\
-d '{"type":"disable_backups"}'\
"https://api.digitalocean.com/v2/droplets/3164450/actions"# Reboot a Dropletcurl -X POST \
-H "Content-Type: application/json"\
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN"\
-d '{"type":"reboot"}'\
"https://api.digitalocean.com/v2/droplets/3164450/actions"# Power cycle a Dropletcurl -X POST \
-H "Content-Type: application/json"\
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN"\
-d '{"type":"power_cycle"}'\
"https://api.digitalocean.com/v2/droplets/3164450/actions"# Shutdown and Dropletcurl -X POST \
-H "Content-Type: application/json"\
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN"\
-d '{"type":"shutdown"}'\
"https://api.digitalocean.com/v2/droplets/3067649/actions"# Power off a Dropletcurl -X POST \
-H "Content-Type: application/json"\
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN"\
-d '{"type":"power_off"}'\
"https://api.digitalocean.com/v2/droplets/3164450/actions"# Power on a Dropletcurl -X POST \
-H "Content-Type: application/json"\
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN"\
-d '{"type":"power_on"}'\
"https://api.digitalocean.com/v2/droplets/3164450/actions"# Restore a Dropletcurl -X POST \
-H "Content-Type: application/json"\
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN"\
-d '{"type":"restore", "image": 12389723 }'\
"https://api.digitalocean.com/v2/droplets/3067649/actions"# Password Reset a Dropletcurl -X POST \
-H "Content-Type: application/json"\
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN"\
-d '{"type":"password_reset"}'\
"https://api.digitalocean.com/v2/droplets/3164450/actions"# Resize a Dropletcurl -X POST \
-H "Content-Type: application/json"\
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN"\
-d '{"type":"resize","size":"1gb"}'\
"https://api.digitalocean.com/v2/droplets/3164450/actions"# Rebuild a Dropletcurl -X POST \
-H "Content-Type: application/json"\
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN"\
-d '{"type":"rebuild","image":"ubuntu-16-04-x64"}'\
"https://api.digitalocean.com/v2/droplets/3164450/actions"# Rename a Dropletcurl -X POST \
-H "Content-Type: application/json"\
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN"\
-d '{"type":"rename","name":"nifty-new-name"}'\
"https://api.digitalocean.com/v2/droplets/3164450/actions"# Change the Kernelcurl -X POST \
-H "Content-Type: application/json"\
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN"\
-d '{"type":"change_kernel","kernel":991}'\
"https://api.digitalocean.com/v2/droplets/3164450/actions"# Enable IPv6curl -X POST \
-H "Content-Type: application/json"\
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN"\
-d '{"type":"enable_ipv6"}'\
"https://api.digitalocean.com/v2/droplets/3164450/actions"# Enable Private Networkingcurl -X POST \
-H "Content-Type: application/json"\
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN"\
-d '{"type":"enable_private_networking"}'\
"https://api.digitalocean.com/v2/droplets/3164450/actions"# Snapshot a Dropletcurl -X POST \
-H "Content-Type: application/json"\
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN"\
-d '{"type":"snapshot","name":"Nifty New Snapshot"}'\
"https://api.digitalocean.com/v2/droplets/3164450/actions"# Acting on Tagged Dropletscurl -X POST \
-H "Content-Type: application/json"\
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN"\
-d '{"type":"enable_backups"}'\
"https://api.digitalocean.com/v2/droplets/actions?tag_name=awesome"# Retrieve a Droplet Actioncurl -X GET \
-H "Content-Type: application/json"\
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN"\
"https://api.digitalocean.com/v2/droplets/3164444/actions/36804807"
Go
Using Godo, the official DigitalOcean API client for Go:
import("context""os""github.com/digitalocean/godo")funcmain(){token:=os.Getenv("DIGITALOCEAN_TOKEN")client:=godo.NewFromToken(token)ctx:=context.TODO()// Enable Backupsaction,_,err:=client.DropletActions.EnableBackups(ctx,3164450)// Disable Backups// action, _, err := client.DropletActions.DisableBackups(ctx, 3164450)// Reboot a Droplet// action, _, err := client.DropletActions.Reboot(ctx, 3164450)// Power Cycle a Droplet// action, _, err := client.DropletActions.PowerCycle(ctx, 3164450)// Shutdown a Droplet// action, _, err := client.DropletActions.Shutdown(ctx, 3067649)// Power Off a Droplet// action, _, err := client.DropletActions.PowerOff(ctx, 3164450)// Power On a Droplet// action, _, err := client.DropletActions.PowerOn(ctx, 3164450)// Restore a Droplet// action, _, err := client.DropletActions.Restore(ctx, 3164449, 12389723)// Password Reset a Droplet// action, _, err := client.DropletActions.PasswordReset(ctx, 3164450)// Resize a Droplet// action, _, err := client.DropletActions.Resize(ctx, 3164450, "1gb", true)// Rebuild a Droplet// action, _, err := client.DropletActions.RebuildByImageSlug(ctx, 3164450, "ubuntu-16-04-x64")// Rename a Droplet// action, _, err := client.DropletActions.Rename(ctx, 3164450, "nifty-new-name")// Change the Kernel// action, _, err := client.DropletActions.ChangeKernel(ctx, 3164450, 991)// Enable IPv6// action, _, err := client.DropletActions.EnableIPv6(ctx, 3164450)// Enable Private Networking// action, _, err := client.DropletActions.EnablePrivateNetworking(ctx, 3164450)// Snapshot a Droplet// action, _, err := client.DropletActions.Snapshot(ctx, 3164450, "Nifty New Snapshot")// Retrieve a Droplet Action// action, _, err := client.DropletActions.Get(ctx, 3164450, 36804807)}
Ruby
Using DropletKit, the official DigitalOcean API client for Ruby:
require'droplet_kit'token=ENV['DIGITALOCEAN_TOKEN']client=DropletKit::Client.new(access_token:token)# Enable Backupsclient.droplet_actions.enable_backups(droplet_id:3164450)# Disable Backups# client.droplet_actions.disable_backups(droplet_id: 3164450)# Reboot a Droplet# client.droplet_actions.reboot(droplet_id: 3164450)# Power Cycle a Droplet# client.droplet_actions.power_cycle(droplet_id: 3164450)# Shutdown a Droplet# client.droplet_actions.shutdown(droplet_id: 3067649)# Power Off a Droplet# client.droplet_actions.power_off(droplet_id: 3164450)# Power On a Droplet# client.droplet_actions.power_on(droplet_id: 3164450)# Restore a Droplet# client.droplet_actions.restore(droplet_id: 3067649, image: 12389723)# Password Reset a Droplet# client.droplet_actions.password_reset(droplet_id: 3164450)# Resize a Droplet# client.droplet_actions.resize(droplet_id: 3164450, size: '1gb')# Rebuild a Droplet# client.droplet_actions.rebuild(droplet_id: 3164450, image: 'ubuntu-16-04-x64')# Rename a Droplet# client.droplet_actions.rename(droplet_id: 3164450, name: 'nifty-new-name')# Change the Kernel# client.droplet_actions.change_kernel(droplet_id: 3164450, kernel: 991)# Enable IPv6# client.droplet_actions.enable_ipv6(droplet_id: 3164450)# Enable Private Networking# client.droplet_actions.enable_private_networking(droplet_id: 3164450)# Snapshot a Droplet# client.droplet_actions.snapshot(droplet_id: 3164450, name: 'Nifty New Snapshot')
Python
Using PyDo, the official DigitalOcean API client for Python:
importosfrompydoimportClientclient=Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))# enable back ups examplereq={"type":"enable_backups"}resp=client.droplet_actions.post(droplet_id=346652,body=req)
We can't find any results for your search.
Try using different keywords or simplifying your search terms.