How to Create Snapshots of Droplets

You can create snapshots from an existing Droplet in order 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 in order 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.

Powering off a Droplet can be done either through the DigitalOcean Control Panel, or by using SSH to connect to the server and running the poweroff or shutdown commands. Using SSH is the preferred method as it will ensure all services are stopped before the shutdown occurs, however we’ll cover both methods below.

To power off a Droplet from the command line, issue the shutdown command:

sudo shutdown -h now

To power off a Droplet through the control panel, click the Droplet name from the list of Droplets, and click on the ON switch in the upper-right corner, then click Turn off from the pop-up warning window.

Turn off Droplet window

Once the Droplet is powered off, you can take a snapshot knowing that all data has been written out to the Droplet’s disk, and therefore will be saved in the snapshot.

Snapshot a Powered-Off Droplet

To take a snapshot, first navigate to the Droplet within the control panel, then click the Snapshots link from the left menu.

From the snapshot screen, enter a name for the snapshot, or accept the default. The name for the snapshot is prefilled with the original Droplet’s name followed by the Unix timestamp at the time we clicked the button. This scheme identifies the Droplet and indicates approximately when the snapshot was taken. The name can be customized now or at any time after the snapshot is created.

Next, click the Take Snapshot button to create a snapshot.

Take snapshot button

A progress bar will show the progress of snapshot creation, and once complete, the snapshot will be listed along with any other previous snapshots. To power the Droplet back on when done, you can click on the same switch you clicked to power it off, which will now say OFF.

Take a Live Snapshot of a Running Droplet

Alternatively, you can take a live snapshot without powering off your Droplet. To do so, navigate to the Droplet in the DigitalOcean Control Panel, and then click Snapshots from the left menu. From the Take Snapshot screen, enter a snapshot name if desired, or keep the default, and then click the Take Live Snapshot button to create a snapshot.

Take live snapshot button

As with a snapshot taken if the Droplet were powered off, a progress bar will show you the status of the snapshot, and it will appear in the Droplet’s snapshot list once complete.