Bobcares

cPanel to DirectAdmin migration – How to do it without downtime

by | Jul 1, 2019

Hosting providers often need to change their control panel due to business reasons.

And, the search for an alternative for cPanel control panel often ends up in DirectAdmin. To make the systems work, we need to do cPanel to DirectAdmin migration.

Often due to PHP version compatibility or problems with directory permissions, there can be errors while doing a migration from older server to new server.

That’s why, at Bobcares, we often get requests from our customers to migrate cPanel to DirectAdmin as part of our Server Migration Services.

Today, we’ll see how our Migration Engineers do properly planning to migrate accounts from cPanel and fix related errors.

 

How we do migration from cPanel to DirectAdmin

Migration can always be risky as it involves live websites. That’s why, while doing migration, our Migration Engineers always do it carefully and with proper planning. Any single mistake can result in website errors or data loss.

In general, there are two ways to do cPanel migration. One is via DirectAdmin panel and the other one is via command line. Let’s now check these methods in detail.

 

1. Migration via DirectAdmin control panel

Migrating from cPanel to DirectAdmin is a multi step process. DirectAdmin will not accept the cPanel backups in its native format. Therefore, we need to covert the backups to be acceptable by DirectAdmin.

 

a) Backup conversion

Luckily, there are backup conversion scripts readily available at Github. For example, one of the scripts that can convert the cPanel backup to DirectAdmin would be da.cpanel.import.pl

We copy the cPanel user backups into the DirectAdmin server. Then, our Migration Specialists modify the file defaults.conf to match the DirectAdmin destination server. Then, we execute the command to convert the backups as:

perl da.cpanel.import.pl

We, then copy the converted backup content to the folder /home/admin/user_backups.

 

b) Restore from DirectAdmin panel

Now, we can restore the backups via DirectAdmin panel.

For this, we login in the destination DirectAdmin Panel and go to Admin Tools > Admin Backup > Restore option.

DirectAdmin restore

Here, we set the path of the folder that contain the converted backups. In our case, it will be /home/admin/user_backups.

We, then choose the IP address details and proceed to the next step. DirectAdmin will now show the list of accounts available for restore. We choose the specific account backup and just follow the on-screen instructions and that completes the migration. Usually, the time for migration depends largely on the size of the accounts on the server.

Most of the time, the migration via DA panel work flawlessly. However, some customers may experience errors while migrating cPanel to DirectAdmin too. This can be due to network errors, backup errors, connectivity problems and so on. And, it can end up in troubles like data loss or database crash. Therefore, our Migration Engineers opt for cPanel to DirectAdmin migration via command line.

 

2. Migration via command line

Here, we take the following steps to migrate the cPanel accounts via command line.

1. Initially, we take the back up of cPanel account which need to migrate by log into the cPanel account. And, we use Backup Wizard option in the cPanel to take the backup.

Or, we run the following command to take the cPanel backup via command line.

/scripts/pkgacct username

2. Once the backup packaging is complete, we either download this .tar.gz file onto the desktop or server itself.

If you want to download the backup file to the server, we use a temporary URL or FTP method.

3. Then, we log into the DirectAdmin control panel and create the account.

4. After that, we log into the server as a root user and create a directory inside the home directory.

5. Next, we download the backup file via a temporary URL and extract the file there, all the data from your cPanel account will be the resulting files.

5. We find the website contents, homedir from the list and move the files to the corresponding Document root, public_html folder of the domain.

6. Also, we restore the database associated with the domain too.

7. At last, we check the ownership and permission too, if needed we correct both for the proper working of websites.

In every migration, there comes the need to match up the existing PHP, web server settings on the new server. After copying the accounts, we do a preview check of the domain using temporary URL.

And, when we are satisfied with the working of the website from the new server, we make DNS changes. Here, our Migration Engineers make DNS settings change well in advance. That would take the website to the new server without any downtime.

 

How we fixed migration related errors

From our experience in managing servers, we’ve seen customers facing problems after migration. Let’s take a closer look at how our Migration Engineers fixed these problems.

 

1. Version compatibility

In general, versions of software running on both source and destination servers should match. These incompatibility can create many errors in migration.

Recently, one of the customers reported a website error after migrating cPanel account to DirectAdmin. He was getting a blank page on his website.

On checking, our Migration Engineers found that the problem was due to the PHP version of the site. Sometimes, this error can happen due to missing software versions or extensions. Again, it can be a result of version mismatch of the programs running on an old and new server. This may lead to errors in the website.

So, we solved the error by setting the PHP version in the new server to match that of the old server.

 

2. Incorrect permission and ownership

Often, customers may get website errors after migrating the old server to the new server. Also, this can be because of the incorrect permissions and ownership of the directories or files that set up in the new server.

Also, after migrating the site between different control panels, the ownership and permissions of migrated site files and directories must be corrected. Again, the default file permission should be 644 and the directory should be 755.

In every migration, our Migration Experts ensure that the provided permissions and ownership are correct. If there are wrong permissions, we correct them and make the website work.

 

[Looking for a trouble-free migration from cPanel to DirectAdmin? Our Migration Specialists can do it for you.]

 

Conclusion

In short, DirectAdmin is one of the cheapest control panels and is famous for its simplicity and user-friendliness. Today, we saw how our Migration Engineers migrate cPanel to DirectAdmin without website downtime. We discussed on the migration errors and their fixes too.

Migrate cPanel to a new platform!

Looking for changing infrastructure of your server? Let us help you.

Our migration experts can migrate all your accounts to a new platform without data loss.

GET STARTED

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.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF