Unfortunately Digital Ocean does not provide a way to directly export a droplet.
In this tutorial we will explain how to export a Digital Ocean droplet and migrate it to Fuga's OpenStack platform.
Follow this tutorial if you would like to mount the data to an existing instance instead.
The below tutorial is derived from this PDF.
- Root access to the Digital Ocean Droplet.
- Password for Root on the Digital Ocean Droplet.
- Destination Storage Location with SSH access enabled.
- Destination Storage Location with 'qemu-utils' installed.
- Log into the Digital Ocean Droplet
- Prepare the Droplet for Backup.
- Reset root's password if you do not already know it.
- Use DD to zero out any deleted data on the partition, so that compression size of the backup is smaller.
dd if=/dev/zero of=0bits bs=20M; rm 0bits
- Use DD to byte copy the Digital Ocean partition, feeding it into gzip, and then transfer it over SSH to the Storage Location.
dd if=/dev/vda | gzip -1 - | ssh <user>@<storage_host> dd of=/storage/location/snapshot.image.gz
- Extract the gzipped image.
- Convert the DD image to a the qcow2 disk format with the 'qemu-img' utility.
qemu-img convert -O qcow2 /storage/location/snapshot.image /storage/location/snapshot.qcow2
- Place the new snapshot.qcow2 file in a http accessible location. We will use http://example.com/snapshot.qcow2 as an example here.
- Go to the horizon dashboard (https://dashboard.fuga.io/) and go to Project - Compute - Images
- Click Create Image and use the HTTP address as the Image Location and click Create Image.
- Wait for the image to be created, it will automatically download the image file from the web address.
- Use the "Create a fuga instance from an image" tutorial to launch the image as a new instance.