Server cluster (4) Bt Panel sync website data

1. Install the plugin

First install the happy version of the pagoda on all nodes that need to be synchronized (there are genuine ones that can be ignored)

Reference article:

Install Pagoda 7.9.0 Enterprise Edition
https://blog.tsinbei.com/archives/293/

Search for the plugin Pagoda Data Sync Tool and install it.

Install the plugin MySQL master-slave replication (refactored version) on the master database.

2, configure the slave

2.1, sync files

Click to receive configuration:

Receive configuration

Suggest:

  • Username: fill in website domain name + node IP, for example: blog.tsinbei.com-192.168.100.1
  • Password: keep default random
  • Website Directory: Create a dedicated directory for syncing data, such as /www/wwwroot/sync/

Click on the key when done:

key

Copy the key.

2.2, synchronous SSL

Steps to install 2.1, sync

/www/server/panel/vhost/cert/website domain/

or

/www/server/panel/vhost/ssl/website root domain name/

That's it.

3, host configuration

3.1, sync files

Create a send task

Send task

If it is a public network cluster, it is recommended to:

  • Server IP: fill in the virtual IP of the previous network
  • Synchronization period: timing synchronization
  • Timing period: (website) N minutes 60 minutes
  • Timing period: (SSL) every day at 2:00

If it is an intranet cluster, you can change the "synchronization period" to real-time synchronization, because it will not occupy the public network bandwidth.

Note: There are bugs in the selection boxes such as synchronization period. After the selection is completed, you need to touch again (or shake with the mouse on it) to switch the tabs.

Click Start Sync, check whether the sync log is successful, and you're done.

3.2, synchronizing the database

Synchronize master-slave database

Add

Fill in the IP of the intranet or virtual IP of the network, including the panel address. Generally follow the prompts to automatically repair GTID and other options.

Tip: If the database of the target slave machine is in the Docker container, please add --privileged=true at startup, change the startup command to /usr/sbin/init, and execute it in the container iptables -F clears container firewall rules.

4. Exclude directories

Select Filter to add.

For example, in the later stage of database read-write separation, the configuration files of each node may be different. Therefore:
If the configuration file is /config/config.php, you can add filters:

Text
1
**/config/config.php

Note: The preceding ** cannot be omitted!

In addition, if there is a soft link in the directory, the soft link cannot be copied, so you also need to add filters, such as /file_link/ and /temp_link/ directories:

Text
1
**/*_link/

Note: The * cannot be omitted as well!

5. Synchronize website configuration

Pagoda's node synchronization tool has bugs and cannot be used. It is not recommended to purchase or install it.

Here is the solution:

ProjectsPrograms
SSL CertificatesSync SSL Directory/Manual Update
Pseudo-StaticManual Copy
Reverse ProxyManual Copy

Server cluster (4) Bt Panel sync website data

https://blog.tsinbei.com/en/archives/626/

Author
Hsukqi Lee
Posted on

2022-08-22

Edited on

2022-08-22

Licensed under

CC BY-NC-ND 4.0

Comments

Name
Mail
Site
None yet