Validated on 31 Oct 2019 • Last edited on 8 Jul 2024
disk image
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 take snapshots of volumes. Volume snapshots save all the contents from the volume, and you can use them to create new volumes. By default, the data on volumes and their snapshots is encrypted at rest.
The same general guidelines apply for creating snapshots of volumes as apply with snapshots of Droplets: if there are applications that are actively writing to the volume, you should power off the Droplet attached to the volume before taking a snapshot to ensure data consistency.
Note
Because snapshots of volumes operate at the block storage level, the snapshot size may not match what the filesystem reports. For example, filesystems may not immediately mark blocks as unused, which makes the block storage system include them in snapshots even though they don’t contain data.
You can trim or discard unused blocks to make your snapshots smaller and therefore less expensive. Configuring periodic fstrim or mounting your volume with the discard option helps ensure that the block storage system knows which blocks are used and which are not.
Snapshot a Volume using the Control Panel
To create a snapshot of a volume from the control panel, in the left menu, click Droplets, then click the Volumes tab. Open the More menu for the volume you want to snapshot, then click Take Snapshot.
The window that opens lets you customize the name of the snapshot. Enter the name you’d like to use or accept the default, then click Take Snapshot to create a new snapshot.
Snapshot a Volume using Automation
How to Create a Block Storage Volume Snapshot Using the DigitalOcean CLI