Home WebServer PanelDirectAdmin Migrate cPanel data to DirectAdmin

Migrate cPanel data to DirectAdmin

by Thạch Phạm
Published: Last Updated on

The most efficient and fastest way to migrate cPanel to DirectAdmin.

Terms used in the article:

  • Restore
  • Backup

I. Overview

When the cost of cPanel increases, DirectAdmin is a new choice and alternative solution for today’s Web Host administrators. DirectAdmin, a strong competitor to cPanel, has developed many features, advantages and greatly improved performance.

In environments like cPanel, migrating user data in the same Control is very simple. But what if a different control panel and specifically cPanel to DirectAdmin? The good news for administrators is that from the version 1.57.4 onwards, DirectAdmin has been supported to restore cPanel files on DirectAdmin. To do this, please go through the following steps.

II. Steps to migrate the cPanel user to DirectAdmin

2.1 Prerequisites

To migrate cPanel users to DirectAdmin smoothly without errors, your file and server need to meet the following mandatory conditions:

  • The maximum character length for mysql users on cPanel is 16 characters. And the maximum character length for mysql user on DirectAdmin is 10 characters, so you need to check before migrating to avoid loss of database when migrating.
  • The User name length in cPanel and DirectAdmin must match to avoid conflicts when creating databases, you can check with the following command:

On cPanel (run command as root)

AZDIGI Tutorial
ls /var/cpanel/users | awk ‘{print length, $0}’ | sort -nr | head -n1

On DirectAdmin (run as root in SSH)

AZDIGI Tutorial
/usr/local/directadmin/directadmin set max_username_length 16 restart
  • DirectAdmin version must be 1.57.4 or higher, check the version with the command: /usr/local/directadmin/directadmin v

2.2 Migration steps

Step 1: Backup Full Account on cPanel

Backup with cPanel User’s right

At the cPanel interface of the user, you perform a Full Account Backup to the tar.gz file. To backup, click Backup as shown below:

Migrate cPanel to DirectAdmin
Migrate cPanel to DirectAdmin

Next, click Download a Full Account Backup as shown below. The process will start backing up and backup time depending on the size of your data.

Migrate cPanel to DirectAdmin

When the backup is complete, you access the File Manager and you will see a file in the format backup-date-time_user.tar.gz. You need to rename this file to cpmove-user.tar.gz format to perform the migration to DirectAdmin.

Migrate cPanel to DirectAdmin

Below is I have changed the name to cpmove-user.tar.gz. In which dotrungq is the user of the cPanel account and cannot renamed this user.

Migrate cPanel to DirectAdmin

Backup by command in SSH as root

If you have ssh access to the server as root, you can do a quick backup with the following command: (replace $username with your username)

AZDIGI Tutorial
script /scripts/pkgacct $username

Step 2: Build the environment to migrate cPanel to DirectAdmin

Next, SSH into the DirectAdmin server and execute the following commands: Explanation of commands:

AZDIGI Tutorial
cd /usr/local/directadmin/custombuild
./build update
./build cpanel_to_da

In there:

  • Command 1: Move into CustomBuild folder
  • Command 2: Latest Update
  • Command 3: Build cPanel options to DirectAdmin

Practical examples

Screenshot 2021 01 21 at 20.37.14@2x

Once you have completed the cPanel to DirectAdmin build, there should be no configuration conflicts when migrating cPanel to DirectAdmin.

Step 3: Upload the Backup cPanel file to DirectAdmin

On DirectAdmin, you create a new folder to save the backup file of cPanel with the following command:

AZDIGI Tutorial
mkdir -p /home/admin/backup_files

After creating the backup_files folder, upload the cPanel backup file to this folder. There are many methods for you to migrate files directly from cPanel to DirectAdmin, such as SCP or Rsync, or you can download and upload the file directly to DirectAdmin in the /home/admin/backup_files directory. After uploading the file, you need to assign the file and folder permissions to admin for DirectAdmin to execute.

You can use the command:

AZDIGI Tutorial
chown -R admin. /home/admin/backup_files/

Step 4: Restore the cPanel backup file on DirectAdmin

Please log in to DirectAdmin’s admin interface with http://ip:2222, the access DirectAdmin => Admin tools => Admin Backup/Transfer => Restore

Screenshot 2021 01 21 at 21.26.00@2x

Next, in the Path line, enter the backup path created in Step 3 => click NEXT STEP

Screenshot 2021 01 21 at 21.26.41@2x

At this interface, if your server has more than 1 IP, you can choose to assign that user with the IP to assign. But if your server only has 1 IP, click NEXT STEP.

Screenshot 2021 01 21 at 21.27.39@2x

With Step 3 in the Files section, select the uploaded cPanel backup file and RESTORE to start the Restore process.

Screenshot 2021 01 21 at 21.28.48@2x

After clicking, you will receive a notification and this process will run in the background and you can completely turn off this window. Restore time will depend on data size, system configuration and resource usage at that time.

Screenshot 2021 01 21 at

Actual image after successful restore:

Screenshot 2021 01 21 at 20.52.39@2x

III. Summary

Thus, AZDIGI has guided you to complete migrating cPanel User to DirectAdmin quickly and safely, saving you more time than doing it manually.

See more useful articles about DirectAdmin at the following link:

If you need assistance, you can contact support in the ways below:

Đánh giá

Tham gia nhóm hỗ trợ Server - Hosting

Tham gia nhóm Hỗ trợ Server - Hosting & WordPress để cùng nhau hỏi đáp và hỗ trợ các vấn đề về WordPress, tối ưu máy chủ/server.

Tham gia ngay

Bài viết cùng chuyên mục

AZDIGI – Không chỉ là đơn vị hàng đầu trong lĩnh vực Web Hosting và Máy chủ, chúng tôi mong muốn mang lại những kiến thức bổ ích nhất và luôn cập nhật thường xuyên cho cộng đồng người đam mê thiết kế website, công nghệ,…

Vui lòng không sao chép nội dung nếu chưa xin phép. Designed and Developed by PenciDesign