How-to: cPanel to DA migration

Hi,
I followed your steps everything went ok,
However all the domains are containing the DNS Records (IP Addresses) of old server.

You may select IP address for restores when restoring the backup. What did you choose in 2nd step there? I guess "Use IP from backup"?
 
You may select IP address for restores when restoring the backup. What did you choose in 2nd step there? I guess "Use IP from backup"?

I'm just converting cPanel server right now. I had issues with disk space. I put all backup files in SSD which is 400GB. And backup files in it are 300GB total size. But everytime it restores tar.gz file, it creates user.admin.tar file. So, after some backup process, my diskspace went up full.

Is there a trick to not having this user.admin files? Or is it safe to remove them while backup process is still up?
 
total newbie to DA...

After having reseller hosting for a decade or so - but all has been with cpanel 'till now.

Having much trouble getting into DA on my older work PC, so I wonder:
Is DA made ONLY to log in & work with certain browsers ??

Thanks for any helpful replies !!
 
I'm just converting cPanel server right now. I had issues with disk space. I put all backup files in SSD which is 400GB. And backup files in it are 300GB total size. But everytime it restores tar.gz file, it creates user.admin.tar file. So, after some backup process, my diskspace went up full.

Is there a trick to not having this user.admin files? Or is it safe to remove them while backup process is still up?

You could restore them in chunks, when restored, you may remove user.admin.username.tar.gz files.
 
Here is quick-and-dirty FreeBSD compatibility patch just in case anyone needs it.
I managed to get rid of errors, but I cannot guarantee the correctness of all edits.
At least I have moved 30 accounts with it, almost without issues.
 

Attachments

Is there a easy and fast way to search and unlock an IP from BFM list? Is very slow list and unlock the ips mannually page by page.
 
I noticed a problem with subdomains, on Cpanel the subdomain directory has 0750 permissions but that doesn't work on DirectAdmin at least not with a .htaccess in it .Changing the permissions of the directory to 0755 solves the problem. Anybody else had this?
 
I noticed a problem with subdomains, on Cpanel the subdomain directory has 0750 permissions but that doesn't work on DirectAdmin at least not with a .htaccess in it .Changing the permissions of the directory to 0755 solves the problem. Anybody else had this?

This is not a cPanel thing. You ran mod_ruid2 on cPanel server I guess, but you did not use it on DirectAdmin. Am I right? :)
 
It will depend on what the group ownership of the subdomain DocumentRoot is.

If the ownership for that DocumentRoot directory is user:apache then 750 permissions should work (apache would still have privileges to read and execute through that directory)

If the ownership for that DocumentRoot directory is set to user:user then no... 750 won't work... the apache user won't have privilege to read or execute through that directory.

The question is... does DirectAdmin default to DocumentRoot ownership of user:user or user:apache? Then the answer to that question would determine what the default permission setting should be (if user:user then 755, if user:apache then 750). The latter is probably a bit better in terms of security, but doesn't necessarily gain a whole lot.
 
If the ownership for that DocumentRoot directory is set to user:user then no... 750 won't work... the apache user won't have privilege to read or execute through that directory.

Just a FYI: it would, if mod_ruid2 is used :) As apache process runs as user then. All the other cases - it wouldn't.
 
This is not a cPanel thing. You ran mod_ruid2 on cPanel server I guess, but you did not use it on DirectAdmin. Am I right? :)

I have Cloudlinux and use mod_lsapi as php handler I don't have mod_ruid2 installed. I have taken a closer look and I see that all subdomain directories as are the public_html directories are owned by the user and the group is nobody the permissions are all 0750 on the DirectAdmin servers I have nginx + apache + php-fpm.

If I would run Apache+mod_ruid2 on the DirectAdmin server and move the accounts from the Cpanel server the subdomains would work with permission 0750? And when i am done with the migration and switch to nginx + apache + php-fpm. will the permissions of the subdomains be converted to 0755?
 
Just change the group ownership of those DocumentRoots to apache.

DirectAdmin runs Apache as the apache user. cPanel runs Apache as the nobody user. ... if - like @smtalk says - you are not using mod_ruid2.
 
Database error while restoring some accounts

Some accounts on the cpanel server have their database username as: cpaneusername_first_second (double underscores).

This seem to be throwing an error:

Your database username (first_second) contains invalid characters (_). MySQL account will not be created on cpanelusername_dbname.

I could do a manual database/user creation but since there are a lot of users with that format, am hoping there's a special flag that can be enabled to discard checking for double underscores?

Also another error:

COLLATION 'latin1_swedish_ci' is not valid for CHARACTER SET 'utf8'

I have the same version of MySQL on cpanel and DA.
 
Some accounts on the cpanel server have their database username as: cpaneusername_first_second (double underscores).

This seem to be throwing an error:

Your database username (first_second) contains invalid characters (_). MySQL account will not be created on cpanelusername_dbname.
https://www.directadmin.com/features.php?id=1253

COLLATION 'latin1_swedish_ci' is not valid for CHARACTER SET 'utf8'

I have the same version of MySQL on cpanel and DA.

Please check "mysql -V" as root on both servers.
 
You can just do:
Code:
/usr/local/directadmin/directadmin set allow_db_underscore 1
service directadmin restart

Regarding mysql, try:
Code:
mysql_upgrade --defaults-extra-file=/usr/local/directadmin/conf/my.cnf
 
You can just do:
Code:
/usr/local/directadmin/directadmin set allow_db_underscore 1
service directadmin restart

Regarding mysql, try:
Code:
mysql_upgrade --defaults-extra-file=/usr/local/directadmin/conf/my.cnf

Thanks, when I do the mysql_upgrade, I get the following:

Checking if update is needed.
This installation of MySQL is already upgraded to 5.7.24, use --force if you still need to run mysql_upgrade


Not upgrading to 5.7.26
 
You can just do:
Code:
/usr/local/directadmin/directadmin set allow_db_underscore 1
service directadmin restart

Regarding mysql, try:
Code:
mysql_upgrade --defaults-extra-file=/usr/local/directadmin/conf/my.cnf

mysql_upgrade gives me the following:

Checking if update is needed.
This installation of MySQL is already upgraded to 5.7.24, use --force if you still need to run mysql_upgrade


The cpanel one is 5.7.26
 
Email Transfer

The script is working great for me with one exception--it creates email accounts but only will transfer the emails/mail files when the user name matches the account name (which is a rare case for me). Source accounts use maildir. I don't see any errors/warnings except for the warning for merging the user when it matches the account name.

Any idea why they aren't copying? I can copy the mail data manually afterward, but it would be nice to not have to do that.
 
Back
Top