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
Recovers a YMatrix database system.
The mxrecover tool uses a failback mechanism to recover failed nodes in the cluster.
| Option | Description |
|---|---|
| -c or --db-cluster-id |
Specifies the target database cluster ID. If omitted, the default value mdw is used as the cluster ID. |
| -F or --force-full-resync | Forces a full resynchronization of Primary/Master data to repair a damaged Mirror/Standby. |
| -r or --rebalance | After recovering failed Segments/Masters, restores all Segments/Masters within a shard to their original Primary/Master or Mirror/Standby roles as defined at initial database setup. |
| -q | Runs in quiet mode. Output is not displayed on the terminal but still written to log files. |
| -s | Specifies the shard to be recovered. |
| -h or --help | Displays help information. |
| -Q or --query | Periodically prints recovery progress. |
Note!
Bothmxrecoverandmxrecover -Fonly initiate recovery requests and do not wait for completion. The recovery process runs in the background, allowing you to continue other client operations without blocking. However, no progress or final status is reported automatically. Usemxrecover -Qormxrecover --queryto manually check the recovery status.
Note!
Whenmxrecoveris run with no options or only the-coption, an incremental recovery is initiated.
Recover a failed Segment/Master:
mxrecover
Perform a full recovery of a failed Segment/Master:
mxrecover -F
#or
mxrecover --force-full-resync
Restore Segment/Master roles:
mxrecover -r
#or
mxrecover --rebalance
Recover a failed Master shard:
mxrecover -s -1
Perform a full recovery of shard 0:
mxrecover -F -s 0
Recover shard 1 and shard 2:
mxrecover -r -s 1,2
#or
mxrecover -r -s 1 -s 2
Note! YMatrix 6 introduces a new database architecture and uses the mxrecover tool for cluster recovery. It is incompatible with gprecoverseg. In earlier versions, use the gprecoverseg tool.