How-to: cPanel to DA migration

Thanks! I case i would i would like to remove all users/accounts from DA and start migration again. If i remove the accounts from DA, are there any leftovers or do i need to clean it somehow before i start again?

This would lead to data inconsistency, if DA is your production server now :) I'd just suggest using "Move accounts between customers" feature to assign users to their resellers, and then assign them the packages needed.
 
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.

Thank you very much for the details post, I'm looking here a restore command without using admin UI .
Also restore command for cpmove-{USER}.tar.gz format as well as.
 
Thank you very much for the details post, I'm looking here a restore command without using admin UI .
Also restore command for cpmove-{USER}.tar.gz format as well as.

This. Would be beneficial to monitor the restoration progress through tail if there is a restoration log output. Currently, seems like there is only error.log.
 
This. Would be beneficial to monitor the restoration progress through tail if there is a restoration log output. Currently, seems like there is only error.log.

When you click "restore", you could just run:
Code:
/usr/local/directadmin/dataskq d

To see the process. However, it's ran every minute by a cronjob, so, you must be fast to run it :)
 
This would lead to data inconsistency, if DA is your production server now :) I'd just suggest using "Move accounts between customers" feature to assign users to their resellers, and then assign them the packages needed.

Right. Thats true, but i was just pre-testing the migration and now need to do it again. If i remove the accounts now, does it move every bits of info?

I would rather not start the DA installation from the beginning / from clean OS..

If that's enough to just remove all the accounts, please let me know.

Thanks.
 
Right. Thats true, but i was just pre-testing the migration and now need to do it again. If i remove the accounts now, does it move every bits of info?

I would rather not start the DA installation from the beginning / from clean OS..

If that's enough to just remove all the accounts, please let me know.

Thanks.

Yes, it's really enough :)
 
0.0.19 available for testing:
Code:
wget -O /usr/local/directadmin/scripts/cpanel_to_da/cpanel_to_da.sh https://custombuild.eu/cpanel/cpanel_to_da.sh.0.0.19

Changelog:
Code:
* Use pigz to compress/decompress backups for multi-core utilization, should speed the things up a lot on multi-core boxes.
* If there are any [B]sytem_username[/B]@ mailboxes in add-on domains, they're merged with system mailbox account.
* Fix migration of autoresponders.
 
Last edited:
Too much time

hi sm,
hopes ur fine i m tring to move data from cpanel servers almost its size is 1.1TB so any fastest method available to restore the account if yes then let me know current one is taking too much time even showing different errors while restoring
please help me have to move 5 more servers too and just have 2 days more in renewal
 
hi sm,
hopes ur fine i m tring to move data from cpanel servers almost its size is 1.1TB so any fastest method available to restore the account if yes then let me know current one is taking too much time even showing different errors while restoring
please help me have to move 5 more servers too and just have 2 days more in renewal

Personally with that much data, i wouldn't be rushing things to try to move all servers. I'd move the smaller data size servers first in hopes of getting as many servers over in 2 days with rest probably needing to eat a renewal. Worst thing you can do is screw up a migration and it's data !
 
restoration error

Domain abc.com CreatedDomain Created Successfully

Unable to add user abc_wp394. Cannot load from mysql.db. The table is probably corrupted
Can't add user abc_wp394 to abc_wp394: Unable to add user abc_wp394. Cannot load from mysql.db. The table is probably corrupted

Error Adding Main Username to database: Can't find any matching row in the user table
Error with query "CREATE USER 'abc'@localhost" : Cannot load from mysql.db. The table is probably corrupted
Error Granting Main Username access to database: Can't find any matching row in the user table
Error with query:
ALTER DATABASE abc_wp394 CHARACTER SET 'utf8mb4' COLLATE 'latin1_swedish_ci'
COLLATION 'latin1_swedish_ci' is not valid for CHARACTER SET 'utf8mb4'
Unable to restore database abc_wp394.sql to abc_wp394 : ERROR 1045 (28000): Access denied for user 'abc'@'localhost' (using password: YES)
 
In response to a post that got added to the moderator queue, I was really struggling with the captcha! --

I think I found more info about the auto-responder issue I was having, the error log for the account restore had the following output:

/usr/local/directadmin/scripts/cpanel_to_da/cpanel_to_da.sh: line 637: [: 1563737028: unary operator expected

Looks like line 637 has some stuff to do with auto-responders.

Let me know if you need more info!

Michael
Simplificare
 
0.0.19 available for testing:
Code:
wget -O /usr/local/directadmin/scripts/cpanel_to_da/cpanel_to_da.sh https://custombuild.eu/cpanel/cpanel_to_da.sh.0.0.19

Changelog:
Code:
* Use pigz to compress/decompress backups for multi-core utilization, should speed the things up a lot on multi-core boxes
* If there are any [B]sytem_username[/B]@ mailboxes in add-on domains, they're merged with system mailbox account.


Very good job. The script convert wp-config.php with correct and new data but script can only change mysql user name. If you can add changing mysql database name, it will be very good.

Thanks,
Melih
 
An error occurred during the restore.

Hi everyone,
After updated cpanel_to_da.sh to 0.19 I can not restore cpmove-backup files. Pigz has been enabled but when I try to restore a backup file I got the following errors:

Code:
/usr/local/directadmin/scripts/cpanel_to_da/cpanel_to_da.sh: line 133: pigz: command not found
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
Failed to extract /home/admin/cpanel_users_backup//cpmove-angelmul.tar.gz to /home/admin/cpanel_users_backup//angelmul_cpanel_to_convert

Error converting file: /home/admin/cpanel_users_backup//cpmove-angelmul.tar.gz: Converting angelmul (/home/admin/cpanel_users_backup//cpmove-angelmul.tar.gz)...

cpmove-angelmul is not a valid username

If I excecute pigz command in console it works.
Can you help me?
 
It should be calling /usr/local/bin/pigz, not just "pigz". May you try:
Code:
cd /usr/local/directadmin/custombuild
./build update
./build cpanel_to_da

Let us know if it fixed this for you :)
 
Very good job. The script convert wp-config.php with correct and new data but script can only change mysql user name. If you can add changing mysql database name, it will be very good.

+1.
It would be perfect!
 
Did it change your database name? It should have been exactly the same.

Yes, the problem is as follows:
Some cPanel servers allow usernames longer than 8 characters. However, the MySQL user and database name is limited to 8 characters.

For example:
cPanel Username: sistemascreart
MySQL Username: sistemas_hachiko
MySQL Database: sistemas_hachiko


DirectAdmin restores MySQL Username and Database with the name sistemascreart_hachiko.
The script does a search on public_html and corrects only the username. It would be great if you also corrected the name of the database.
 
Back
Top