Known issues and caveats

  • RoundCube data is converted from sqlite (like ./homedir/etc/domain.com/user.rcube.db) just since version 0.0.14, make sure you run the latest.
  • cPanel mdbox is supported in ver. 0.0.7, but hasn't been tested very thoroughly.
  • Mailman mailing lists do not get converted to majordomo mailing lists
  • For security reasons use only cpmove-user.tar.gz files you created on your own: do not rely on third-party provided files.
  • 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 (https://forums.cpanel.net/threads/us...limits.630671/), is sometimes shortens the username part in from of it. 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. This should be rare though. Script output in such cases:
    WARNING! us_wordpress cannot be owned by user, renaming database user to user_wordpress
  • 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

Other caveats

  • It's recommended to leave all the cpmove-user.tar.gz files on the system after restore. If there are bugs, or something goes wrong, it'd still be possible to recover that 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.
  • 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. You can find max length of your username in cPanel easily:
    ls /var/cpanel/users | awk '{print length, $0}' | sort -nr | head -n1

    To increase it in DA to 16, for example, you can simply run:
    /usr/local/directadmin/directadmin set max_username_length 16 restart
  • To make sure your MySQL username/database name is fine, I'd suggest upgrading your MySQL/MariaDB on the server (https://www.directadmin.com/features.php?id=2294), MySQL 5.7+ or MariaDB 10.x is recommended.
  • I'd suggest trying it with 1 account first, most preferably - the one with the longest database name/username (guide for this in 2nd post) to make sure you have the nameservers you need and that you don't hit any limitations
  • If you have user.tar.gz instead of cpmove-user.tar.gz, it will not work! pkacct forms cpmove-users.tar.gz. If you have a list of user.tar.gz files, and want to rename them all in the current directory:
    for i in `ls *.tar.gz | grep '^[A-Za-z0-9]*.tar.gz'`; do { mv -vf ${i} cpmove-${i}; }; done
  • If you don't see the user in the "Move users between resellers" list, please apply: https://help.directadmin.com/item.php?id=251

MIGRATION STEPS

Steps to transfer ALL the accounts from cPanel server to DirectAdmin:

cPanel server:

1) Create a backup of all cPanel accounts on cPanel server and place them to /home/all_backups (make sure you have enough of space for them, if not, please read the suggestions at the end of the article):

mkdir -p /home/all_backups

for user in `ls /var/cpanel/users/`; do { /scripts/pkgacct ${user} /home/all_backups; }; done

2) Transfer /home/all_backups to DirectAdmin server:

rsync -avt --delete /home/all_backups/ root@your_directadmin_server.com:/home/admin/all_backups/

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

 

DirectAdmin server:

1) Make sure that:
- your DirectAdmin version is at least 1.57.4
- backup files at /home/admin/all_backups are owned by "admin"
- and that you have the latest version of convertor script

cd /usr/local/directadmin/custombuild
./build update
./build cpanel_to_da
chown -R admin. /home/admin/all_backups

2) We finally have DirectAdmin backups in /home/admin/all_backups  Now we can simply go to DirectAdmin "Admin Backup/Transfer" section, check "Backup/Restore Settings" (defaults should be fine) in Admin level and restore all backups from "/home/admin/all_backups" directory. 

That's it! 

 


 

If you have enough of space, I'd suggest leaving /home/admin/all_backups still there on DirectAdmin server for a couple of weeks/months, if there is something missing in DirectAdmin - you'd always have it in that backup.

If your cPanel server doesn't have enough space - it's easy to transfer accounts one-by-one directly to the home folder on a new server. The most convenient way to do this is to generate SSH keys on cPanel server using:

ssh-keygen

Then you'll have your public key placed in /root/.ssh/id_rsa.pub. Just copy the content of it to your DirectAdmin server, file /root/.ssh/authorized_keys (if /root/.ssh directory does not exist - create it). This will make it possible to connect to DirectAdmin server without any password (from your cPanel server). Now instead of steps 1) and 2) on cPanel server, just do this:

for user in `ls /var/cpanel/users/`; do { /scripts/pkgacct ${user} /home/all_backups; rsync -avt /home/all_backups/cpmove-${user}.tar.gz root@your_directadmin_server.com:/home/admin/all_backups/cpmove-${user}.tar.gz; rm -f /home/all_backups/cpmove-${user}.tar.gz ; }; done

 

Found this article interesting?
Subscribe to DomainRegister´s newsletter!

You can unsubscribe at any time by simply clicking the link in the footer of our emails. For information about our privacy practices, please visit our website.

We use Mailchimp as our marketing platform. By clicking below to subscribe, you acknowledge that your information will be transferred to Mailchimp for processing. Learn more about Mailchimp s privacy practices here.

  • DirectAdmin, cPanel
  • 0 Utenti hanno trovato utile questa risposta
Hai trovato utile questa risposta?

Articoli Correlati

 Come installare un certificato SSL su DirectAdmin

Per installare un certificato SSL su un server dotato di pannello di controllo DirectAdmin,...

 Come selezionare la versione di PHP in DirectAdmin

Per attivare una versione differente di PHP per un sito in DirectAdmin: effettuare il login...

 Come attivare un certificato SSL Let's Encrypt in DirectAdmin

Let's Encrypt è un servizio sponsorizzato principalmente da Mozilla, Google, che permette di...

 ConfigServer Security & Firewall (CSF) - readme

ConfigServer Security & Firewall (CSF) is the software firewall installed on our CronusCloud...

 File manager di DirectAdmin

Questa pagina fornisce informazioni sul file manager integrato di DirectAdmin. Il File Manager...