HomeMogDBMogDB StackUqbar
v2.0

Documentation:v2.0

Supported Versions:

Other Versions:

Switchover

For routine operation and maintenance needs, you may want to switch the primary and standby nodes. The gs_ctl that comes with the MogDB database provides the switchover function, but the gs_ctl can only be executed under the user of the instance. In order to facilitate unified and centralized operation and maintenance, PTK also encapsulates the switchover command, which enables the primary and standby nodes of any instance to be switched over through PTK.

Command

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

ptk cluster -n <CLUSTER_NAME> switchover -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> switchover -i <ID>
Copyright © 2011-2024 www.enmotech.com All rights reserved.