digital ocean migrate

How to migrate a droplet from Digital Ocean and boot it in new Fuga instance

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.

Requirements:

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

Procedure:

  1. Log into the Digital Ocean Droplet
  2. Prepare the Droplet for Backup.
    • Reset root's password if you do not already know it.
  3. 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
  4. 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
  5. Extract the gzipped image.
    gunzip /storage/location/snapshot.image.gz
  6. 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
  7. Place the new snapshot.qcow2 file in a http accessible location. We will use http://example.com/snapshot.qcow2 as an example here.
  8. Go to the horizon dashboard (https://dashboard.fuga.io/) and go to Project - Compute - Images
  9. Click Create Image and use the HTTP address as the Image Location and click Create Image.
  10. Wait for the image to be created, it will automatically download the image file from the web address.
  11. Use the "Create a fuga instance from an image" tutorial to launch the image as a new instance.

Was this article helpful?


Next article:

How to migrate a droplet from Digital Ocean and mount it on an existing Fuga instance

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 mount it on an existing Fuga instance. Follow this tutorial if you would like to boot the Droplet to a new Fuga instance. The tutorial below is derived from this PDF. Requirements: Root access to the Digital Ocean Droplet. Password for Root on the Digital Ocean Droplet.