Bobcares

How to easily migrate from Linode to DigitalOcean without downtime?

by | Dec 21, 2018

Every cloud hosting provider has its own pros and cons. If one is cheap, other one would be more stable.

And, people often tend to switch between major providers like DigitalOcean, Linode, etc. This involves migration of data from Linode to DigitalOcean or vice-versa.

Handling data migration is a critical task, as any wrong step can result in website down time.

At Bobcares, we help cloud owners with the migration task as part of our Managed Cloud Services.

Today, we’ll see how our Cloud Specialists migrate from Linode to DigitalOcean servers without downtime or data loss.

How to migrate from Linode to DigitalOcean?

Often, when you are not happy with your cloud service provider, you may think of moving to a different provider. The reasons can be personal preference, server costs, and so on.

When you have made up your mind to move to DigitalOcean, it involves data migration.

However, migration is a critical task, especially if we are transferring live websites. Even if you make a slight mistake when migrating from Linode to DigitalOcean, it can take the entire website down.

Let’s now have a look at how our Cloud Specialists do this migration from Linode to DigitalOcean effectively.

 

1. Create Droplet at DigitalOcean

As the first step of migration, we create the new Droplet at DigitalOcean. The memory, disk configuration of the new Droplet should match your server at Linode. Ideally, it should have some extra disk space to accommodate the backup files too.

Needless to say, the server type also has to match to avoid conflict. That is, things would be easy if you are transferring between two Ubuntu servers.

Additionally, our Cloud Migration Specialists ensure that the version of web server, database server, etc. matches too.

 

2. Using Rsync for data transfer

Now that we have made the servers identical, we can proceed with data migration.

Using Rsync is one method that we do to migrate data. Rsync helps to copy files and folders easily without using much bandwidth data.

Here, we first setup ssh keys to make data transfer smooth between the servers.

To copy the website files, we execute the following command from the Linode server.

rsync -avP website1 1xx.2xx.3x.4x:/var/www/html/

Here, 1xx.2xx.3x.4x is the IP address of new DigitalOcean Droplet. Thus, we will have the folder website1 in the destination server.

Again, for copying multiple websites, our Cloud Engineers use command-line scripts to execute the task effectively.

 

3. MySQL data migration

Yet another important step in the migration is the copying of MySQL databases. This involves taking a backup of the databases as .sql file and restoring in the DigitalOcean Droplet.

For instance, the backup file of the database “Myweb” will be taken as myweb.sql. Using rsync, we copy it to the destination and restore it.

For the smooth working, on the new server, we need to create the respective MySQL users and add them to the databases.

 

4. DNS change

Now that we have copied all the data from Linode to DigitalOcean, we can proceed to the next step. This involves the changes in DNS of websites.

Here, we point the domain’s DNS records to the new DigitalOcean server IP.

Finally, we have migrated website from Linode to DigitalOcean server.

Steps that avoid downtime when migrating from Linode to DigitalOcean

We just saw the process of migration between Linode and DigitalOcean servers. Although, the process appears easy, often it can cause website downtime due to lack of proper checks.

Let’s see the additional steps that we do to avoid downtime after migration.

 

1.Resource allocation

We often see service failures in the migrated Droplets due to resource crunch. For example, recently a DigitalOcean customer reported MySQL service crash soon after migration.

On a detailed analysis, our Cloud Engineers found that MySQL was failing due to lack of enough memory on the server. To fix, we just had to add additional memory to the Droplet.

Therefore, we always ensure that the new Droplet has a slightly higher configuration that the source server. And, it  helps to take care of the resource related problems easily.

2. Verifying website at destination

The process of verifying website using temporary link of the DigitalOcean really helps to identify potential problems of the migrated website.

Thus, our Support Engineers get a chance to fix the problems prior to the DNS change.

 

3. Final Rsync

Database changes are so frequent that our Cloud Engineers do a final rsync of data just before the DNS switch. This ensures that all the data is present in database after the initial copying of data. Final rsync involves re-syncing of the website files too.

And, when the website starts working fine on the new Droplet, we terminate the account on old Linode server.

 

Conclusion

Migrating websites from Linode to DigitalOcean can be done in few steps. However, when a slight mistake happens, it can make your entire website down. Today, we saw how our Cloud Engineers migrate from Linode to DigitalOcean with zero downtime.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

SEE SERVER ADMIN PLANS

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.