mxrecover

Fix a YMatrix database system.

1 Description

The mxrecover tool uses the failback mechanism to recover failed nodes in the cluster.

2 Parameter Options

Parameter name Description
-c or --db-cluster-id The ID of the target database cluster, if the parameter is omitted, use the default value mdw as the cluster ID
-F or --force-full-resync Force sync full Primary/Master data to fix damaged Mirror/Standby
-r or --rebalance After recovering the faulty Segment/Master, restore all Segment/Master in the data shard to the Primary/Master or Mirror/Standby roles set at the initial time of the database
-q Run in silent mode. The command output is not displayed in the command line terminal, but is still written to the log file
-h or --help Show Help Information
-Q or --query Intermittent print recovery progress

Notes!
Both mxrecover and mxrecover -F make only requests, without waiting for the task to end. After initiating a request, it will start the recovery process in the background, not blocking your other operations on the client, but will not remind you of the progress and final results. You need to use the mxrecover -Q or mxrecover --query command to manually query.

Notes!
When there are no parameters after the mxrecover command or only -c, incremental recovery is sent.

3 Examples

Recover damaged Segment/Master:

mxrecover

Full recovery of damaged Segment/Master:

mxrecover -F

#or

mxrecover --force-full-resync

Restore Segment/Master role:

mxrecover -r

#or

mxrecover --rebalance

Notes!
YMatrix 5 deploys a brand new database schema, enables the mxrecover tool to recover clusters, which are incompatible with gprecoverseg. Previous versions were available with the gprecoverseg tool.

See also: mxstart , mxstop , mxstate