use maribackup not rsync

This commit is contained in:
admin 2026-02-03 07:57:13 -07:00
parent 12176caa75
commit aa0e39765d

View file

@ -13,17 +13,20 @@ services:
- /docker/maria/data:/var/lib/mysql - /docker/maria/data:/var/lib/mysql
- /docker/maria/conf:/etc/mysql/conf.d - /docker/maria/conf:/etc/mysql/conf.d
command: command:
- mariadb
- --${WS_NEW_CLUSTER} - --${WS_NEW_CLUSTER}
- --wsrep-on=ON - --wsrep-on=ON
- --wsrep-provider=/usr/lib/galera/libgalera_smm.so - --wsrep-provider=/usr/lib/galera/libgalera_smm.so
- --wsrep-cluster-name=${CLUSTER_NAME} - --wsrep-cluster-name=${CLUSTER_NAME}
# ?pc.wait_prim=no tells the process not to hang if it can't find a leader immediately - --wsrep-cluster-address=gcomm://${CLUSTER_LOCAL_IP},${CLUSTER_REMOTE_IP}?pc.wait_prim=no
- --wsrep-cluster-address=${WSREP_GCOMM}
- --wsrep-node-address=${CLUSTER_KEEPALIVED_IP} - --wsrep-node-address=${CLUSTER_KEEPALIVED_IP}
- --wsrep-node-name=node${MGDB_NODE_NUMBER} - --wsrep-node-name=node${MGDB_NODE_NUMBER}
- --binlog-format=row - --binlog-format=row
- --default-storage-engine=innodb - --default-storage-engine=innodb
- --innodb-autoinc-lock-mode=2 - --innodb-autoinc-lock-mode=2
- --bind-address=0.0.0.0 - --bind-address=0.0.0.0
# pc.ignore_sb=true is the key for 2-node clusters to avoid deadlocks # Switch to MariaBackup (The production standard)
- --wsrep-provider-options=pc.ignore_sb=true;pc.npvo=true;pc.weight=${MARIA_PC_WEIGHT} - --wsrep-sst-method=mariabackup
- --wsrep-sst-auth=sstuser:${SST_PASSWORD}
# Weight 2 on Node 1 forces it to be the leader during reboots/resets
- --wsrep-provider-options=pc.ignore_sb=true;pc.npvo=true;pc.weight=${NODE_WEIGHT}