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