How-to: cPanel to DA migration

urgido

Verified User
Joined
Oct 28, 2008
Messages
364
You need to upgrade MySQL on the DirectAdmin server to 5.7 or higher
Thank you.
I did the following steps to doing a re-restoration from cpmove files.
1.- Users deleted from DA web interface (I don't know if there is a bash command to perform a bulk user's delete).
2.- After terminate all accounts (except admin) I tried to restore the backups but an error message prompt on my window regarding about there are no X reseller so, I check the backup folder (/home/admin/all_backups) and I can see files like user.* and reseller.* (I think these are backups generated by DA).
3.- Finally, I remove these files mentioned before and the backup process succesful executed.
4.- Upgrade to mysql 5.7 from 5.5 on step-by-step version

I will update you soon with the results.
Best regards
 
Last edited:

urgido

Verified User
Joined
Oct 28, 2008
Messages
364
For the past day or two I have been using the built-in cpanel-to-da tools on the latest RC. I think, literally just this morning there was another update. It's slowly getting better and better!

So, for most of my accounts I have been able to migrate my cpmove with these latest built-in DirectAdmin tools, and then I go back and assign the user an existing package that matches their old one because it was showing up as blank package. I don't think I've yet "fixed" the account owner/creator name (if I recall.. where it leaves the old cPanel value for reseller/owners..), but nearly all my sites now migrate 100% with no issues. Even complex WordPress sites move flawless as long as you have the required stuff compiled and you're using similar setup (like LiteSpeed cPanel to LiteSpeed DirectAdmin, etc.)

Many of my users are WordPress, and it's really nice having a little extra security option for scanning logs regarding WP security. Sure, there's plenty of plugins that exist for WordPress to protect itself, but it's really nice that DirectAdmin acknowledges what a PITA it is to keep a zillion WordPress sites free of hacks, and I trust anything scanned on the server-software level than a third party plugin running on the thing you want to protect in the first place! Really excited to see it in action and help make improvements and suggestions to it.

Making sure my various users WordPress plugins work (permissions correct, all required modules installed, etc.) are very important and so far it's been a breeze.

I'm also taking this time to jump another ship -- not only leaving cPanel, but we're leaving Softaculous behind (RIP Fantastico? What happened to them??), so instead of cPanel + Soft we're going full DirectAdmin + Installatron. They have maybe fewer apps, but they're more quality.

What I mean by this is, I know not all my users are going to want a full-blown WHMCS installation, or another copy of Roundcube (what the hell Soft? hehe). They're more basic, they want USER SCRIPTS not developer or enterprise scripts. Like a WordPress blog, or an online poll, or more file sharing, or a message board. They don't need to ever install Roundcube again, or need Postfix Admin, or unpopular "slim" blog apps (Sorry b2, egg, Dotclear, Leaf, FlatPress, LifeType... my clients barely keep up with WordPress!). Why do I need 70% of Softaculous to be idle and unused on all my servers because my clients don't use more than half of their products.

Not to get too off-topic, but speaking of Soft VS. Installatron, Softaculous base price direct from their website is $24/Year per dedicated ($12/Year VPS). Installatron base price is $50/Year per dedicated ($25/Year VPS). I think I'm done buying "lifetime" licenses. It's not really about saving money -- I want the support, and I want to support good developers. I can't imagine anyone running DirectAdmin from 3 years ago without seeing any new features just to save a few bucks. Pay these guys so you don't have to go back to Webmin like it's 1999. It's rare that a closed source company listens so closely to their user base. If I can run DirectAdmin for another 16 years like I previously ran cPanel/WHM, I'm going to be one really happy guy.

Where do I send bottles of champagne to? We're all going to need to celebrate: See Ya cPanel
Well, for us results very complicated assign each user manually. Regarding soft vs installatron, softaculous started here I remember that the owner did a survey related na,scripts, features, name (this was funny) etc. We use on our servers softaculous with a yearly license, our users as you said install innecesary stuff but people wants to see more more scripts inclusive when they don't know for what are or anything else.

The community here since I remember is very close, friendly and helpful maybe because is not big than cpanel. I hope not the growing affects it.

Regards
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
8,478
Location
LT, EU
0.0.12 fixes SSL cert migration from newer versions of cpanel: http://forum.directadmin.com/showthread.php?t=58153&p=297574#post297574

RoundCube issue confirmed, note added to the guide :) It fully supports MySQL format, but not sqlite (which is likely the default now in cPanel?). We'll be working on it and inform you when a bugfix is available for that.

Thank you for all the feedback (and good words, we see them!).
 

Richard8

Verified User
Joined
Jul 4, 2019
Messages
67
SQLite and MariaDB typically are on cPanel / CloudLinux servers. I see very few running regular MySQL 8 for example. I think I even converted to latest Maria10 immediately after installing DirectAdmin on new servers.

For us cPanel users, lots of things like SpamAssassin, EasySpam, BlockCracking, etc. are automatic necessitates. Does moving the directadmin.conf file around between servers give us any easy method to spin up new DirectAdmin identical setups faster?

If I have 100 servers that all need SpamAssassin set to auto update, BlockCracking on I have to sit here with several rows of DirectAdmin servers loaded, and click on each window. I could easily come up with a shell script to help me and I will likely do this, but I'm wondering while we are talking about migration (not to get off-topic about Roundcube importing issues), will there be or is there a cleaner more proper native method to rapidly deploy DirectAdmin configs? I get the "perfect" server set up, everything's great. Now I need it 1,000 more times.

Do I just write a script or is there X Y Z files I can copy, place somewhere, and run ./build cloneserv and it does magic? :cool:
 

AshSG

New member
Joined
Jul 10, 2019
Messages
1
SQL Error

So I migrated a test account from CPanel.

I got the expected error about the SQL Username having to change, but that also seem's to have broken the import of the SQL into the database leaving the database empty.

Unable to restore database xxxxxx_xxxxx.sql to xxxxxx_xxxxx : ERROR 1044 (42000) at line 22 in file: '/home/xxxxx/backups/backup/xxxxxx_xxxxx.sql': Access denied for user 'xxxxxx'@'localhost' to database 'xxxxxx_xxxxxx'
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
8,478
Location
LT, EU
RoundCube data from sqlite should be converted from version 0.0.13. Please let us know if you notice any issues.
Code:
cd /usr/local/directadmin/custombuild
./build update
./build cpanel_to_da
./build versions | grep -i cpanel
If it shows older than 0.0.13 (not all mirrors might be in sync yet, so, could take a couple of hours when all have 0.0.13), do this to update it manually:
Code:
wget -O /usr/local/directadmin/scripts/cpanel_to_da/cpanel_sqlite_da_roundcube.php https://custombuild.eu/cpanel/cpanel_sqlite_da_roundcube.php.txt
wget -O /usr/local/directadmin/scripts/cpanel_to_da/cpanel_to_da.sh https://custombuild.eu/cpanel/cpanel_to_da.sh
 

trix.hosting

Verified User
Joined
Jun 21, 2016
Messages
65
Location
Tucuman - Argentina
excellent work, after some manual adjustments, i have migrate totally from cpnl to DirectAdmin 389 accounts with reseller. Some advert: when you migrate an user with subdomain, the subdomains are create as domain pointers in DA, you have to manually delete pointers and then the subdomains start working again
 

Richard8

Verified User
Joined
Jul 4, 2019
Messages
67
RoundCube data from sqlite should be converted from version 0.0.13. Please let us know if you notice any issues.
Ensured I was updated, on latest version 0.0.13 and latest DA. Migrated user, logged in to email on DA.

1) Mail Included
2) Contacts Included (NEW)

Other user settings in Roundcube are still missing, however:

- No options (time format, timezone, date, etc.)
- No identities (blank Display Name, blank Signature)

One thing this user doesn't specifically have is Responses, but I assume if it's not copying the base user settings like their From: name or email sig, then it's likely not copying the unique user set responses.

Getting closer! I'm here for the next 12-15 hours, feel free to update again if you make more changes to finish Roundcube migration.
 

urgido

Verified User
Joined
Oct 28, 2008
Messages
364
RoundCube data from sqlite should be converted from version 0.0.13. Please let us know if you notice any issues.
Code:
cd /usr/local/directadmin/custombuild
./build update
./build cpanel_to_da
./build versions | grep -i cpanel
If it shows older than 0.0.13 (not all mirrors might be in sync yet, so, could take a couple of hours when all have 0.0.13), do this to update it manually:
Code:
wget -O /usr/local/directadmin/scripts/cpanel_to_da/cpanel_sqlite_da_roundcube.php https://custombuild.eu/cpanel/cpanel_sqlite_da_roundcube.php.txt
wget -O /usr/local/directadmin/scripts/cpanel_to_da/cpanel_to_da.sh https://custombuild.eu/cpanel/cpanel_to_da.sh
Excellent work on few days.
 

urgido

Verified User
Joined
Oct 28, 2008
Messages
364
I am also curious about this, although I think I've already migrated most of my packages by hand now (under 50 plans total, using side-by-side browsers).
Here is a reply from DA staff:
Hello,

Reseller should be restored with its packages.
You should restore the reseller first, and then restore his users in order to have them assigned to that user.
With the latest version, if a reseller of a user does not exist - it should be assigned to an admin user.
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
8,478
Location
LT, EU
Ensured I was updated, on latest version 0.0.13 and latest DA. Migrated user, logged in to email on DA.

1) Mail Included
2) Contacts Included (NEW)

Other user settings in Roundcube are still missing, however:

- No options (time format, timezone, date, etc.)
- No identities (blank Display Name, blank Signature)

One thing this user doesn't specifically have is Responses, but I assume if it's not copying the base user settings like their From: name or email sig, then it's likely not copying the unique user set responses.

Getting closer! I'm here for the next 12-15 hours, feel free to update again if you make more changes to finish Roundcube migration.
Should be fixed in 0.0.14 :) Was just a missing N letter in converter (small things - major consequences). Please let us know the feedback. Thank you!
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
8,478
Location
LT, EU
excellent work, after some manual adjustments, i have migrate totally from cpnl to DirectAdmin 389 accounts with reseller. Some advert: when you migrate an user with subdomain, the subdomains are create as domain pointers in DA, you have to manually delete pointers and then the subdomains start working again
Fixed in 0.0.14, thank you for the report!
 

dotcanada

Verified User
Joined
Aug 20, 2003
Messages
11
Filename suggestions

Great tool. This will definitely help us move from cPanel to DA. Thanks.

If I could make a couple of suggestions...

1 - Would it be possible to recognize username.tar.gz files instead of just cpmove-username.tar.gz files?

I know it's not a big deal to run the script in the first post to rename all of the files, but the less manual steps involved then the less chance something gets broken... My theory is that cPanel creates backup files that can be used with this directly and these backups are named username.tar.gz

2 - Extending that a step further, we don't want to compress the backups since that will add hours to the backup process - would it be possible to recognize username.tar files? Same reasoning as step 1.

That being said, we are ok with renaming the backups and gzipping them to work with this import tool.

Here is the script we used to convert all of our .tar backups to .tar.gz ... ( note: this tool almost 2 hours to process 141 accounts backups with 450 gb of data )

Code:
for i in `ls *.tar | grep '^[A-Za-z0-9]*.tar'`; do { gzip -1 ${i} ; }; done
Cheers,


Richard
 

pkwebhost

Verified User
Joined
Jul 2, 2019
Messages
36
1)
Creating domain getting this error and restoring backup

Unable to create directory /home/admin/domains/socialflag.net,
A directory component in /home/admin/domains/socialflag.net does not exist or is a dangling symbolic link

Unable to find /home/admin/domains
Error creating /home/admin/domains/socialflag.net/public_html
A directory component in /home/admin/domains/socialflag.net/public_html does not exist or is a dangling symbolic link

Error creating /home/admin/domains/socialflag.net/public_html/cgi-bin
A directory component in /home/admin/domains/socialflag.net/public_html/cgi-bin does not exist or is a dangling symbolic link

Error creating /home/admin/domains/socialflag.net/public_html/cgi-bin/.htaccess
Unable to open /home/admin/domains/socialflag.net/public_html/cgi-bin/.htaccess for writing: No such file or directory

Unable to create directory /home/admin/domains/socialflag.net/public_ftp,
A directory component in /home/admin/domains/socialflag.net/public_ftp does not exist or is a dangling symbolic link

Unable to create directory /home/admin/domains/socialflag.net/public_ftp/incoming,
A directory component in /home/admin/domains/socialflag.net/public_ftp/incoming does not exist or is a dangling symbolic link


Errors encountered while creating domain. Not adding domain to /etc/named.conf
Error Creating Domain


1)
File does not exist or you don't have access to file /home/admin/all_backups//user.admin.sahboud.tar.gz
Reason: Permission denied
File being read as 'sahboud'
drwx------ admin admin /home/admin
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
8,478
Location
LT, EU
2 - Extending that a step further, we don't want to compress the backups since that will add hours to the backup process - would it be possible to recognize username.tar files? Same reasoning as step 1.
.tar is supported for cpmove-user files, didn't it work?
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
8,478
Location
LT, EU
1)
Creating domain getting this error and restoring backup

Unable to create directory /home/admin/domains/socialflag.net,
A directory component in /home/admin/domains/socialflag.net does not exist or is a dangling symbolic link

Unable to find /home/admin/domains
Error creating /home/admin/domains/socialflag.net/public_html
A directory component in /home/admin/domains/socialflag.net/public_html does not exist or is a dangling symbolic link

Error creating /home/admin/domains/socialflag.net/public_html/cgi-bin
A directory component in /home/admin/domains/socialflag.net/public_html/cgi-bin does not exist or is a dangling symbolic link

Error creating /home/admin/domains/socialflag.net/public_html/cgi-bin/.htaccess
Unable to open /home/admin/domains/socialflag.net/public_html/cgi-bin/.htaccess for writing: No such file or directory

Unable to create directory /home/admin/domains/socialflag.net/public_ftp,
A directory component in /home/admin/domains/socialflag.net/public_ftp does not exist or is a dangling symbolic link

Unable to create directory /home/admin/domains/socialflag.net/public_ftp/incoming,
A directory component in /home/admin/domains/socialflag.net/public_ftp/incoming does not exist or is a dangling symbolic link


Errors encountered while creating domain. Not adding domain to /etc/named.conf
Error Creating Domain


1)
File does not exist or you don't have access to file /home/admin/all_backups//user.admin.sahboud.tar.gz
Reason: Permission denied
File being read as 'sahboud'
drwx------ admin admin /home/admin
If you're restoring as 'sahboud', you cannot take files from /home/admin :) Please place them to /home/sahboud/...
 

Richard8

Verified User
Joined
Jul 4, 2019
Messages
67
.tar is supported for cpmove-user files, didn't it work?
My latest cpmove backups are generated correctly (.tar.gz) I used gzip to compress any that were only .tar to cpmove-user.tgz and then renamed it the long format of cpmove-user.tar.gz, then restored that.
 
Top