Convert cPanel accounts to DirectAdmin


As of version 1.57.4 of DirectAdmin, native conversion and restoration of cPanel user accounts is included using the standard admin backup GUI function found in DirectAdmin.

 

 

Conversion Guide

This article contains information about converting cPanel user acounts to the latest available DirectAdmin version.

 

 

The provided tool works by converting cPanel user backup files to DirectAdmin user backup files. This tool is designed to read all data directly from the cPanel user backup files.

This tool will convert cPanel backups created by both:

  • the /scripts/pkgacct script
  • cPanel's 'Full Backup' GUI tool

 

Converted Items

  1. basic account allocations
  2. sub-domains
  3. FTP accounts
  4. POP3 and IMAP accounts
  5. All mail data (Maildir and/or mbox format**)
  6. Squirrelmail settings
  7. addon domains
  8. user home files
  9. mysql databases
  10. domain pointers
  11. crontab entries
  12. transfers resellers and their packages
  13. transfers subdomain/domain data from custom folders
  14. E-mail forwarders get transferred
  15. MX records in DNS zones get transferred
  16. RoundCube data

DirectAdmin supports a different feature set than cPanel. For example, DirectAdmin supports nginx/openlitespeed, MySQL8, rspamd etc., but it has no support for PostgreSQL or Ruby. So, if you have any sites using them - they'd need to be transferred manually.

 

cPanel server

  1. Create backups of all cPanel accounts on your cPanel server and place them in /home/all_backups
    mkdir -p /home/all_backups
    for user in `ls /var/cpanel/users/`; do { /scripts/pkgacct ${user} /home/all_backups; }; done


  2. Transfer your backups from your cPanel server to your DirectAdmin server:
    rsync -avt --delete /home/all_backups/ root@your_directadmin_server.com:/home/admin/all_backups/

 

We're done with the cPanel server now. Let's connect to DirectAdmin server.

 

DirectAdmin server

  1. Make sure that:
    a) your DirectAdmin version is at least 1.57.4
    b) backup files in /home/admin/all_backups are owned by admin
    c) you have the latest version of the conversion script (enter the command below to update):
    cd /usr/local/directadmin/custombuild
    ./build update
    ./build cpanel_to_da
    chown -R admin. /home/admin/all_backups


  2. After transferring the accounts from the cPanel server, the converted cPanel accounts are now available in /home/admin/all_backups.

    You can simply login to DirectAdmin and head to the Admin Backup/Transfer section. You should set the correct restoration directory for the backup files to appear and you should doublecheck the Backup/Restore Settings (defaults should be fine).

You are now ready to restore your backups from the /home/admin/all_backups directory.

 

Considerations and Known issues

  • cPanel mdbox is supported in ver. 0.0.7, but hasn't been tested very throughly
  • Mailman mailing lists do not get converted to majordomo mailing lists
  • DirectAdmin format for mysql usernames/databases is always username_database and username_user. cPanel has the same format, but due to max username/database length it sometime shortens the username. cPanel allows myusername_ to have a DB username with myuserna_. DA DB names/usernames always start with myusername_, changing this would create a mess, for example, you could have myuserna user owning myuserna_db1 and myusername user owning myserna_db2. The script converts username to be username in such cases, so, for some accounts you might need to change database username/name in wp-config.php or other files CMS uses.
  • Max username length is 16 characters for MySQL users by default, and 10 for system user. Max username length can be increased in /usr/local/directadmin/conf/directadmin.conf
    /usr/local/directadmin/directadmin set max_username_length 16 restart
  • JetBackup format doesn't include cpmove-user directory inside, so, for now these need to be converted manually, like (would store converted backup in /home/admin/converted_user_backup):
    jetbackup=yes /usr/local/directadmin/scripts/cpanel_to_da/cpanel_to_da.sh /home/admin/user_backups/cpmove-USERNAME.tar.gz /home/admin/converted_user_backup
    chown -R admin. /home/admin/converted_user_backup

 

Free Site Transfers

If you have backups in cPanel format that you wish to have converted to DirectAdmin please contact our sales team. We are more than happy to arrange the conversion for you.

 

  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

Binding multiple IPs to one interface in Centos

The steps to add additional IP's to one network card / interface in Centos are as follows:1.)...

Mounting Partitions in CentOS 5.x

This is a basic security tip that can be executed to help protect your system. This is not an...

Installation of SpamAssassin on DirectAdmin

In this guide I will be explaining how to install and configure SpamAssasin on a Direct Admin...

Bandwidth allocation

Bandwidth is the amount of data that can be transferred to and from your account in one month....

Installation Clam Anti Virus (ClamAV) on DirectAdmin / CentOS

Clam AntiVirus is a popular open source (GPL) anti-virus toolkit for UNIX, designed for e-mail...