
Migrating Block Storage volumes allows you to securely move existing data from one instance to another. Vultr Block Storage supports regular SSD and NVME drives, providing you with multiple options to store your data. DigitalOcean Block Storage volumes are attached to Droplets, while Vultr Block Storage volumes are attached to Vultr Cloud Compute instances. You can use the attached instance to migrate existing volumes to Vultr Block Storage with a similar or larger volume size.
Follow this guide to migrate DigitalOcean Block Storage volumes to Vultr Block Storage with little or no downtime for your linked applications.
Before you start, you need to:
In a single Vultr location:
Follow the steps below to set up the source DigitalOcean Droplet and verify that a block storage volume is attached to the instance. Then, set up the destination Vultr Cloud Compute instance and verify that a Vultr Block Storage volume is attached to migrate the source data.
Follow the steps below to access your source DigitalOcean Droplet and verify the attached block storage volume information.
Access your DigitalOcean Droplet's management page and verify that your target block storage volume is attached.
Access your Droplet using SSH as a non-root user with sudo privileges.
List all attached devices and verify the block storage volume name.
Your output should be similar to the one below.
sda is the attached block storage volume mounted to the default /mnt/volume_nyc1_01 directory, and it's 10GB in size based on the above output. DigitalOcean volumes use the sd naming scheme and increment the device name for additional disks such as sdb, sdc, sdd, depending on the attached volume.
Create a new /mnt/source directory to mount the block storage volume if it's not mounted.
Mount the /dev/sda volume to the /mnt/source directory.
List all attached block devices and the filesystem information.
Your output should be similar to the one below.
ext4 is the active filesystem format for sda block storage volume mounted with two directories, /mnt/source and /mnt/volume_nyc1_01 based on the above output. Keep note of the volume's filesystem format to use on your destination Vultr Block Storage volume.
View the disk usage information and verify the volume's usage ratio.
Your output should be similar to the one below.
The source /dev/sda block storage volume is mounted on the /mnt/source directory with a 1% usage based on the above output.
If your DigitalOcean Block Storage volume has multiple partitions, verify the size of each partition and the filesystem format to apply on your destination Vultr Block Storage volume.
Follow the steps below to set up the destination Vultr Block Storage volume and prepare it to transfer data from the source block storage volume.
Access your Vultr Block Storage volume's management page and verify that it's attached to your target Vultr Cloud Compute instance.
Access your Vultr Cloud Compute instance using SSH as a non-root sudo user. Replace Vultr-Server-IP with your actual instance's public IP address.
List all attached devices and verify that the Vultr Block Storage volume is available.
Your output should be similar to the one below.
/dev/vdb is the Vultr Block Storage volume name, and its 40GB in size based on the above output. Vultr Block Storage volumes use the vd naming scheme, and the disk value increments when additional volumes are attached. For example, vdb, vdc, vdd, and vde based on the number of attached volumes.
Format the /dev/vdb block storage volume with the source's filesystem, such as ext4.
Create a new /mnt/destination directory to mount the Vultr Block Storage volume.
Mount the /dev/vdb volume to the /mnt/destination mount directory.
Grant your active sudo user ownership privileges to the /mnt/destination directory. Replace linuxuser with your actual user.
View the disk usage information and verify that the volume is mounted.
Your output should be similar to the one below.
The /dev/vdb Vultr Block Storage volume is mounted to the /mnt/destination directory based on the above output.
If the source DigitalOcean Block Storage volume has multiple partitions, partition your destination Vultr Block Storage volume with the same filesystem format and a similar or larger size.
There are multiple methods you can use to copy and migrate data from a source volume to the destination volume. Rsync also knows a remote sync is a file synchronization tool used to transfer files from one location to another and ensure that the source matches the destination. Follow the steps below to use Rsync to transfer data from your source block storage volume to the destination Vultr Block Storage volume.
Access your Droplet using SSH.
Install Rsync if it's not installed on the source Droplet and the destination Vultr Cloud Compute instance.
Transfer files from the source DigitalOcean Block Storage volume's /mnt/source/ mount directory to your destination Vultr Block Storage's mount directory. Enter your destination instance's password when prompted.
Monitor the transfer process to ensure that it's successful and all files are transferred to the destination directory without errors similar to the following output.
The above Rsync command transfers all files from the /mnt/source/ directory to the destination /mnt/destination/ directory on your Vultr Cloud Compute instance. Within the command:
-a: Preserves all file permissions, timestamps, and symbolic links.-v: Displays the command progress and active transfer operations.-z: Compresses all data during the transfer.--progress: Displays the transfer progress of each file.Repeat the above file transfer process for all block storage volume partitions attached to your source Droplet.
Verifying the integrity of transferred files is essential to ensure that the migration process is successful and files are not corrupted during transfer. Follow the steps below to perform a file integrity check and verify that the Vultr Block Storage volume contents match the source DigitalOcean Block Storage volume.
Generate checksums on the source volume's /mnt/source mount directory.
The above command creates a source-checksums.txt file that contains the MD5 checksums and paths for all files in the /mnt/source directory.
Generate checksums on the destination Vultr Block Storage volume's /mnt/destination mount directory.
The above command creates a destination-checksums.txt file that contains the checksums and paths for all files in the /mnt/destination mount directory.
Copy the source-checksums.txt file to the Vultr Cloud Compute instance using SFTP.
Compare the destination-checksums.txt and the source-checksums.txt using diff to verify that the checksums for both files match.
Your output should be similar to the one below.
The checksums for the source DigitalOcean Block Storage volume match the destination Vultr Block Storage volume with similar files in both directories based on the above output. When the checksums are different, transfer the files again and verify that the files are not corrupted during the transfer.
Cutting over to Vultr Block Storage after migrating your existing DigitalOcean Block Storage volume allows you to transfer your applications and services. Follow the recommendations below when the migration is successful and cut over your applications or services to Vultr Block Storage.
You have migrated DigitalOcean Block Storage volumes to Vultr Block Storage. You can resize the destination Vultr Block Storage volume and cut over all applications to use the new volume. For more information and volume options, visit the Vultr Block Storage product documentation.
0 Comments
Be the first to comment and share your perspective with the community.