Author Topic: Problems installing CWP 8 with MariaDB  (Read 595 times)

0 Members and 1 Guest are viewing this topic.

Offline
*****
Re: Problems installing CWP 8 with MariaDB
« Reply #15 on: November 01, 2025, 03:09:15 PM »
No, not limited to just the website DB -- I do mean ALL DB (including the root_cwp database, postfix DB, roundcube DB). On the original server to be migrated, issue this command:
Code: [Select]
mariadb-dump -u root -p --all-databases --system=users > all_DB.sqlThen SCP or rsync this all-inclusive SQL file over (it can be several GB large).
Then on the fresh AL9 system after re-creating all the user accounts, issue the reverse command to load in the DBs:
Code: [Select]
mariadb -u root -p < /path/to/all_DB.sqlThis worked for my CentOS 7.9 to AlmaLinux 8 migration.

Offline
**
Re: Problems installing CWP 8 with MariaDB
« Reply #16 on: November 02, 2025, 01:30:11 AM »
No, not limited to just the website DB -- I do mean ALL DB (including the root_cwp database, postfix DB, roundcube DB). On the original server to be migrated, issue this command:
Code: [Select]
mariadb-dump -u root -p --all-databases --system=users > all_DB.sqlThen SCP or rsync this all-inclusive SQL file over (it can be several GB large).
Then on the fresh AL9 system after re-creating all the user accounts, issue the reverse command to load in the DBs:
Code: [Select]
mariadb -u root -p < /path/to/all_DB.sqlThis worked for my CentOS 7.9 to AlmaLinux 8 migration.

Justo, thank you!! That was it, that was the question I had. Logically, I thought it should be all the databases, but I wasn't sure, and I wasn't certain. Perhaps restoring those databases from another version of CWP wouldn't be possible in a clean installation.

But what you've told me has saved my life in case I migrate (I still have to decide whether to migrate a production server from CWP8 to CWP9... I don't want that server to fail for any reason). Like I said, this was exactly the information I needed. I'm extremely grateful.

Offline
*****
Re: Problems installing CWP 8 with MariaDB
« Reply #17 on: November 02, 2025, 02:25:03 PM »
The goal would be to have 2 concurrently running systems -- your live AL8 system and your newly migrated AL9 system. Then you just change the DNS to point to the new server to complete the migration. In my case, I had 2 VMs on the same host machine, IPs separated by only a couple of digits. I brought up the new system, tested it as best I could, then shut down the main production VM and changed the IP on the replacement VM. It was a seamless transition (1 min downtime), with only some housekeeping to tend to after the switch -- that didn't affect the clients at all. This way, if things go south you can always revert back to the previous VM with only ~1 min downtime.

(Even if you go the DNS route, with Cloudflare you are only talking about >5 min downtime, switching DNS back & forth.)

Offline
**
Re: Problems installing CWP 8 with MariaDB
« Reply #18 on: November 03, 2025, 09:51:02 PM »
That's right, that's the idea, and that's how I usually proceed when doing migrations.

Sometimes the migration involves changing VPSs. The server is the same, same domain, same everything, but... the new VPS has better performance for the price.

So, at that point, I have both: the one in production and the new one. As you correctly mentioned, the new one is fully configured and ready, so I just need to migrate the CWP account to the CWP account. I'm behind Cloudflare and I do it at a time that won't cause any disruption. It's just a matter of changing the DNS settings in Cloudflare, and as you said, it doesn't take more than 5 minutes for the new one to be active.

But... this is where I had my doubts, mainly because I had no idea how to migrate the email accounts and their passwords. And this is where, thanks to you, I can do it.
Right now, I have a server set up with AL9 and CWP9, properly and perfectly configured, and I'm going to try it there. I'm using it as a server for this test; if it works, it'll stay, thanks to... it's perfectly configured.

However, the server has many email accounts, which is what worries me most. I'll have to either stop the mail server somehow or simply run another rsync from the old one to the new one.

Thanks!!!

Offline
*****
Re: Problems installing CWP 8 with MariaDB
« Reply #19 on: November 03, 2025, 10:05:05 PM »
Do both -- stop the old server's mail, run another rysnc run, then switch DNS, perhaps even one more rsync run (5 min or less). But if the mail service is stopped, it shouldn't be taking in any new mail. Mail will just sit in other servers' outgoing mail queues until your new server becomes available at the DNS address they are looking for.

Offline
**
Re: Problems installing CWP 8 with MariaDB
« Reply #20 on: November 04, 2025, 05:24:42 PM »
Do both -- stop the old server's mail, run another rysnc run, then switch DNS, perhaps even one more rsync run (5 min or less). But if the mail service is stopped, it shouldn't be taking in any new mail. Mail will just sit in other servers' outgoing mail queues until your new server becomes available at the DNS address they are looking for.

That's exactly a question I've always had, and I think you've answered it:

"If the mail service is stopped, it shouldn't receive any new emails. The emails will simply remain in the outgoing mail queues of other servers until your new server is available at the DNS address they're looking for."

I'll do what you suggested; a final rsync won't hurt, but as you mentioned, it shouldn't receive anything if I stop the mail server.

Thanks again!