HomeMogDBMogDB StackUqbar
v2.0

Documentation:v2.0

Supported Versions:

Other Versions:

Rebuild Database

If a standby node or cascaded standby node in the cluster has a problem such as data that cannot be automatically repaired, we sometimes need to rebuild the database by synchronizing the data with other instances to repair this instance, at this time you can rebuild the specified instances through PTK.

Rebuild Specified Instance

You must specify the instance by -H or -i option when rebuilding an instance.

The -H or --host option specifies the IP of the instance.

ptk cluster -n <CLUSTER_NAME> build -H <IP>

The -i or --id option specifies the ID of the instance (ID can be viewed via ptk ls)

ptk cluster -n <CLUSTER_NAME> build -i <ID>

Synchronize Data From Specified Instance

By default, the standby node will be rebuilt by database synchronization with the primary node, but this will put IO pressure on the primary node, which may in turn affect the performance of the business. In this case, you can specify another instance IP to rebuild by --build-from option:

ptk cluster -n <CLUSTER_NAME> build -H <IP> --build-from <IP>
Copyright © 2011-2024 www.enmotech.com All rights reserved.