Redundancy with 2 cPanel servers
Hi,
I have 2 servers, one is the "master" and the other is a hot stand by. I want to improve the setup.
So far I'm doing the following:
[LIST]
Initially, all accounts on the master server were copied over to the standby server.
Using DNSME service for domain failover to the standby server.
Static content is being synced with rsync with a cron job per account (just public_html).
MySQL is set with Master-Master replication.
Considering the second server will be used just as an emergency for a limited time, i can live with limited functionality (ie. no email service) in the mean time.
The major problem this setup is giving me is that I'm missing some configurations:
[LIST]
New MySQL users and DB in cPanel aren't showing.
Obviously, new accounts created on the master server won't be created on the standby. Although their new DBs get replicated as orphaned.
Same with new subdomains, aliases, etc.
Can you recommend a better way to do this? All suggestions are welcome.
Thanks
-
Hello, Replication/High Availability isn't yet supported, but I encourage you to review the following feature requests and vote/add feedback: Server configuration and data auto-sync (mirroring) Active-Active Redundancy or High-availability Built-in load balancing, replication, high availability Also, you can review the comments sections on these feature requests to see examples of how other users are implementing custom setups. Thank you. 0 -
Hi, I'm aware of those feature requests that have 4 years opened for discussion. There's not much information there either aside from using rsync to sync web content only. It would be nice if cPanel staff could put up a 'howto' in the mean time on how to nearly achieve this considering you have inside information. What to sync, how, tools, etc. Just like the one to replace mysql with percona and other 'unsupported' tutos. 0 -
The major problem this setup is giving me is that I'm missing some configurations: [LIST]
- New MySQL users and DB in cPanel aren't showing.
- Obviously, new accounts created on the master server won't be created on the standby. Although their new DBs get replicated as orphaned.
- Same with new subdomains, aliases, etc.
Hello, I can offer some advice on some of the major issues you listed. To clarify, is the remote system live with a valid cPanel installation, and able to accept remote connections? If so, you may find the standardized hooks functionality helpful: Guide to Standardized Hooks - Software Development Kit - cPanel Documentation You could setup hooks on the source cPanel server to automatically run a custom script that performs actions on the secondary server. For example, let's say you wanted to run a custom script that created an account on the destination server anytime an account was created on the source server. You could setup the custom script to run automatically after every new account creation using a post "Accounts::Create" hook: Guide to Standardized Hooks - Whostmgr Functions - Software Development Kit - cPanel Documentation Thank you.0
Please sign in to leave a comment.
Comments
3 comments