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