How-to: cPanel to DA migration

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.

Hm.. I didn't think they were cutting DB names lately :) Please try the following version for it:
Code:
wget -O /usr/local/directadmin/scripts/cpanel_to_da/cpanel_to_da.sh https://custombuild.eu/cpanel/cpanel_to_da.sh.0.0.20
 
Last edited:
Hi,

We're doing some larger restores (2000+ accounts) and to speed things up we're running multiple restores at the same time.

Occasionally we get this error:

Unable to lock /etc/proftpd.passwd which causes the restore for the specific account being processed at the time to fail.

Is it possible to have the script re-try locking the proftpd.passwd multiple times? To ensure the restore completes properly?

Also, a followup - when this happens, we cannot re-restore the account ( since it's half created in DirectAdmin )

Let's say for example the username is edition1 - there will be a home folder /home2/edition1, but if I Show All Users, the "edition" doesn't show up.

If I type "edition1" in the top magic search field, I get results: https://dsc.cloud/Lightspeed/Screen-Shot-2019-07-25-19-24-29.35.png but if I click on the user, I get this error: Unable to show user Error reading their user files ( https://dsc.cloud/Lightspeed/Screen-Shot-2019-07-25-19-25-17.86.png )

My question is how do I successfully remove the user so I can re-restore the account?

Thanks,


Richard
 
Hello,

The locking mechanism already does retry 200 times with 1/100s between attempts.
This would give the lock a full 2s to get the lock before giving up.

However, as it's clearly not enough in your case (either huge file or slow disk I/O), I've bumped it to 6s:
https://www.directadmin.com/features.php?id=2432

Pre-release binaries are going up now with the change.
Can be downloaded from here in about 10 minutes:
https://help.directadmin.com/item.php?id=408

----
If there is some data and the account exists on the system (eg: `id edition1`), I'd recommend bringing the account back up to a valid state before removing.
Use option #2 from this guide:
https://help.directadmin.com/item.php?id=456
 
Hello,
However, as it's clearly not enough in your case (either huge file or slow disk I/O), I've bumped it to 6s:
https://www.directadmin.com/features.php?id=2432
----
If there is some data and the account exists on the system (eg: `id edition1`), I'd recommend bringing the account back up to a valid state before removing.
Use option #2 from this guide:
https://help.directadmin.com/item.php?id=456

Thanks. I appreciate the fast turnaround.


Richard
 
This thread went huge, and very difficult and time-wasting to use it for a migration...
I suggest to create a page about "migration from cpanel to directadmin" in your knowledge base and keep it up-to-date with last version scripts...
 
This thread went huge, and very difficult and time-wasting to use it for a migration...
I suggest to create a page about "migration from cpanel to directadmin" in your knowledge base and keep it up-to-date with last version scripts...


All the latest information is in the 1st post. Latest stable version is always available/provided in CustomBuild (0.0.20 at the moment) :) I could have just turned comments off in this thread, and created a separate one, if you find it confusing.
 
i got this error when restore the full backup from cpanel.. and restore in DA.

Unable to extract backup/user.conf from /home/admin/all_backups/xtremeka.tar.gz
Error while extracting backup/user.conf to /home/admin/all_backups/xtremeka as admin : /bin/tar: backup/user.conf: Not found in archive
/bin/tar: Exiting with failure status due to previous errors


Cannot read /home/admin/all_backups/xtremeka/backup/user.conf : Unable to open /home/admin/all_backups/xtremeka/backup/user.conf for reading.
No such file or directory



any idea?
 
i got this error when restore the full backup from cpanel.. and restore in DA.

Unable to extract backup/user.conf from /home/admin/all_backups/xtremeka.tar.gz
Error while extracting backup/user.conf to /home/admin/all_backups/xtremeka as admin : /bin/tar: backup/user.conf: Not found in archive
/bin/tar: Exiting with failure status due to previous errors


Cannot read /home/admin/all_backups/xtremeka/backup/user.conf : Unable to open /home/admin/all_backups/xtremeka/backup/user.conf for reading.
No such file or directory



any idea?

Backup filename must be cpmove-username.tar.gz (or .tar) for cPanel backups :) otherwise it expects DA-format backup
 
I'm trying to get up to speed with DA, my VPS provider is assisting me with migrating from WHM/cPanel over to DA. One thing I'm a bit stuck on is what to do with mailman lists clients have..

What are people using instead of mailman? the lists are used as a collaboration type tool, so any member of the list can send an email to the list, rather than just one-way type communication like a newsletter.

Thanks
 
I'm trying to get up to speed with DA, my VPS provider is assisting me with migrating from WHM/cPanel over to DA. One thing I'm a bit stuck on is what to do with mailman lists clients have..

What are people using instead of mailman? the lists are used as a collaboration type tool, so any member of the list can send an email to the list, rather than just one-way type communication like a newsletter.

Thanks

DirectAdmin uses Majordomo for mailing lists, it’s controlled from DirectAdmin interface.
 
DirectAdmin uses Majordomo for mailing lists, it’s controlled from DirectAdmin interface.

thanks, so just a case of setting up the lists then.. I'll have to check out the options and make sure I understand them all.. mailman was pretty easy for the users so hopefully they will adapt.. for the few than use mailing lists.

Thanks
 
cPanel to DA code is not working

Hello,

I'm just stuck on the code below:

rsync -avt --delete /home/all_backups/ root@:/home/all_backups/

it gives connection error. Is not it normal? How can Cpanel connect to Directadmin without root password?
 
I've setup a list to test things out.. but it seems an address not on the list is able to send to the list. I want to restrict the list so only members can post to the list..

the options are far from intuitive in the interface, for me anyway :-)

if anyone can explain what option I need to set in order to restrict that I would be grateful.

Thanks
Nathan
 
Hello,

I'm just stuck on the code below:

rsync -avt --delete /home/all_backups/ root@:/home/all_backups/

it gives connection error. Is not it normal? How can Cpanel connect to Directadmin without root password?

You're missing server IP after @.. :) Also, if ssh port is different on destination server, you need to add this after rsync:
Code:
-e "ssh -p[B]YOUR_SSH_PORT[/B]"
 
Directadmin backup restore replace existing users accounts, it should fails or showing an alert message when username to restore coincide with an existing user.
 
Directadmin backup restore replace existing users accounts, it should fails or showing an alert message when username to restore coincide with an existing user.
Hello,

DirectAdmin restores are designed to merge with existing accounts, eg: to restore things things that might have been deleted, without deleting everything first.
Throwing an error would contradict that design.

As the your point is valid, if it works for you, I'll make any account that already exists have that restore tar.gz be highlighted in a different color?
I've added this:
https://directadmin.com/features.php?id=2439

Let me know if anyone things a checkbox for the Admin/Reseller Level restores should have an option for a full-stop error on duplicate account merges.

John
 
Hello,

I compared the gzip contents with cpmove file created by the method in this first post of this thread and compared it with the regular cpanel backup file. They look the same but just in case i ask.. so does now the DA restore works also with backups created by cpanel user level Full backup function (backup-8.1.2019_00-57-29_somedomain.tar.gz).

Do i only have to rename the file to cpmove (cpmove-somedomain.tar.gz) ?


Thanks!
 
Im getting "The file must be of the form: type.creator.username.tar.gz" at Admin tools >>>admin backup/transfer >>>restore.

Opened up a ticket regarding this but the response is very slow, trying to get this completed today so I dont have to pay another month of cPanel + my old server.
 
Hello,

I compared the gzip contents with cpmove file created by the method in this first post of this thread and compared it with the regular cpanel backup file. They look the same but just in case i ask.. so does now the DA restore works also with backups created by cpanel user level Full backup function (backup-8.1.2019_00-57-29_somedomain.tar.gz).

Do i only have to rename the file to cpmove (cpmove-somedomain.tar.gz) ?


Thanks!

The feature is only available in admin-level.
 
Back
Top