Volumes are network-based block devices that provide additional data storage for Droplets. You can move them between Droplets, create disk images of them, and resize them at any time.
To move a volume between Droplets in the same region, you need to unmount and detach it from its current Droplet, then attach and mount it to the new Droplet.
Unmount the volume from the current Droplet using the command line, or power down the Droplet. This makes sure the Droplet is not writing to the volume when you move it.
Detach the volume from the current Droplet using the control panel. In the volume’s More menu, choose Detach from Droplet.
Attach the volume to a different Droplet using the control panel. In the volume’s More menu, choose Attach to Droplet., then select the Droplet you want to use.
You can choose any Droplet in the same region. Droplets in other datacenters are visible but cannot be selected.
Mount the volume to make it accessible to the new Droplet’s filesystem. The mount directions are also in the volume’s More menu, under Config instructions.
First, unmount the volume from the current Droplet using the command line, or power down the Droplet. This makes sure the Droplet is not writing to the volume when you move it. Then, detach the volume.
To detach a volume using the API, use the volume actions endpoints and set the type
field to attach
.
Volumes are region-specific resources, meaning you can’t use them with Droplets in different regions. You currently can’t transfer volumes or snapshots of volumes to different regions.
As a workaround, you can create a new volume in the desired region, attach it to a Droplet, and use rsync or similar tools to copy the data from the original volume to the new one. Once you’ve confirmed the data transfer and no longer need the original volume, you can detach and destroy it.