How-to: cPanel to DA migration

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
8,341
Location
LT, EU
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.
 

Bipul-HostMight

Verified User
Joined
Jul 1, 2019
Messages
12
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.
 

anson

New member
Joined
Jul 2, 2019
Messages
2
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.
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
8,341
Location
LT, EU
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 :)
 

xerox

Verified User
Joined
Jul 16, 2019
Messages
57
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.
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
8,341
Location
LT, EU
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 :)
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
8,341
Location
LT, EU
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:

asadkhan

Verified User
Joined
Jul 20, 2019
Messages
12
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
 

eva2000

Verified User
Joined
Jul 1, 2019
Messages
93
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 !
 

asadkhan

Verified User
Joined
Jul 20, 2019
Messages
12
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)
 

simplificare

Verified User
Joined
Jul 10, 2019
Messages
16
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
 

kebirhost

Verified User
Joined
Jul 8, 2019
Messages
84
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
 

emiliomedina21

Verified User
Joined
Jul 23, 2019
Messages
18
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?
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
8,341
Location
LT, EU
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 :)
 

ffarias

New member
Joined
Jul 18, 2019
Messages
2
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.
 
Top