wesupport

25% off on first invoice for all services*

SPRING SALE

Use coupon

*Offer valid for new customers only

25% off on first invoice for all services*

SPRING SALE

Use coupon

*Offer valid for new customers only

Need help?

Our experts have had an average response time of 11.43 minutes in March 2024 to fix urgent issues.

We will keep your servers stable, secure, and fast at all times for one fixed price.

How to safely clone Linode server?

by | Jan 21, 2019

Cloning simply helps in creating an exact replica of your Linode server.

This replica can be useful in load sharing or as a backup server.

Unfortunately, following wrong steps while cloning can result in problems with the server.

At Bobcares, we help Linode customers to clone their servers without breaking configuration as part of our Managed Cloud Services.

Today, we’ll see how our Cloud Engineers clone Linode server and fix common errors with cloning.

Why Cloning ?

Firstly, we’ll see the benefits of cloning.

For server providers, it helps to create and sell Linode servers with preinstalled applications. Thus, it reduces the effort and time to create new servers.

Similarly, in Linode servers running critical websites, cloning can bring in redundancy. In such cases, our Dedicated Engineers help server owners to create an exact copy of the live server. Together with a load balancer, website visitors will experience literally no downtime.

 

How we clone Linode server?

So far, we saw the benefits of cloning Linode server. Let’s now see how our Support Engineers clone a Linode server.

 

1. Preparing the Linode for cloning

The process of cloning copies data at the block level. So, we need to prepare the Linode for cloning.

If Linode is running at the time of the clone operation, the filesystem can have some amount of damage. Also, it can create errors in your website database too. So ideally, we need to shutdown the Linode server before cloning operation.

However, if you have a static website, there will not be much harm in proceeding with clone operation of live server. In dynamic websites, we take a backup of the MySQL databases that can help with any data inconsistency.

Linode allows cloning of independent disks. It’s worth checking the versions of software running on your Linode server prior to the clone operation.

Also, we need to decide on the destination server to which the server will be cloned to.

2. Actual process on cloning

To clone the Linode server, we need to select the particular Linode in Linode Manager. Then, click on “Clone” option. Again, the Linode Manager gives options to select the disks, configuration profile of Linode server. Our Dedicated Engineers select the options to clone as shown below.

Further, we choose the Destination Linode to which the disk will be cloned to. Here, we ensure that the destination Linode has enough free space and resources to accommodate the disks.

 

3. Changes after cloning

Now, we have a backup copy of the production server. But, if there is need to make the cloned server live, it requires couple changes too.

Here, our Dedicated Engineers access the new Linode server via Lish console. Then, we setup the new static network details in /etc/network/interfaces.

Additionally, if the websites need to load from new server, we need to point website DNS to new server IP address.

 

Typical errors with Linode cloning

We just saw the exact process on how we clone the Linode server. With our expertise in managing Linode servers, we often see errors with cloned servers. Let’s take a look at them.

1.Cloned Linode do not boot

At times, the cloned Linode can show booting issues.

Recently, one of our customers reported problem that his cloned Linode did not boot up. He was clueless on what to check as server was not even responding.

Here, we checked the server via Linode Manager and found that memory limit was causing problems. And, to fix, our Support Engineers tweaked the memory limit value in the configuration profile and server started running.

 

2. Read-only file system

Similarly, when cloning disks, we often see that the cloned disks becomes read only. Here, when we try to save a file to the new disk, it will show the error:

Error writing : Read-only file system

This primarily happens when we take a clone of running Linode. As a result, it can create a damage to the filesystem. And, thus the disk becomes read-only.

Our Dedicated Engineers fix this by doing a filesystem check on the failed disk. For this, we boot the Linode in rescue mode first. Then, to find the filesystem errors of the disk /dev/xvda, we use the command :

 e2fsck -fnv /dev/xvda | tee /tmp/fsckerrors.txt

3. Resource shortage on destination

Again, there can be problems with cloning Linode when there is resource shortage in destination Linode. To clone disks, we need unallocated free disk space (not allocated to a disk image) in Linode server.

That’s why, our Support Engineers check the disk usage on source and destination Linodes prior to the clone operation using the command:

df -h

Then, we shrink the disk image on the destination Linode to free up enough unallocated space. After this, we will be able to clone the disk properly.

[Need help with cloning servers? Our Linode Experts can help you.]

 

 

Conclusion

The process to clone Linode servers involves a series of steps. Often, it can result in errors due to resource shortage, choosing wrong options, etc. Today, we saw how our Support Engineers effectively clone a Linode server and fix typical errors associated with cloning.

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 *