DirectAdmin Tutorials

Migrate Accounts from cPanel to DirectAdmin

Migrate Accounts from cPanel to DirectAdmin

Introduction

Migrate Accounts from cPanel to DirectAdmin

This article contains information about migration from cPanel to the latest available DirectAdmin version. There is currently no conversion tool which will help you migrate your cpanel accounts to DirectAdmin directly. However, there is a workaround where you can first convert to cPanel and then use this article to convert to DirectAdmin.

Prerequisites

Note that we will use the root account for logging in, this is done for demonstration purpose only. You should use an account without privileges when your proceeding to transfer data between two servers as this is a better security practice in general.

what is DirectAdmin?

DirectAdmin provides three levels of access, such as admin, user, and reseller, and is a web hosting control panel. DirectAdmin also offers both graphical and web-based interfaces. You can control an unlimited number of websites and email accounts using a DirectAdmin panel. The DirectAdmin panel does not provide all the features as same as that of cPanel, but it does provide equal user satisfaction as that of cPanel. You can purchase the DirectAdmin license from the InterServer client portal. DirectAdmin offers many administrator features, such as DNS Administration, IP Manager, Create/Modify Admins and Resellers, Mail Queue Administration, and more. To know more about the DirectAdmin features, please visit the DirectAdmin official website here: https://www.directadmin.com/features_list.php.

Migrate Accounts from cPanel to DirectAdmin

To migrate the cPanel accounts to DirectAdmin, follow the below steps:

1.  log in to your cPanel account as a root user via SSH.

2. run the following script to generate a full cPanel account password. Please note that the generated backup should be in the ‘cpmove-user.tar.gz’ format. The /scripts/pkgacct script packages all the accounts in a cPanel. Replace the <username> flag with the username of the cPanel account.

# /scripts/pkgacct <username> /home/user_backups;

3. After generating a backup, Log in to the DirectAdmin server as a root user.

Run the following command to sync the cPanel backup to the DirectAdmin server.

# rsync -avt /home/user_backups/ [email protected]<your_directadmin_server>.com:/home/admin/converted_user_backup/

The name of the backup file, in this case, is cpmove-USER.tar.gz. This is different for each account.

4. Check the DirectAdmin version by running the following command.

# /usr/local/directadmin/directadmin c | grep -i 'version='

Go to the ‘custombuild’ directory by running the following command.

# cd /usr/local/directadmin/custombuild

5. Next, update the build script by using the following command.

# ./build update

6. Then, install the cpanel_to_da plugin using the build script.

# ./build cpanel_to_da

7. Change the user and group ownership of the user backup file to admin by running the following command.

# chown -R admin. /home/admin/converted_user_backup

If your cPanel account username has a name length more than 8, then run the following command to increase the name length on the DirectAdmin server also by running the following command. In the following command, the value ‘16’ represents that the name length should set to 16 on the DirectAdmin server.

# /usr/local/directadmin/directadmin set max_username_length 16 restart

8. Now, log in to the DirectAdmin front-end by hitting the following URL in any of the browsers.

https://<Server_IP_Address>:2222

or

https://<Server_domain_name>:2222

9. Go to the ‘Admin Tools’ tab and select the ‘Admin Backup/Transfer’ option, as shown in the following screenshot.

10. You get redirected to the Admin Backups page, and from there to restore the backup in your server, click the ‘RESTORE’ button.

11. Next, change the path in the ‘Restore Backup’ page from undefined to the path of the backup in the server (/home/admin/converted_user_backup). Then only the backup gets displayed, and after that, click the ‘NEXT STEP’button.

Migrate Accounts from cPanel to DirectAdmin

12. Replace the IP address with the server IP and click the ‘NEXT STEP’ button.

Migrate Accounts from cPanel to DirectAdmin

13. ‘RESTORE’ button.

Now, the backup restoration gets initiated. This process of backup restoration gets added to the queue.

After the restoration completes, it displays a message with the subject ‘Your User files have been restored’ in the ‘My messages’ page.

Final Words

Congratulations! You have finally Migrate Accounts from cPanel to DirectAdmin on your server. Let us know in the comments how you managed to do it and dont forget to share it with your colleagues.

 

About the author

jon snow

Jon is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, and currently a content creator for ERRORHAT who loves working with computers and strongly believes in sharing knowledge.

Add Comment

Click here to post a comment