Quick onboard
Deployment
Data Modeling
Connecting
Migration
Query
Operations and Maintenance
Common Maintenance
Partition
Backup and Restore
Expansion
Mirroring
Resource Management
Security
Monitoring
Performance Tuning
Troubleshooting
Reference Guide
Tool guide
Data type
Storage Engine
Executor
Stream
DR (Disaster Recovery)
Configuration
Index
Extension
SQL Reference
Note!
Disaster recovery capability is available as an experimental feature in YMatrix version 6.0.0.
When a disaster occurs and all machines in the primary cluster become physically unavailable, users can only perform operations on the standby cluster side.
After the primary-standby switchover, the data in the standby cluster will no longer remain consistent with the primary cluster, and it is not possible to switch back to the standby cluster role.
On the Master machine of the standby cluster, log in as the mxadmin user and run either the mxdr switch or mxdr switch -a command to perform the switchover.
a. When using mxdr switch for switchover, the following prompt appears. You must confirm whether to proceed with the switchover.
Continue promoting cluster for disaster recovery to normal cluster? Yy|Nn (default=N):
b. Using mxdr switch -a skips the interactive confirmation step.
mxadmin user to obtain the name of the Publisher managed by supervisor.supervisorctl status
The output is shown in the image below. In this example, the Publisher process name is publisher_5V967HARnCHfRMTeyiLQgS.

supervisorctl stop publisher_5V967HARnCHfRMTeyiLQgS
exited:supervisorctl status
Example:

This section describes the command-line tools related to disaster recovery functionality.
mxdr
The mxdr command is used to start and manage the Subscriber and Publisher components, and to control the switchover of the standby database cluster.
Usage:
mxdr [flags]
mxdr [command]
Available Commands:
completion Generate the autocompletion script for the specified shell
help Help about any command
switch Promote disaster recovery cluster
Flags:
-c, --config-file string path of the configuration file to start up
-h, --help help for mxdr
-s, --shard-cnt int number of shards of the source database cluster
-v, --version version for mxdr
mxbox deployer dr
The mxbox deployer dr tool is used to deploy disaster recovery components and the standby cluster.
Usage:
mxbox deployer dr [command]
Available Commands:
pub Publisher deployer for dr
Flags:
-h, --help help for dr
Usage:
mxbox deployer dr pub [command]
Available Commands:
config Generate a config template file
plan Generate plan for migrating host.
setup Execute steps to deploy physical publisher.
Flags:
-h, --help help for pub