cPanel backup restore failing

lordlex

Verified User
Joined
Aug 17, 2008
Messages
55
Location
Romania
Hello everyone,

Trying to migrate some accounts to DA, I came across some strange errors.

I have installed CloudLinux 8 with DA. As I want to use MySQL on the server (for some reasons I don't like MariaDB), and as I want MySQL version 5.7 (not all scripts support MySQL 8, so it's safer to use 5.7 now), I used the CL dbgovernor to switch to this version... I had to delete the /var/lib/mysql folder because 5.7 won't start with the files from MariaDB 10.5 nor MySQL 8, I have redone all the settings, added the DA MySQL user and pass and perms etc. everything is working as it should.

I tried to automate as much as I could, so I created and concatenated all the commands needed to pkgacct on the source server, scp the archive to destination DA server and add the needed command for restore to /usr/local/directadmin/data/task.queue. It's working as expected and all is fine.

Now the problem is with the restore, because I get some errors.

1. Most important error is "Your password does not satisfy the current policy requirements" when restoring the MySQL user password... and the test account actually have a very strong password and definitely satisfy the default policy. Anyway, I tried to solve this by this means:
a. setting validate_password_number_count and validate_password_special_char_count to zero in my.cnf
b. setting validate_password_policy to zero in my.cnf

As this should work and it worked when running command on the MySQL cli, it didn't work for restore... So, my only solution to this was to disable the validate_password plugin. My question about this is if it's ok if I did that and if there's any other way to solve this problem?

If anyone wonders, the command is
SQL:
UNINSTALL PLUGIN validate_password;
and to reactivate it
SQL:
INSTALL PLUGIN validate_password SONAME 'validate_password.so';

2. I get
Code:
E-Mail: Unable to add forwarder *, Catch all is now set to :fail:
Is this related to the fact I disabled Catch-All E-mail option on all user packages?

3. I get
Code:
Ftp: Invalid path: /etc/apache2/logs/domlogs/USERNAME: belowHomePath:USERNAME: /etc/apache2/logs/domlogs/USERNAME does not start with /home/USERNAME
Is this something that the convert script is not taking care of?

If anyone could enlighten me about this things, would be nice.

* later edit
4. Followed the guide to install LS from here: General | Directadmin Docs
Everything is installing and working properly... well, at least until server reboot. After the server boots, I see the command bellow running which is inexplicably switching back to apache and undo all the work... it rewrites the custombuild option, the directadmin.conf litespeed option and all the rest...
Code:
/bin/sh /usr/local/lsws//admin/misc/cp_switch_ws.sh apache
Anyone have encountered this problem? It's quite annoying already... This doesn't happen with OLS tho...

Regards,
Dan
 
Last edited:
Is this something that the convert script is not taking care of?
For this part I probably can confirm this. I've seen this before on the forums. But DA does not use /etc/apache2/domlogs/username.
For the regular logs it's /var/log/httpd/domains and there are the user domains logs and user domains error log and another one.
As for the user logs for users themselves, they are in .tar.gz format (like Sep-2021.tar.gz) and will be in the /home/user/domains/domain.com/logs directory.

2. Not sure, might be possible, but it's a good thing to disable catchall email.
 
For this part I probably can confirm this. I've seen this before on the forums. But DA does not use /etc/apache2/domlogs/username.
Yes, that's why I ask if it's not something missing in the conversions script.
2. Not sure, might be possible, but it's a good thing to disable catchall email.
I did activate catch-all for the packages and done some restore, and the error is still there... Also, the source account on cPanel doesn't have catch-all active.
And yes, I prefer to have catch-all deactivated, alt least for any user that didn't request it.
 
4. An update to my problem related to LSWS. I solved it.
To understand better, this is a CloudLinux 8 server. After each reboot, DA was showing a "license expired" message for one minute, and LSWS meantime was running the "cp_switch_ws.sh apache" command because it was not able to validate the license. After some chat with DA support team, they pointed out the DA problem was related to the fact network connection was not actually available.
Starting from this, I took a look at the service unit files DA and LSWS was using, and noted on the After= line included network.target. I have changed that to network-online.target and now both DA and LSWS start without any problem.

Some docs that explain what's the difference: Chapter 25. Systemd network targets and services Red Hat Enterprise Linux 8 | Red Hat Customer Portal

Not sure if it's the right solution. Maybe the unit files need Wants=network-online.target?
 
Last edited:
Back
Top