Migrating my site from DirectAdmin to Virtualmin issues

SYSTEM INFORMATION
OS type and version Ubuntu Linux 20.04.6
Webmin version 2.111
Virtualmin version 7.20.2
Webserver version Virtual Server Intel(R) Xeon(R) CPU E5-2696 v4 @ 2.20GHz, 4 core - Linux 5.4.0-192-generic on x86_64
Related packages Webalizer version 2.23-08

Hi all,

This thread is a follow up of a similar discussion on this thread; Moving sites from DirectAdmin to Virtualmin - #26 by Robert71

This is where I left off:

After uploading the DirectAdmin backup to a folder on the virtualmin machine I was able to use the migrate option, that was succesfully completed. It’s a 1,5 Gb file in which we have a wordpress website along with a woocommerce webshop and a bunch of necessarry plugins.

A white screen appeared.

I changed the DNS back to the old server to let the website up. Used the hosts file to point to the virtualmin server.

  • White screen. The PHP logs and a search on the internet taught me that there was a line with auto_prepend_file in the user.ini that pointed to a wordfence-waf.php file that needed commenting out.
  • Switched to debug mode in wordpress.
  • Next challenge; user denied for database connection.

The error:
Warning: mysqli_real_connect(): (HY000/1045): Access denied for user ‘xxxxxx_wp2’@‘localhost’ (using password: YES) in /home/xxxxxx/public_html/wp-includes/class-wpdb.php on line 1982

Access denied for user 'xxxxxxxx_wp2'@'localhost' (using password: YES)

(names have been changed by xxxxx).

When editing users. I noticed the user xxxxx_wp2 has nothing in the field ‘Database granted access to’.
This is an stripped Excel of what the users look like:

I’m lead to believe I’m missing columns. I do not have the columns Disk quota, Quota used and last login. I checked other accounts (not migrated ones but made from within virtualmin, and they also lack those columns. I also do not understand why my list of database users do not show Database in the last column called Login Access, but maybe that’s not necessarry. I changed the applicable database user (it’s in my php-config file, so I know the right one) and try to ‘change’ the password to the pw mentioned in the php-config file, still no connection. I seems to be missing more. Maybe my virtualmin install is not complete?

Ow wait, is this in the Pro version? Should I upgrade first before getting this to work? I was hoping to be able to test it before, but maybe that’s not possible?

I got further along than this, using the GPL version. I am curious if, when you created the Virtualmin server, you did the full or the minimal installation?

In any event, as you could see from my last post in the initial thread on migration issues, the migration process may be broken and is being looked into by @Ilia and @Jamie and I am hopeful they will be able to fix it.

Thank you @charlesworks . I wasn’t aware there are multiple versions. I used these instructions; Downloading and Installing | Virtualmin — Open Source Web Hosting Control Panel

Should that be visible in the versions number somewhere?

I don’t know if it’s visible in the versions or whatever, but I have noticed that when I am using small older boxes to test things on I’ve done minimal installs (added “–minimal” switch in the initial loading command of Virtualmin). I notice that one of the things that is not installed during that is Fail2Ban (Webmin > Networking). If you did a regular installation and just followed the directions, I think it’s safe to say you have the full installation. If that’s the case you are probably running what I am.

In any event, I am hoping we hear from @Ilya or @Jamie on this situation, as the migration from DirectAdmin backups definitely doesn’t function as expected. What we have been doing is creating the space on the Virtualmin box, adding WordPress, and using the All in One Migration by ServMask to move the WordPress site into the Virtualmin box. Unfortunately, all AWStats are lost during this process and that is important to a number of my web clients.

1 Like

Thanks Charles. I’ve been thinking about that too, but that doesn’t bring over my mailboxes etc. And I run the mailboxes in the same package. As a matter of fact, the limitation of the mailboxes was another reason to move away from my current provider. After weeks of messing around I finally got virtualmin to mail back and forth 10/10 points score.

Bu whether the migration works well or not, that should not explain why I have less columns on the user section than @jimr1 was showing in his example.

Migration features are the same in GPL and Pro.

That said, I think managing multiple database users per domain more easily is one feature in Pro. But, if these users were in the backup and had access to the database, they probably should have been handled by the restore.

1 Like

So, to narrow down the problem, am I understanding correctly that on the DirectAdmin server, you have several users with database access (to the same database in the same domain, not multiple domain accounts with separate databases) being managed by DirectAdmin as part of the domain, and all of those database users are needed for the WordPress site? That feels like I’m misunderstanding something, as most WordPress sites just have one database configuration.

Generally speaking, users in a domain should come across with most of their privileges intact as best Virtualmin can understand them and translate them to the way Virtualmin thinks about users. But, it’s plausible Virtualmin historically didn’t think about multiple database users per-domain
so maybe DirectAdmin migration, which doesn’t get a lot of exercise, simply doesn’t think about that. In the short term, you may need to grant those users the access they need. Longer term, it’s probably something we can fix in the migration.

Hi Joe,

Thank you. Actually, I was surpised to see multiple users and DB’s within that DA backup. This domain is from 1999 if I’m correct and most have had dozens of new websites over the decades. I seriously doubt all of them are used, but I haven’t had the guts to start removing them as well as their users.

If I simply look at the current wp-config file, it refers to:

define( ‘DB_NAME’, ‘rjXXXXX_wp2’ );

with user:

define( ‘DB_USER’, ‘rjXXXXX_wp2’ );

And a long password that looks like:

define( ‘DB_PASSWORD’, 'L^JGU5$Mjui*gh5McPwH(9’5#,7);

That leads me to believe that wp2 is the BD and user that is currently used. Since we used an auto installer in DA all these were automatically generated.
But sine there have been/are running other sites on subdomains and folders, and plugins like woocommerce, I’m not entirely sure if they all use the same DB, or if some of them are still in use. For the time being I’d ignore everything but the above mentioned. I’ll clean 'em up one day.

As you said; I can not see a reason why it would not connect anymore in Virtualmin unless something changed in the rights of the user or folder, or the password is too long/complicated or otherwise. I don’t know. I tried adding that long password in virtualin to that user rjXXXXX_wp2 but then it came up that the user already exists.

Failed to save user : MariaDB database login with the name rjxxxxxx_wp2 already exists

This does look like a bug migrating multiple database users from the directadmin backup


Can we get a copy of the problem backup file from directadmin? Or was this the one you already provided in a different ticket?

Hi Jamie, I have not submitted the backup anywhere before. You mean the entire DA 1,5 Gb backup? If you can give me an e-mail address I can upload it through WeTransfer if you like, it contains a lot of sensitive- and customer information, I trust it will be treated likewise.

You should rather DM Jamie on the forum instead.

1 Like

I also ran into this: Errors were found in your system’s BIND configuration : /var/lib/bind/hostservice.nl.hosts:2: no TTL specified; using SOA MINTTL instead, dns_rdata_fromtext: /var/lib/bind/hostservice.nl.hosts:16: near ‘IN’: syntax error, zone hostservice.nl/IN: loading from master file /var/lib/bind/hostservice.nl.hosts failed: syntax error, zone hostservice.nl/IN: not loaded due to errors., _default/hostservice.nl/IN: syntax error

Could that have to do that currently the domain is pointed at the old server? Or is this a migration issue as well.

Somehow I’m not getting a reply anymore on the DM. Did I use the correct method?

Yes, I think you did! Jamie is traveling right now, so it might take a little time for him to reply and take a closer look at the issue.

1 Like

Hey gents, any news on this? :hugs:

Not yet! Sorry about that. However, we’ll do our best to fix it before the next minor Virtualmin release, like 7.30.0.