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.
- 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 to 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/vda1 | gzip -1 - | ssh <user>@<storage_host> dd of=/storage/location/snapshot.image.gz
- Extract the gzipped image.
- At this point you can manually mount the dd image file with the following commands:
losetup /dev/loop1 /storage/location/snapshot.image
mount /dev/loop1 snapshot
When you no longer need a floating IP address, you can return it to the pool. This way you won't be charged for the floating IP. Note that this frees the IP address for use by any other user. If you want to use the same IP address later on, you shouldn't return it as it can't be guaranteed that you'll get back the same IP address. Method 1: Using the horizon dashboard interface.