How-to: cPanel to DA migration

.tar is supported for cpmove-user files, didn't it work?

Oops.

To be honest I didn't try importing any .tar files since the first post gave this ominous warning "If you have user.tar.gz instead of cpmove-user.tar.gz, it will not work! pkacct forms cpmove-users.tar.gz. If you have a list of user.tar.gz files, and want to rename them all in current directory"

I assumed since the filename was strict about the filename, it would probably be stricter about the file format. Of course I should never assume.

So, that's on me. My bad. I'll check .tar restores on the next batch I restore.

Thanks,

Richard
 
WARNING! db_emirgiana_com cannot be owned by u8476722, renaming database user to u8476722_emirgiana_com
WARNING: unable to find database user password for 'user_8476722'@'XX.XXX.XX.XX'
WARNING! user_8476722 username cannot be set to u8476722, renaming database user to u8476722_8476722
WARNING: unable to find database user password for 'user_8476722'@'XX.XXX.XX.XX'
WARNING! user_8476722 username cannot be set to u8476722, renaming database user to u8476722_8476722
WARNING: unable to find database user password for 'user_8476722'@'XX.XXX.XX.XX'
WARNING! user_8476722 username cannot be set to u8476722, renaming database user to u8476722_8476722
WARNING: unable to find database user password for 'user_8476722'@'XX.XXX.XX.XX'
WARNING! user_8476722 username cannot be set to u8476722, renaming database user to u8476722_8476722
WARNING: unable to find database user password for 'user_8476722'@'XX.XXX.XX.XX'
WARNING! user_8476722 username cannot be set to u8476722, renaming database user to u8476722_8476722
WARNING: unable to find database user password for 'user_8476722'@'XX.XXX.XX.XX'
WARNING! user_8476722 username cannot be set to u8476722, renaming database user to u8476722_8476722
WARNING: unable to find database user password for 'user_8476722'@'XX.XXX.XX.XX'
WARNING! user_8476722 username cannot be set to u8476722, renaming database user to u8476722_8476722
WARNING: unable to find database user password for 'user_8476722'@'XX.XXX.XX.XX'
WARNING! user_8476722 username cannot be set to u8476722, renaming database user to u8476722_8476722
WARNING: unable to find database user password for 'user_8476722'@'localhost'
WARNING! user_8476722 username cannot be set to u8476722, renaming database user to u8476722_8476722
WARNING: unable to find database user password for 'user_8476722'@'wp-01.xxxxxx.com'
WARNING! user_8476722 username cannot be set to u8476722, renaming database user to u8476722_8476722


I'm getting this error for my wordpress user. What should i do i search everything.

Thanks in advance.
 
Yesterday I did my first production restore of one account I watched it as hawk all the time it went ok

What I notice is that the restore process uses gzip which is limited to 1 core on my 3 cpu 3 gb ram vps 1st DA production vps :)

so after an research (duckduck go one) i found that DA all ready support pigz since the 1.4 series but it is not enabled by default



/usr/local/directadmin/custombuild/

./build pigz


I do not tested it yet but I recommend build it if you will do multiple accounts restoring on multi core server (I use it on all of mine cPanel servers)
 
Yesterday I did my first production restore of one account I watched it as hawk all the time it went ok

What I notice is that the restore process uses gzip which is limited to 1 core on my 3 cpu 3 gb ram vps 1st DA production vps :)

so after an research (duckduck go one) i found that DA all ready support pigz since the 1.4 series but it is not enabled by default



/usr/local/directadmin/custombuild/

./build pigz


I do not tested it yet but I recommend build it if you will do multiple accounts restoring on multi core server (I use it on all of mine cPanel servers)

That is also valid for backup process , i had watched a time a go and the backup process use also only 1 core (can this confirmed by DA ? )

So if we do this than the backup and restore process will be shorten ?

I will test this to be sure if it works or not

EDIT:
Ok found the feauture: https://www.directadmin.com/features.php?id=1612

You must also alter your directadmin config with the amount of cores

And is it safe to restore if we change from gzip to pgiz ?
 
Last edited:
Sub domain Issue

Hello,

I think I have identified another subdomain issue.

If a user creates a cPanel subdomain with a non-standard folder, then when DA creates the subdomain, the actual data will not be in the correct DA folder.

For example,

- my subdomain is "demo" but I create it with the cPanel subdomain folder as "demosubdomain"

- there is data in the "demosubdomain" folder

- when DA restores the cpmove file, it will correctly bring over the data in "demosubdomain", and it will create a new "demo" folder since that is what it expected for the DA subdomain

- at this point the data from "demosubdomain" should be in "demo" ( or a symbolic link needs to be created )

In terms of solving this problem, we simply removed the "demo" folder and renamed our "demosubdomain" folder to "demo" in the file manager.

In terms of automating this, I suspect this might work better than symbolic links since cPanel actually lets you do whack stuff like make a subdomain called "subone" and point it to a folder called "subtwo" ... then make a subdomain called "subtwo" and point it to a folder called "subone". (Yeesh... sometimes just because you *can* do something, it doesn't mean you should cPanel.)

I'm happy to send you a cpmove file with this exact issue for your usage.

Thanks,


Richard
 
Hi Friends,

I have this problem on some accounts.

Code:
Domain studioprojetec.com.br CreatedDomain Created Successfully

Error with query "CREATE USER 'studiopr'@localhost" : Operation CREATE USER failed for 'studiopr'@'localhost'
Error with query "CREATE USER 'studiopr'@localhost" : Operation CREATE USER failed for 'studiopr'@'localhost'
Error with query:
ALTER DATABASE studiopr_wp436 CHARACTER SET 'utf8mb4' COLLATE 'latin1_swedish_ci'
COLLATION 'latin1_swedish_ci' is not valid for CHARACTER SET 'utf8mb4'
Error with query "CREATE USER 'studiopr'@localhost" : Operation CREATE USER failed for 'studiopr'@'localhost'
Error with query:
ALTER DATABASE studiopr_wp911 CHARACTER SET 'utf8mb4' COLLATE 'latin1_swedish_ci'
COLLATION 'latin1_swedish_ci' is not valid for CHARACTER SET 'utf8mb4'
Unable to restore database studiopr_wp911.sql to studiopr_wp911 : ERROR 1273 (HY000) at line 524 in file: '/home/studiopr/backups/backup/studiopr_wp911.sql': Unknown collation: 'utf8mb4_unicode_520_ci'
 
Hi Friends,

I have this problem on some accounts.

Code:
Domain studioprojetec.com.br CreatedDomain Created Successfully

Error with query "CREATE USER 'studiopr'@localhost" : Operation CREATE USER failed for 'studiopr'@'localhost'
Error with query "CREATE USER 'studiopr'@localhost" : Operation CREATE USER failed for 'studiopr'@'localhost'
Error with query:
ALTER DATABASE studiopr_wp436 CHARACTER SET 'utf8mb4' COLLATE 'latin1_swedish_ci'
COLLATION 'latin1_swedish_ci' is not valid for CHARACTER SET 'utf8mb4'
Error with query "CREATE USER 'studiopr'@localhost" : Operation CREATE USER failed for 'studiopr'@'localhost'
Error with query:
ALTER DATABASE studiopr_wp911 CHARACTER SET 'utf8mb4' COLLATE 'latin1_swedish_ci'
COLLATION 'latin1_swedish_ci' is not valid for CHARACTER SET 'utf8mb4'
Unable to restore database studiopr_wp911.sql to studiopr_wp911 : ERROR 1273 (HY000) at line 524 in file: '/home/studiopr/backups/backup/studiopr_wp911.sql': Unknown collation: 'utf8mb4_unicode_520_ci'

It seems to be MySQL/MariaDB version related. Are you sure you run the same, or newer, version of MySQL/MariaDB than the server you're migrating from?
 
Missing statistics awstats

Hi,

After migration account I dont see statistics ( awstats ) its normal that ?:confused:
 
Hi,

After migration account I dont see statistics ( awstats ) its normal that ?:confused:

Do you have AWstats enabled in CustomBuild? Please note it's generated every night, if you installed it just now :)
 
Look here is AWstats installed?

Code:
cd /usr/local/directadmin/custombuild
./build versions
Don't see it in the List

to install do

Code:
cd /usr/local/directadmin/custombuild
./build set awstats yes
./build awstats
 
Hi,

After migration account I dont see statistics ( awstats ) its normal that ?:confused:

Are you referring to your previous stats?

I know when you do cPanel to cPanel, it keeps the previous Awstats (if any). I've had clients send me old backups and I restored months of data that did not previously exist on the server.
 
ALTER DATABASE studiopr_wp436 CHARACTER SET 'utf8mb4' COLLATE 'latin1_swedish_ci'
COLLATION 'latin1_swedish_ci' is not valid for CHARACTER SET 'utf8mb4'[/CODE]

I had this issue. Before you backup the accounts originally, go to phpmyadmin into the databases and operations and change the latin1_swedish_ci to utf8... If you Google this you'll find some commands for mass replacing as well.

Once it's properly set, the backup will not complain when being restored. You can also "fix" the database and re-insert the sql dumps into the backup if the account is no longer on an active server (like all you have is the .tgz).
 
Missing statistics awstats

Hi,

AWSTATS is installed.
I see new statistics but missing the history, any idea how to restore historical data ?
 
Martynas,

I'm wondering generally how long it will take for a fix to the subdomain bug issues I mentioned a couple of days ago...

No urgent rush, but we're going to do another server migration in the next few days and it will make the migration experience a lot better for our support team and customers if all subdomains are created and working correctly.

Thanks,

Richard

If a user creates a cPanel subdomain with a non-standard folder, then when DA creates the subdomain, the actual data will not be in the correct DA folder.

For example,

- my subdomain is "demo" but I create it with the cPanel subdomain folder as "demosubdomain"

- there is data in the "demosubdomain" folder

- when DA restores the cpmove file, it will correctly bring over the data in "demosubdomain", and it will create a new "demo" folder since that is what it expected for the DA subdomain

- at this point the data from "demosubdomain" should be in "demo" ( or a symbolic link needs to be created )

In terms of solving this problem, we simply removed the "demo" folder and renamed our "demosubdomain" folder to "demo" in the file manager.


cPanel Subdomain configuration with a couple of non-standard folders:
https://dsc.cloud/Lightspeed/Screen-...2-10-26-58.png

Direct Admin filemanager after the migration:
https://dsc.cloud/Lightspeed/Screen-...1-22-31.22.png
 
Martynas,

I'm wondering generally how long it will take for a fix to the subdomain bug issues I mentioned a couple of days ago...

No urgent rush, but we're going to do another server migration in the next few days and it will make the migration experience a lot better for our support team and customers if all subdomains are created and working correctly.

Thanks,

Richard
I PM'ed you on this immediately after I've seen your post here, but I've got no response from you yet :)
 
I PM'ed you on this immediately after I've seen your post here, but I've got no response from you yet :)

Oops - I missed that altogether. I will setup email notifications on incoming PMs.

I'll review and get back to you asap.

Cheers,


Richard
 
Back
Top